[3609] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: WiredForSound |
---|
| 4 | Version: 2.0.b |
---|
| 5 | Description: Ajoute du son à la galerie / Wire for sound your gallery |
---|
| 6 | Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=152 |
---|
| 7 | Author: P@t |
---|
| 8 | Author URI: http://www.gauchon.com |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 12 | |
---|
| 13 | global $prefixeTable; |
---|
| 14 | |
---|
| 15 | define('WFS_DIR' , basename(dirname(__FILE__))); |
---|
| 16 | define('WFS_PATH' , PHPWG_PLUGINS_PATH . WFS_DIR . '/'); |
---|
| 17 | define('WFS_IMG_CAT_TABLE' , $prefixeTable . 'wfs_img_cat_sound'); |
---|
| 18 | define('WFS_SOUNDS_TABLE' , $prefixeTable . 'wfs_sounds'); |
---|
| 19 | |
---|
| 20 | function 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 | |
---|
| 28 | function 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 | |
---|
| 35 | function wired_for_sound_on_picture() |
---|
| 36 | { |
---|
| 37 | global $page, $template, $conf, $prefixeTable, $lang; |
---|
| 38 | include(WFS_PATH . 'wfs_on_picture.php'); |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | add_event_handler('get_admin_plugin_menu_links', 'wfs_admin_menu'); |
---|
| 42 | add_event_handler('loc_end_index' , 'wired_for_sound_on_index'); |
---|
| 43 | add_event_handler('loc_end_picture' , 'wired_for_sound_on_picture'); |
---|
| 44 | |
---|
[3302] | 45 | ?> |
---|