]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #408 from ArthurHoaro/gototop
authorVirtualTam <virtualtam@flibidi.net>
Tue, 8 Dec 2015 23:55:52 +0000 (00:55 +0100)
committerVirtualTam <virtualtam@flibidi.net>
Tue, 8 Dec 2015 23:55:52 +0000 (00:55 +0100)
Adding a new placeholder in render_footer hook.

1  2 
plugins/demo_plugin/demo_plugin.php

index 9384c21f53232652b4df891a0a179f3a6f41a8fe,f03ddb2b5fd340faf6e4b3d422c99ec76369a93c..f5f028e023c68a583ff12c5e7c0837006655492b
@@@ -40,8 -40,6 +40,8 @@@ function hook_demo_plugin_render_header
          // Fields in toolbar
          $data['fields_toolbar'][] = 'DEMO_fields_toolbar';
      }
 +    // Another button always displayed
 +    $data['buttons_toolbar'][] = '<li><a href="#">DEMO</a></li>';
  
      return $data;
  }
@@@ -76,6 -74,7 +76,7 @@@ function hook_demo_plugin_render_includ
   *
   * Template placeholders:
   *   - text
+  *   - endofpage
   *   - js_files
   *
   * Data:
@@@ -91,6 -90,11 +92,11 @@@ function hook_demo_plugin_render_footer
      // footer text
      $data['text'][] = 'Shaarli is now enhanced by the awesome demo_plugin.';
  
+     // Free elements at the end of the page.
+     $data['endofpage'][] = '<marquee id="demo_marquee">' .
+             'DEMO: it\'s 1999 all over again!' .
+         '</marquee>';
      // List of plugin's JS files.
      // Note that you just need to specify CSS path.
      $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/demo_plugin/demo_plugin.js';