Changeset 3507 for extensions
- Timestamp:
- Jul 3, 2009, 5:42:14 PM (15 years ago)
- Location:
- extensions/music_player
- Files:
-
- 22 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/music_player/admin/admin.php
r3329 r3507 6 6 global $conf, $template, $lang, $page; 7 7 global $prefixeTable; 8 //include(get_language_filepath('plugin.lang.php', $m_p->plugin_path)); 9 load_language('plugin.lang', $m_p->plugin_path); 8 load_language('plugin.lang', $m_p->plugin_path); 10 9 11 10 $page['infos'] = array(); 12 11 13 /*$template->assign_vars(14 array(15 'PLUGIN_PATH' => $m_p->plugin_path16 )); */17 12 $template->assign(array( 18 13 'PLUGIN_PATH' => $m_p->plugin_path, … … 371 366 372 367 ////envoi 368 if (isset($_POST['envoi_config']) ){ 373 369 if ($_POST['envoi_config']=='lecteur') 374 370 { … … 387 383 $_POST['mp_autostart'], 388 384 $_POST['mp_autoscroll'], 385 $_POST['style'], 386 $_POST['various_style'], 389 387 ); 390 388 } … … 402 400 $_POST['mp_autostart'], 403 401 $_POST['mp_autoscroll'], 402 $_POST['style'], 403 $_POST['various_style'], 404 404 ); 405 405 } … … 414 414 // $mp_msgs[] = $lang['mp_msg_admin_5']; 415 415 array_push($page['infos'], l10n('mp_msg_admin_5')); 416 } 416 }} 417 417 if (isset($_POST['envoi_config']) ){ 418 418 if ($_POST['envoi_config']=='plugin' or isset($_POST['foot'])) … … 442 442 if ($conf_lecteur[6]=='true') $repeat=$check; 443 443 if ($conf_lecteur[8]=='true') $autoscroll=$check; 444 if ($conf_lecteur[10]=='true') $various_style=$check; 444 445 445 446 if ($conf_lecteur[7]!='0') 446 447 { 447 $rep = pwg_query('SELECT texte FROM '.MP_PLAYLIST.' WHERE id IN (\''.$conf_lecteur[7].'\') ;');448 $pl = mysql_fetch_array($rep);449 $txt=$pl['texte'];448 $rep = pwg_query('SELECT texte FROM '.MP_PLAYLIST.' WHERE id IN (\''.$conf_lecteur[7].'\') ;'); 449 $pl = mysql_fetch_array($rep); 450 $txt=$pl['texte']; 450 451 } 451 452 else {$txt="Defaut"; } … … 454 455 if ($conf_plugin[1]=='true') $head=$check; 455 456 if ($conf_plugin[2]=='true') $foot=$check; 457 458 //////////////////////////////////////////////// 459 ////////[ liste des styles globaux ////////// 460 //////////////////////////////////////////////// 461 $fichier = array(); 462 $dir = opendir('./plugins/music_player/template/style'); //ouvre le repertoire courant désigné par la variable 463 while(false!==($file = readdir($dir))){ //on lit tout et on récupere tout les dossiers dans $folder 464 465 if(!in_array($file, array('.','..'))){ //on eleve le parent et le courant '. et ..' 466 if(is_file($file)) { continue; } 467 $page = $file; //sort l'extension du fichier 468 $page = explode('.', $page); 469 $nb = count($page); 470 $nom_fichier = $page[0]; 471 for ($i = 1; $i < $nb-1; $i++){ 472 $nom_fichier .= '.'.$page[$i]; 473 } 474 if(isset($page[1])){ 475 $ext_fichier = $page[$nb-1]; 476 } 477 else { 478 $ext_fichier = ''; 479 } 480 481 if($ext_fichier == 'css') { //On ne prend que les css 482 array_push($fichier, $file); 483 } 484 }//fin if in array 485 }//while 486 natcasesort($fichier); //la fonction natcasesort( ) est la fonction de tri standard sauf qu'elle ignore la casse 487 488 489 foreach($fichier as $file) { 490 if ($conf_lecteur[9]==$file) 491 { 492 493 $template->append('list_style', 494 array('FILE' => $file, 495 'TEXTE' => '->'.$file, 496 )); 497 } 498 else 499 { 500 $template->append('list_style', 501 array('FILE' => $file, 502 'TEXTE' => $file, 503 )); 504 } 505 } 506 507 456 508 ////assignement des valeurs 457 509 $template->assign( … … 473 525 'AUTOSTART_T' => $txt, 474 526 'MP_AUTOSCROLL_ACTIVATED' => $autoscroll, 527 'MP_VARIOUS_STYLE' => $various_style, 475 528 ) 476 529 ); -
extensions/music_player/class.inc.php
r3500 r3507 37 37 if (isset($conf_plugin)) { 38 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>');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,toolbar=no,location=no,menubar=no,resizable=yes,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 40 } 41 41 } … … 59 59 array_splice($block->data, $position-1, 0, array('mp' => 60 60 array( 61 'URL' => '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\')" ',61 'URL' => '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,toolbar=no,location=no,menubar=no,resizable=yes,status=no,alwaysRaised=yes\')" ', 62 62 'TITLE' => l10n('lien_expl'), 63 63 'NAME' => l10n('lien_titre') -
extensions/music_player/lecteur.php
r3501 r3507 76 76 */ 77 77 include(PHPWG_ROOT_PATH.'include/page_header.php'); 78 78 load_language('plugin.lang', $m_p->plugin_path); 79 79 80 80 $template->assign( … … 118 118 } 119 119 // +-----------------------------------------------------------------------+ 120 // | Configuration du style | 121 // +-----------------------------------------------------------------------+ 122 $conf_lecteur = explode("," , $conf['mp_lecteur']); 123 124 if ($conf_lecteur[10]=='true') 125 { 126 $file = 'lecteur.css'; 127 $dir = LOCALEDIT_PATH.'template/style/'; 128 $theme_file = $dir.$user['template'].'/'.$user['theme'].'/'.$file; 129 $template_file = $dir.$user['template'].'/'.$file; 130 131 if (file_exists($theme_file)) 132 { 133 $template->assign(array( 'STYLE_FILE' => $theme_file ) ); 134 } 135 elseif (file_exists($template_file)) 136 { 137 $template->assign(array( 'STYLE_FILE' => $template_file ) ); 138 } 139 else 140 { 141 $template->assign(array( 'STYLE_FILE' => $dir.$conf_lecteur[9] ) ); 142 } 143 } 144 else 145 { 146 $template->assign(array( 'STYLE_FILE' => $dir.$conf_lecteur[9] ) ); 147 } 148 if ($conf_lecteur[10]=='true') 149 { 150 151 $file = 'lecteur.conf.php'; 152 $dir = LOCALEDIT_PATH.'template/style/'; 153 $theme_file = $dir.$user['template'].'/'.$user['theme'].'/'.$file; 154 $template_file = $dir.$user['template'].'/'.$file; 155 156 if (file_exists($theme_file)) 157 { 158 include($theme_file); 159 } 160 elseif (file_exists($template_file)) 161 { 162 include($template_file) ; 163 } 164 else 165 { 166 $name = explode('.', $conf_lecteur[9]); 167 include_once($dir.$name[0].'.conf.php'); 168 } 169 } 170 else 171 { 172 $name = explode('.', $conf_lecteur[9]); 173 include_once($dir.$name[0].'.conf.php'); 174 } 175 176 177 178 // +-----------------------------------------------------------------------+ 120 179 // | Configuration du lecteur | 121 180 // +-----------------------------------------------------------------------+ 122 181 123 $conf_lecteur = explode("," , $conf['mp_lecteur']);124 182 125 183 if ($conf_lecteur[5]=='true') $shuffle=$conf_lecteur[5]; else $shuffle="false"; … … 152 210 'URL' => $url, 153 211 'AUTOSCROLL' => $autoscroll, 212 'BACK_COLOR' => $BACK_COLOR, 213 'FRONT_COLOR' => $FRONT_COLOR, 214 'LIGHT_COLOR' => $LIGHT_COLOR, 154 215 ) 155 216 ); -
extensions/music_player/maintain.inc.php
r3329 r3507 45 45 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 46 46 VALUES 47 ("mp_lecteur" , "148,300,128,true,128,false,list,0,true " , "Lecteur config : haut tt, larg tt, haut pl, miniature, larg min, shuffle, repeat, autostart, autoscroll");';47 ("mp_lecteur" , "148,300,128,true,128,false,list,0,true,lecteur.css,true" , "Lecteur config : haut tt, larg tt, haut pl, miniature, larg min, shuffle, repeat, autostart, autoscroll, style, style pour chaque thème");'; 48 48 pwg_query($q); 49 49 … … 109 109 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 110 110 VALUES 111 ("mp_lecteur" , "148,300,128,true,128,false,list,0,true " , "Lecteur config : haut tt, larg tt, haut pl, miniature, larg min, shuffle, repeat, autostart, autoscroll");';111 ("mp_lecteur" , "148,300,128,true,128,false,list,0,true,lecteur.css,true" , "Lecteur config : haut tt, larg tt, haut pl, miniature, larg min, shuffle, repeat, autostart, autoscroll, style, style pour chaque thème");'; 112 112 pwg_query($q); 113 113 } … … 121 121 $nbr=count($conf); 122 122 123 if ($nbr!= 9)123 if ($nbr!=11) 124 124 { 125 125 pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param IN (\'mp_lecteur\')'); … … 128 128 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 129 129 VALUES 130 ("mp_lecteur" , "148,300,128,true,128,false,list,0,true " , "Lecteur config : haut tt, larg tt, haut pl, miniature, larg min, shuffle, repeat, autostart, autoscroll");';130 ("mp_lecteur" , "148,300,128,true,128,false,list,0,true,lecteur.css,true" , "Lecteur config : haut tt, larg tt, haut pl, miniature, larg min, shuffle, repeat, autostart, autoscroll, style, style pour chaque thème");'; 131 131 pwg_query($q); 132 132 } -
extensions/music_player/player/v4/readme.html
r3329 r3507 25 25 <script type="text/javascript" src="swfobject.js"></script> 26 26 <script type="text/javascript"> 27 var s1 = new SWFObject("player.swf","pl y","328","200","9","#FFFFFF");27 var s1 = new SWFObject("player.swf","playlist","328","200","9","#FFFFFF"); 28 28 s1.addParam("allowfullscreen","true"); 29 29 s1.addParam("allowscriptaccess","always"); -
extensions/music_player/template/admin.tpl
r3500 r3507 80 80 px <br /> 81 81 {'mp_admin_3_opt2_2'|@translate}</li> 82 <li> 83 {'mp_admin_3_opt9'|@translate}<br /> 84 <select name="style"> 85 {foreach from=$list_style item=ls} 86 <option value="{$ls.FILE}">{$ls.TEXTE}</option> 87 {/foreach} 88 </select> 89 <br /> 90 <input type="checkbox" name="various_style" value="true" {$MP_VARIOUS_STYLE} /> 91 {'mp_admin_3_opt10'|@translate}<br /> 92 </li> 82 93 <li> 83 94 <input type="checkbox" name="mp_miniature" value="true" {$MP_MINIATURE_ACTIVATED} /> -
extensions/music_player/template/lecteur.tpl
r3329 r3507 1 {html_head}<link rel="stylesheet" type="text/css" href=" ./template/lecteur.css">{/html_head}1 {html_head}<link rel="stylesheet" type="text/css" href="{$STYLE_FILE}">{/html_head} 2 2 {html_head}<script type="text/javascript" src="./player/swfobject.js"></script>{/html_head} 3 3 {html_head}<script type="text/javascript"> … … 35 35 {/if} 36 36 37 <div id="content" >37 <div id="content" class="content"> 38 38 <div id="autre_content"> 39 <div id="montre" style="display:block" align="center"> 40 <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='none';document.getElementById('cache').style.display ='block'">{'mp_montre'|@translate}</a> 41 </div> 42 <div id="cache" style="display:none" align="center"> 43 <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='block';document.getElementById('cache').style.display ='none'">{'mp_cache'|@translate}</a><br /> 44 <ul> 45 {foreach from=$playlist item=playlist}<!-- BEGIN playlist --> 46 <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist.URL}'{literal}}{/literal})" >{$playlist.TEXTE}</a></li> 47 {/foreach}<!-- END playlist --> 48 </ul> 49 </div> 39 <table id="table_content" border="0" cellspacing="0" cellpadding="0"> 40 <tr> 41 <td id="section_up_left"> </td> 42 <td id="section_up"><a href="#" id="close_button" onclick="window.close();" title="{'Close this window'|@translate}"><img src="template/icon/exit.png" class="button" alt="close"></a></li></ul></td> 43 <td id="section_up_right"> </td> 44 </tr> 45 <tr> 46 <td id="section_left"> </td> 47 <td id="section_in"> 48 <div class="titrePage"> 49 <div id="montre" style="display:block" align="center"> 50 <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='none';document.getElementById('cache').style.display ='block'">{'mp_montre'|@translate}</a> 51 </div> 52 <div id="cache" style="display:none" align="center"> 53 <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='block';document.getElementById('cache').style.display ='none'">{'mp_cache'|@translate}</a><br /> 54 <ul> 55 {foreach from=$playlist item=playlist}<!-- BEGIN playlist --> 56 <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist.URL}'{literal}}{/literal})" >{$playlist.TEXTE}</a></li> 57 {/foreach}<!-- END playlist --> 58 </ul> 59 </div> 60 </div> 50 61 <p align="center" id="player"> 51 62 <script type="text/javascript"> … … 56 67 so.addVariable("enablejs","true"); 57 68 so.addVariable("javascriptid","playlist"); 58 so.addVariable('backcolor',' 0x000000');59 so.addVariable('frontcolor',' 0xffffff');60 so.addVariable('lightcolor',' 0x0099CC');69 so.addVariable('backcolor','{$BACK_COLOR}'); 70 so.addVariable('frontcolor','{$FRONT_COLOR}'); 71 so.addVariable('lightcolor','{$LIGHT_COLOR}'); 61 72 so.addVariable('linktarget','_blank'); 62 73 so.addParam("allowfullscreen","true"); … … 74 85 so.write("player"); 75 86 </script></p> 76 <p id="pageBottomActions"><a href="#" onclick="window.close();" title="{'Close this window'|@translate}"><img src="template/icon/exit.png" class="button" alt="close"></a></p> 87 </td> 88 <td id="section_right"> </td> 89 </tr> 90 <tr> 91 <td id="section_bottom_left"> </td> 92 <td id="section_bottom" > </td> 93 <td id="section_bottom_right" > </td> 94 </tr> 95 </table> 77 96 </div> 78 97 </div> <!-- the_page -->
Note: See TracChangeset
for help on using the changeset viewer.