aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2015-12-09 00:55:52 +0100
committerVirtualTam <virtualtam@flibidi.net>2015-12-09 00:55:52 +0100
commit2f3e74090ae1b79845f431800c0fb08eeae24c30 (patch)
treeb466ddf09e42eb8725feb936be003ceb7b235305
parent6ff636cdd458056aa0149ff7db65624749b809c0 (diff)
parent40a5f296a6f983e5a31961994e7c2db461e70f5e (diff)
downloadShaarli-2f3e74090ae1b79845f431800c0fb08eeae24c30.tar.gz
Shaarli-2f3e74090ae1b79845f431800c0fb08eeae24c30.tar.zst
Shaarli-2f3e74090ae1b79845f431800c0fb08eeae24c30.zip
Merge pull request #408 from ArthurHoaro/gototop
Adding a new placeholder in render_footer hook.
-rw-r--r--plugins/demo_plugin/custom_demo.css6
-rw-r--r--plugins/demo_plugin/demo_plugin.php6
-rw-r--r--tpl/page.footer.html5
3 files changed, 17 insertions, 0 deletions
diff --git a/plugins/demo_plugin/custom_demo.css b/plugins/demo_plugin/custom_demo.css
index ab1720b5..af5e8bf9 100644
--- a/plugins/demo_plugin/custom_demo.css
+++ b/plugins/demo_plugin/custom_demo.css
@@ -4,4 +4,10 @@
4 4
5.upper_plugin_demo { 5.upper_plugin_demo {
6 float: left; 6 float: left;
7}
8
9#demo_marquee {
10 background: darkmagenta;
11 color: white;
12 font-weight: bold;
7} \ No newline at end of file 13} \ No newline at end of file
diff --git a/plugins/demo_plugin/demo_plugin.php b/plugins/demo_plugin/demo_plugin.php
index 9384c21f..f5f028e0 100644
--- a/plugins/demo_plugin/demo_plugin.php
+++ b/plugins/demo_plugin/demo_plugin.php
@@ -76,6 +76,7 @@ function hook_demo_plugin_render_includes($data)
76 * 76 *
77 * Template placeholders: 77 * Template placeholders:
78 * - text 78 * - text
79 * - endofpage
79 * - js_files 80 * - js_files
80 * 81 *
81 * Data: 82 * Data:
@@ -91,6 +92,11 @@ function hook_demo_plugin_render_footer($data)
91 // footer text 92 // footer text
92 $data['text'][] = 'Shaarli is now enhanced by the awesome demo_plugin.'; 93 $data['text'][] = 'Shaarli is now enhanced by the awesome demo_plugin.';
93 94
95 // Free elements at the end of the page.
96 $data['endofpage'][] = '<marquee id="demo_marquee">' .
97 'DEMO: it\'s 1999 all over again!' .
98 '</marquee>';
99
94 // List of plugin's JS files. 100 // List of plugin's JS files.
95 // Note that you just need to specify CSS path. 101 // Note that you just need to specify CSS path.
96 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/demo_plugin/demo_plugin.js'; 102 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/demo_plugin/demo_plugin.js';
diff --git a/tpl/page.footer.html b/tpl/page.footer.html
index b20aae54..195dada0 100644
--- a/tpl/page.footer.html
+++ b/tpl/page.footer.html
@@ -4,6 +4,11 @@
4 {$value} 4 {$value}
5 {/loop} 5 {/loop}
6</div> 6</div>
7
8{loop="$plugins_footer.endofpage"}
9 {$value}
10{/loop}
11
7{if="$newVersion"} 12{if="$newVersion"}
8<div id="newversion"> 13<div id="newversion">
9 <span id="version_id">&#x25CF;</span> Shaarli {$newVersion} is 14 <span id="version_id">&#x25CF;</span> Shaarli {$newVersion} is