aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-12-07 11:54:18 +0100
committerArthurHoaro <arthur@hoa.ro>2015-12-08 16:02:46 +0100
commit40a5f296a6f983e5a31961994e7c2db461e70f5e (patch)
tree4169e54e25b08a371673778e4e546ade2ee72bed
parent4c3df9aa1250df86a4897169a8d4be0d33b2c9f6 (diff)
downloadShaarli-40a5f296a6f983e5a31961994e7c2db461e70f5e.tar.gz
Shaarli-40a5f296a6f983e5a31961994e7c2db461e70f5e.tar.zst
Shaarli-40a5f296a6f983e5a31961994e7c2db461e70f5e.zip
Adding a new placeholder in render_footer hook.
Allow free elements at the end of the page.
-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 84763c2b..f03ddb2b 100644
--- a/plugins/demo_plugin/demo_plugin.php
+++ b/plugins/demo_plugin/demo_plugin.php
@@ -74,6 +74,7 @@ function hook_demo_plugin_render_includes($data)
74 * 74 *
75 * Template placeholders: 75 * Template placeholders:
76 * - text 76 * - text
77 * - endofpage
77 * - js_files 78 * - js_files
78 * 79 *
79 * Data: 80 * Data:
@@ -89,6 +90,11 @@ function hook_demo_plugin_render_footer($data)
89 // footer text 90 // footer text
90 $data['text'][] = 'Shaarli is now enhanced by the awesome demo_plugin.'; 91 $data['text'][] = 'Shaarli is now enhanced by the awesome demo_plugin.';
91 92
93 // Free elements at the end of the page.
94 $data['endofpage'][] = '<marquee id="demo_marquee">' .
95 'DEMO: it\'s 1999 all over again!' .
96 '</marquee>';
97
92 // List of plugin's JS files. 98 // List of plugin's JS files.
93 // Note that you just need to specify CSS path. 99 // Note that you just need to specify CSS path.
94 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/demo_plugin/demo_plugin.js'; 100 $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