]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/InfiniteScroll/InfiniteScrollPlugin.php
Initial move towards microformats2
[quix0rs-gnu-social.git] / plugins / InfiniteScroll / InfiniteScrollPlugin.php
index b6c4fabba001bb259c9c215825bde56d9e26668e..44c5c5e880bc555c5e07421fb8f269ecfdeea9cd 100644 (file)
@@ -33,6 +33,9 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
 
 class InfiniteScrollPlugin extends Plugin
 {
+
+    public $on_next_only = false;
+
     function __construct()
     {
         parent::__construct();
@@ -40,6 +43,8 @@ class InfiniteScrollPlugin extends Plugin
 
     function onEndShowScripts($action)
     {
+        $action->inlineScript('var infinite_scroll_on_next_only = ' . ($this->on_next_only?'true':'false') . ';');
+        $action->inlineScript('var ajax_loader_url = "' . ($this->path('ajax-loader.gif')) . '";');
         $action->script($this->path('jquery.infinitescroll.js'));
         $action->script($this->path('infinitescroll.js'));
     }
@@ -47,10 +52,11 @@ class InfiniteScrollPlugin extends Plugin
     function onPluginVersion(&$versions)
     {
         $versions[] = array('name' => 'InfiniteScroll',
-                            'version' => STATUSNET_VERSION,
+                            'version' => GNUSOCIAL_VERSION,
                             'author' => 'Craig Andrews',
                             'homepage' => 'http://status.net/wiki/Plugin:InfiniteScroll',
                             'rawdescription' =>
+                            // TRANS: Plugin dscription.
                             _m('Infinite Scroll adds the following functionality to your StatusNet installation: When a user scrolls towards the bottom of the page, the next page of notices is automatically retrieved and appended. This means they never need to click "Next Page", which dramatically increases stickiness.'));
         return true;
     }