source: extensions/WiredForSound/main.inc.php @ 31810

Last change on this file since 31810 was 26872, checked in by ddtddt, 10 years ago

Checked compatibility with Piwigo 2.6

File size: 1.3 KB
Line 
1<?php
2/*
3Plugin Name: WiredForSound
4Version: auto
5Description: Ajoute du son à la galerie / Wire for sound your gallery
6Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=152
7Author: P@t
8Author URI: http://www.gauchon.com
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13global $prefixeTable;
14
15define('WFS_DIR' , basename(dirname(__FILE__)));
16define('WFS_PATH' , PHPWG_PLUGINS_PATH . WFS_DIR . '/');
17define('WFS_IMG_CAT_TABLE' , $prefixeTable . 'wfs_img_cat_sound');
18define('WFS_SOUNDS_TABLE' , $prefixeTable . 'wfs_sounds');
19
20function wfs_admin_menu($menu)
21{
22    array_push($menu, array(
23      'NAME' => 'Wired For Sound',
24      'URL' => get_admin_plugin_menu_link(WFS_PATH . 'admin/admin.php')));
25    return $menu;
26}
27
28function wired_for_sound_on_index()
29{
30    global $page, $template, $conf, $prefixeTable, $lang; 
31    if (isset($page['category']) || isset($page['section']) and !isset($page['chronology_field']) and !isset($page['flat']))
32        include(WFS_PATH . 'wfs_on_index.php');
33}
34
35function wired_for_sound_on_picture()
36{
37    global $page, $template, $conf, $prefixeTable, $lang;
38        include(WFS_PATH . 'wfs_on_picture.php');
39}
40
41add_event_handler('get_admin_plugin_menu_links', 'wfs_admin_menu');
42add_event_handler('loc_end_index' , 'wired_for_sound_on_index');
43add_event_handler('loc_end_picture' , 'wired_for_sound_on_picture');
44
45?>
Note: See TracBrowser for help on using the repository browser.