Merge pull request #408 from ArthurHoaro/gototop

Adding a new placeholder in render_footer hook.
This commit is contained in:
VirtualTam 2015-12-09 00:55:52 +01:00
commit 2f3e74090a
3 changed files with 17 additions and 0 deletions

View File

@ -4,4 +4,10 @@
.upper_plugin_demo {
float: left;
}
#demo_marquee {
background: darkmagenta;
color: white;
font-weight: bold;
}

View File

@ -76,6 +76,7 @@ function hook_demo_plugin_render_includes($data)
*
* Template placeholders:
* - text
* - endofpage
* - js_files
*
* Data:
@ -91,6 +92,11 @@ function hook_demo_plugin_render_footer($data)
// 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';

View File

@ -4,6 +4,11 @@
{$value}
{/loop}
</div>
{loop="$plugins_footer.endofpage"}
{$value}
{/loop}
{if="$newVersion"}
<div id="newversion">
<span id="version_id">&#x25CF;</span> Shaarli {$newVersion} is