[3329] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: music_player |
---|
[6985] | 4 | Version: 2.1.5 |
---|
[3329] | 5 | Description: play music / avoir de la musique |
---|
| 6 | Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=162 |
---|
| 7 | Author: Flop25 |
---|
[6985] | 8 | Author URI: http://www.planete-flop.fr/ |
---|
[3329] | 9 | |
---|
| 10 | */ |
---|
| 11 | |
---|
| 12 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 13 | |
---|
| 14 | $plugin_name = basename(dirname(__FILE__)); |
---|
| 15 | $plugin_path = dirname(__FILE__).'/'; |
---|
| 16 | |
---|
| 17 | global $prefixeTable; |
---|
| 18 | |
---|
| 19 | define('MP_PLAYLIST' , $prefixeTable . 'mp_playlist'); |
---|
| 20 | define('MP_MUSIC' , $prefixeTable . 'mp_music'); |
---|
| 21 | define('MP_PATH', dirname(__FILE__).'/' ); |
---|
| 22 | define('MP_NAME', basename(dirname(__FILE__)) ); |
---|
[3560] | 23 | define('MP_LOCALEDIT_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); |
---|
[3329] | 24 | |
---|
| 25 | include_once(dirname(__FILE__).'/class.inc.php'); |
---|
| 26 | |
---|
| 27 | add_event_handler('get_admin_plugin_menu_links', array(&$m_p, 'mp_lien_menu') ); |
---|
| 28 | |
---|
| 29 | |
---|
[3500] | 30 | add_event_handler('loc_end_index', array(&$m_p, 'placer_icon') ); |
---|
[3329] | 31 | |
---|
[3500] | 32 | global $conf; |
---|
| 33 | $conf_plugin = explode("," , $conf['mp_plugin']); |
---|
| 34 | if (isset($conf_plugin[0]) and $conf_plugin[0]=="true") |
---|
| 35 | { |
---|
| 36 | add_event_handler('blockmanager_apply', array(&$m_p, 'placer_block')); |
---|
| 37 | add_event_handler('blockmanager_register_blocks', array(&$m_p, 'register_mp_menubar_blocks')); |
---|
| 38 | } |
---|
| 39 | |
---|
[3329] | 40 | add_event_handler('loc_begin_page_header', array(&$m_p, 'add_css') ); |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | $m_p = new Musicplayer(MP_NAME, MP_PATH); |
---|
| 44 | set_plugin_data($m_p->plugin_name, $m_p); |
---|
| 45 | |
---|
| 46 | ?> |
---|