aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/playvideos/playvideos.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/playvideos/playvideos.php')
-rw-r--r--plugins/playvideos/playvideos.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/playvideos/playvideos.php b/plugins/playvideos/playvideos.php
index 9918453c..0a80aa58 100644
--- a/plugins/playvideos/playvideos.php
+++ b/plugins/playvideos/playvideos.php
@@ -1,12 +1,20 @@
1<?php 1<?php
2/**
3 * Plugin PlayVideos
4 *
5 * Add a button in the toolbar allowing to watch all videos.
6 * Note: this plugin adds jQuery.
7 */
2 8
3/** 9/**
4 * When linklist is displayed, add play videos to header's toolbar. 10 * When linklist is displayed, add play videos to header's toolbar.
5 * 11 *
6 * @param array $data - header data. 12 * @param array $data - header data.
13 *
7 * @return mixed - header data with playvideos toolbar item. 14 * @return mixed - header data with playvideos toolbar item.
8 */ 15 */
9function hook_playvideos_render_header($data) { 16function hook_playvideos_render_header($data)
17{
10 if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) { 18 if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
11 $data['buttons_toolbar'][] = file_get_contents(PluginManager::$PLUGINS_PATH . '/playvideos/playvideos.html'); 19 $data['buttons_toolbar'][] = file_get_contents(PluginManager::$PLUGINS_PATH . '/playvideos/playvideos.html');
12 } 20 }
@@ -18,9 +26,11 @@ function hook_playvideos_render_header($data) {
18 * When linklist is displayed, include playvideos JS files. 26 * When linklist is displayed, include playvideos JS files.
19 * 27 *
20 * @param array $data - footer data. 28 * @param array $data - footer data.
29 *
21 * @return mixed - footer data with playvideos JS files added. 30 * @return mixed - footer data with playvideos JS files added.
22 */ 31 */
23function hook_playvideos_render_footer($data) { 32function hook_playvideos_render_footer($data)
33{
24 if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) { 34 if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
25 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/playvideos/jquery-1.11.2.min.js'; 35 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/playvideos/jquery-1.11.2.min.js';
26 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/playvideos/youtube_playlist.js'; 36 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/playvideos/youtube_playlist.js';