Changeset 3500 for extensions/music_player/class.inc.php
- Timestamp:
- Jul 2, 2009, 5:06:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/music_player/class.inc.php
r3329 r3500 11 11 $this->plugin_name = $plugin_name; 12 12 $this->plugin_path = $plugin_path; 13 // handler14 // $this->initialize_event_handler();15 13 } 16 /*17 function loading_lang()18 {19 global $lang;20 //include(get_language_filepath('plugin.lang.php', $this->plugin_path));21 load_language('plugin.lang', $this->plugin_path);22 } */23 14 function var_template() 24 15 { … … 34 25 return $r; 35 26 } 36 /*function remove_code($tlp_handle, $str_begin, $str_end)37 {38 global $template;39 40 $template->loadfile($tlp_handle);41 42 $p_beg = strpos($template->uncompiled_code[$tlp_handle], $str_begin);43 $p_end = strpos($template->uncompiled_code[$tlp_handle], $str_end) + strlen($str_end);44 $s = substr($template->uncompiled_code[$tlp_handle], $p_beg, $p_end - $p_beg);45 46 $template->uncompiled_code[$tlp_handle] =47 substr_replace($template->uncompiled_code[$tlp_handle], '', $p_beg, $p_end - $p_beg);48 49 return $s;50 }51 52 function add_before_code($tlp_handle, $insert_before, $code)53 {54 global $template;55 56 $template->loadfile($tlp_handle);57 $template->uncompiled_code[$tlp_handle] = str_replace($insert_before, $code.$insert_before, $template->uncompiled_code[$tlp_handle]);58 }59 function add_after_code($tlp_handle, $insert_after, $code)60 {61 global $template;62 63 $template->loadfile($tlp_handle);64 $template->uncompiled_code[$tlp_handle] = str_replace($insert_after, $insert_after.$code, $template->uncompiled_code[$tlp_handle]);65 }*/66 27 function register_mp_menubar_blocks($menu_ref_arr) { 67 28 $menu = & $menu_ref_arr[0]; … … 70 31 $menu->register_block(new RegisteredBlock('mbMusicPlayer', 'Music player', 'MP')); 71 32 } 72 33 function placer_icon() 34 { 35 global $conf, $template; 36 $conf_plugin = explode("," , $conf['mp_plugin']); 37 if (isset($conf_plugin)) { 38 $template->concat( 'PLUGIN_INDEX_ACTIONS', 39 '<li><a href="javascript:void(0)" onClick="window.open(\''.get_root_url().'plugins/'.$this->plugin_name.'/lecteur.php\',\'musique\',\'width='.$conf_plugin[4].',height='.$conf_plugin[3].',top=400,left=400,menubar=no,resizable=yes,toolbar=no,status=no,alwaysRaised=yes\')" ><img src="'.get_root_url().'plugins/'.$this->plugin_name.'/template/icon/icon32.png" alt="Music Player" title="Play Music" class="button" /></a></li>'); 40 } 41 } 73 42 74 43 function placer_lien($menu_ref_arr) … … 76 45 77 46 ///////////////////////[début de l'affichage lien]//////////////////// 78 //$this->loading_lang();79 47 80 48 global $lang, $conf, $template; 81 49 82 /*$conf_plugin = explode("," , $conf['mp_plugin']);83 84 $this->add_before_code('menubar','<!-- END quick_search -->','<ul>85 <li><img src="plugins/'.$this->plugin_name.'/template/audio.png" /> <a name="{lang:lien_expl}" href="javascript:void(0)" onClick="window.open(\''.get_root_url().'plugins/'.$this->plugin_name.'/lecteur.php\',\'musique\',\'width='.$conf_plugin[4].',height='.$conf_plugin[3].',top=400,left=400,menubar=no,resizable=yes,toolbar=no,status=no,alwaysRaised=yes\')" >{lang:lien_titre}</a></li>86 </ul>87 ');*/88 50 89 51 $menu = & $menu_ref_arr[0];
Note: See TracChangeset
for help on using the changeset viewer.