Changeset 3557


Ignore:
Timestamp:
Jul 8, 2009, 1:35:09 PM (15 years ago)
Author:
flop25
Message:

add .tpl for 'personalisation'

Location:
extensions/music_player
Files:
2 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/music_player/admin/admin.php

    r3507 r3557  
    8888                  ));
    8989
    90 /*   $template->assign_block_vars('syn',
    91     array('RESULT' => $value,
    92           'RESULT_M' => $fichier,//Ne sert que pour avoir un aperçu
    93           'NBR' => $n,
    94                   ));*/
    9590
    9691 }//foreach 
     
    9893if ($n ==0)
    9994{
    100   //$mp_msgs[] = $lang['mp_msg_admin1'];
    10195  array_push($page['infos'], l10n('mp_msg_admin1'));
    102 
    103 
    10496}
    10597else
     
    507499
    508500////assignement des valeurs
    509 $template->assign(
    510     array(
    511       'MP_EVIDENCE' => $evidence,
    512       'MP_HEAD' => $head,
    513       'MP_FOOT' => $foot,
    514       'MP_H_POP' => 'value="'.$conf_plugin[3].'"',
    515       'MP_L_POP' => 'value="'.$conf_plugin[4].'"',
    516          
    517       'MP_H_TT' => 'value="'.$conf_lecteur[0].'"',
    518       'MP_L_TT' => 'value="'.$conf_lecteur[1].'"',
    519       'MP_H' => 'value="'.$conf_lecteur[2].'"',
    520       'MP_MINIATURE_ACTIVATED' =>   $miniature,
    521       'MP_L' => 'value="'.$conf_lecteur[4].'"',
    522       'MP_SHUFFLE_ACTIVATED' => $shuffle,
    523       'MP_REPEAT_ACTIVATED' => $repeat,
    524       'AUTOSTART' => $conf_lecteur[7],
    525       'AUTOSTART_T' => $txt,
    526       'MP_AUTOSCROLL_ACTIVATED' => $autoscroll,
    527       'MP_VARIOUS_STYLE' => $various_style,
    528     )
    529   );
     501if (isset($foot) and isset($head) and isset($shuffle) and isset($repeat)){
     502        $template->assign(
     503                array(
     504                  'MP_EVIDENCE' => $evidence,
     505                  'MP_HEAD' => $head,
     506                  'MP_FOOT' => $foot,
     507                  'MP_H_POP' => 'value="'.$conf_plugin[3].'"',
     508                  'MP_L_POP' => 'value="'.$conf_plugin[4].'"',
     509                 
     510                  'MP_H_TT' => 'value="'.$conf_lecteur[0].'"',
     511                  'MP_L_TT' => 'value="'.$conf_lecteur[1].'"',
     512                  'MP_H' => 'value="'.$conf_lecteur[2].'"',
     513                  'MP_MINIATURE_ACTIVATED' =>   $miniature,
     514                  'MP_L' => 'value="'.$conf_lecteur[4].'"',
     515                  'MP_SHUFFLE_ACTIVATED' => $shuffle,
     516                  'MP_REPEAT_ACTIVATED' => $repeat,
     517                  'AUTOSTART' => $conf_lecteur[7],
     518                  'AUTOSTART_T' => $txt,
     519                  'MP_AUTOSCROLL_ACTIVATED' => $autoscroll,
     520                  'MP_VARIOUS_STYLE' => $various_style,
     521                )
     522          );
     523}
    530524// +-----------------------------------------------------------------------+
    531525// |               affichage des msg                                       |
  • extensions/music_player/class.inc.php

    r3507 r3557  
    159159{
    160160  global $page, $template;
    161   if (isset($page['body_id']) and $page['body_id']=='theAdminPage' and ($_GET['section']=='music_player/admin/admin.php' or $_GET['section']=='music_player/admin/help.php' or $_GET['section']=='music_player/admin/admin_edit.php') )
     161  if (isset($page['body_id']) and isset($_GET['section']) and $page['body_id']=='theAdminPage' and ($_GET['section']=='music_player/admin/admin.php' or $_GET['section']=='music_player/admin/help.php' or $_GET['section']=='music_player/admin/admin_edit.php') )
    162162  {
    163163      $template -> assign(
  • extensions/music_player/lecteur.php

    r3507 r3557  
    216216  );
    217217
    218 $template->set_filename('lecteur', $m_p->plugin_path.'template/lecteur.tpl');
     218if ($conf_lecteur[10]=='true')
     219{
     220
     221        $file = 'lecteur.tpl';
     222        $dir = LOCALEDIT_PATH.'template/style/';
     223        $theme_file = $dir.$user['template'].'/'.$user['theme'].'/'.$file;
     224        $template_file = $dir.$user['template'].'/'.$file;
     225       
     226        if (file_exists($theme_file))
     227        {
     228                $template->set_filename('lecteur', $theme_file);
     229        }
     230        elseif (file_exists($template_file))
     231        {
     232                $template->set_filename('lecteur', $template_file);
     233        }
     234        else
     235        {
     236                $name = explode('.', $conf_lecteur[9]);
     237                $template->set_filename('lecteur', $dir.$name[0].'.tpl');
     238        }
     239}
     240else
     241{
     242        $name = explode('.', $conf_lecteur[9]);
     243        $template->set_filename('lecteur', $dir.$name[0].'.tpl');
     244
     245}
     246
     247
    219248
    220249// +-----------------------------------------------------------------------+
  • extensions/music_player/main.inc.php

    r3508 r3557  
    22/*
    33Plugin Name: music_player
    4 Version: 2.1.0
     4Version: 2.1.1
    55Description: play music / avoir de la musique
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=162
Note: See TracChangeset for help on using the changeset viewer.