Adding a new placeholder in render_footer hook.
Allow free elements at the end of the page.
This commit is contained in:
parent
4c3df9aa12
commit
40a5f296a6
3 changed files with 17 additions and 0 deletions
|
@ -4,4 +4,10 @@
|
||||||
|
|
||||||
.upper_plugin_demo {
|
.upper_plugin_demo {
|
||||||
float: left;
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#demo_marquee {
|
||||||
|
background: darkmagenta;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
|
@ -74,6 +74,7 @@ function hook_demo_plugin_render_includes($data)
|
||||||
*
|
*
|
||||||
* Template placeholders:
|
* Template placeholders:
|
||||||
* - text
|
* - text
|
||||||
|
* - endofpage
|
||||||
* - js_files
|
* - js_files
|
||||||
*
|
*
|
||||||
* Data:
|
* Data:
|
||||||
|
@ -89,6 +90,11 @@ function hook_demo_plugin_render_footer($data)
|
||||||
// footer text
|
// footer text
|
||||||
$data['text'][] = 'Shaarli is now enhanced by the awesome demo_plugin.';
|
$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.
|
// List of plugin's JS files.
|
||||||
// Note that you just need to specify CSS path.
|
// Note that you just need to specify CSS path.
|
||||||
$data['js_files'][] = PluginManager::$PLUGINS_PATH . '/demo_plugin/demo_plugin.js';
|
$data['js_files'][] = PluginManager::$PLUGINS_PATH . '/demo_plugin/demo_plugin.js';
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
{$value}
|
{$value}
|
||||||
{/loop}
|
{/loop}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{loop="$plugins_footer.endofpage"}
|
||||||
|
{$value}
|
||||||
|
{/loop}
|
||||||
|
|
||||||
{if="$newVersion"}
|
{if="$newVersion"}
|
||||||
<div id="newversion">
|
<div id="newversion">
|
||||||
<span id="version_id">●</span> Shaarli {$newVersion} is
|
<span id="version_id">●</span> Shaarli {$newVersion} is
|
||||||
|
|
Loading…
Reference in a new issue