Index: extensions/music_player/admin/admin.php
===================================================================
--- extensions/music_player/admin/admin.php	(revision 3542)
+++ extensions/music_player/admin/admin.php	(revision 3557)
@@ -88,9 +88,4 @@
 		  ));
 
-/*   $template->assign_block_vars('syn',
-    array('RESULT' => $value,
-          'RESULT_M' => $fichier,//Ne sert que pour avoir un aperçu
-          'NBR' => $n,
-		  ));*/
 
  }//foreach  
@@ -98,8 +93,5 @@
 if ($n ==0)
 {
-  //$mp_msgs[] = $lang['mp_msg_admin1'];
   array_push($page['infos'], l10n('mp_msg_admin1'));
-
-
 }
 else
@@ -507,25 +499,27 @@
 
 ////assignement des valeurs
-$template->assign(
-    array(
-      'MP_EVIDENCE' => $evidence,
-      'MP_HEAD' => $head,
-      'MP_FOOT' => $foot,
-      'MP_H_POP' => 'value="'.$conf_plugin[3].'"',
-      'MP_L_POP' => 'value="'.$conf_plugin[4].'"',
-	  
-      'MP_H_TT' => 'value="'.$conf_lecteur[0].'"',
-      'MP_L_TT' => 'value="'.$conf_lecteur[1].'"',
-      'MP_H' => 'value="'.$conf_lecteur[2].'"',
-      'MP_MINIATURE_ACTIVATED' =>   $miniature,
-      'MP_L' => 'value="'.$conf_lecteur[4].'"',
-      'MP_SHUFFLE_ACTIVATED' => $shuffle,
-      'MP_REPEAT_ACTIVATED' => $repeat,
-      'AUTOSTART' => $conf_lecteur[7],
-      'AUTOSTART_T' => $txt,
-      'MP_AUTOSCROLL_ACTIVATED' => $autoscroll,
-      'MP_VARIOUS_STYLE' => $various_style,
-    )
-  );
+if (isset($foot) and isset($head) and isset($shuffle) and isset($repeat)){
+	$template->assign(
+		array(
+		  'MP_EVIDENCE' => $evidence,
+		  'MP_HEAD' => $head,
+		  'MP_FOOT' => $foot,
+		  'MP_H_POP' => 'value="'.$conf_plugin[3].'"',
+		  'MP_L_POP' => 'value="'.$conf_plugin[4].'"',
+		  
+		  'MP_H_TT' => 'value="'.$conf_lecteur[0].'"',
+		  'MP_L_TT' => 'value="'.$conf_lecteur[1].'"',
+		  'MP_H' => 'value="'.$conf_lecteur[2].'"',
+		  'MP_MINIATURE_ACTIVATED' =>   $miniature,
+		  'MP_L' => 'value="'.$conf_lecteur[4].'"',
+		  'MP_SHUFFLE_ACTIVATED' => $shuffle,
+		  'MP_REPEAT_ACTIVATED' => $repeat,
+		  'AUTOSTART' => $conf_lecteur[7],
+		  'AUTOSTART_T' => $txt,
+		  'MP_AUTOSCROLL_ACTIVATED' => $autoscroll,
+		  'MP_VARIOUS_STYLE' => $various_style,
+		)
+	  );
+}
 // +-----------------------------------------------------------------------+
 // |               affichage des msg                                       |
Index: extensions/music_player/class.inc.php
===================================================================
--- extensions/music_player/class.inc.php	(revision 3542)
+++ extensions/music_player/class.inc.php	(revision 3557)
@@ -159,5 +159,5 @@
 {
   global $page, $template;
-  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') )
+  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') )
   {
       $template -> assign(
Index: extensions/music_player/lecteur.php
===================================================================
--- extensions/music_player/lecteur.php	(revision 3542)
+++ extensions/music_player/lecteur.php	(revision 3557)
@@ -216,5 +216,34 @@
   );
 
-$template->set_filename('lecteur', $m_p->plugin_path.'template/lecteur.tpl');
+if ($conf_lecteur[10]=='true')
+{
+
+	$file = 'lecteur.tpl';
+	$dir = LOCALEDIT_PATH.'template/style/';
+	$theme_file = $dir.$user['template'].'/'.$user['theme'].'/'.$file;
+	$template_file = $dir.$user['template'].'/'.$file;
+	
+	if (file_exists($theme_file))
+	{
+		$template->set_filename('lecteur', $theme_file);
+	}
+	elseif (file_exists($template_file))
+	{
+		$template->set_filename('lecteur', $template_file);
+	}
+	else
+	{
+		$name = explode('.', $conf_lecteur[9]);
+		$template->set_filename('lecteur', $dir.$name[0].'.tpl');
+	}
+}
+else
+{
+	$name = explode('.', $conf_lecteur[9]);
+	$template->set_filename('lecteur', $dir.$name[0].'.tpl');
+
+}
+
+
 
 // +-----------------------------------------------------------------------+
Index: extensions/music_player/main.inc.php
===================================================================
--- extensions/music_player/main.inc.php	(revision 3542)
+++ extensions/music_player/main.inc.php	(revision 3557)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: music_player
-Version: 2.1.0
+Version: 2.1.1
 Description: play music / avoir de la musique
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=162
Index: extensions/music_player/template/lecteur.tpl
===================================================================
--- extensions/music_player/template/lecteur.tpl	(revision 3542)
+++ 	(revision )
@@ -1,101 +1,0 @@
-{html_head}<link rel="stylesheet" type="text/css" href="{$STYLE_FILE}">{/html_head}
-{html_head}<script type="text/javascript" src="./player/swfobject.js"></script>{/html_head}
-{html_head}<script type="text/javascript">
-{literal}
-
-	function loadFile(obj) { thisMovie("playlist").loadFile(obj); };
-	// This is a javascript handler for the player and is always needed.
-	function thisMovie(movieName) {
-	    if(navigator.appName.indexOf("Microsoft") != -1) {
-			return window[movieName];
-		} else {
-			return document[movieName];
-		}
-	};
-{/literal}
-
-</script>{/html_head}
-
-{if $conf_plugin_1!='true' }
-{html_head}<style type="text/css">{literal}
-#theHeader
-{
-display:none;
-}
-{/literal}</style>{/html_head}
-{/if}
-{if $conf_plugin_2!='true' }
-{html_head}<style type="text/css">{literal}
-
-#copyright
-{
-display:none;
-}	
-	  </style>{/literal}{/html_head}
-{/if}
-
-<div id="content" class="content">
-<div id="autre_content">
-  <table id="table_content" border="0" cellspacing="0" cellpadding="0">
-    <tr>
-      <td id="section_up_left"></td>
-      <td id="section_up"></td>
-      <td id="section_up_right"></td>
-    </tr>
-    <tr>
-      <td id="section_left"></td>
-      <td id="section_in">
-	<div class="titrePage">
-        <div id="montre" style="display:block" align="center">
-          <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='none';document.getElementById('cache').style.display ='block'">{'mp_montre'|@translate}</a>
-        </div>
-        <div id="cache" style="display:none" align="center">
-          <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='block';document.getElementById('cache').style.display ='none'">{'mp_cache'|@translate}</a><br />
-          <ul>
-          {foreach from=$playlist item=playlist}<!-- BEGIN playlist -->
-            <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist.URL}'{literal}}{/literal})" >{$playlist.TEXTE}</a></li>
-          {/foreach}<!-- END playlist -->
-          </ul>
-        </div>
-  </div>
-  <div id="close_button"><a href="#" onclick="window.close();" title="{'Close this window'|@translate}"><img src="template/icon/exit.png" class="button" alt="close"></a></div>
-  <div align="center" id="player">
-<script type="text/javascript">
-	var so = new SWFObject("player/mp3player.swf", "playlist", "{$L_TT}", "{$H_TT}", "7");
-	so.addVariable("file","{$URL}");
-	so.addVariable("autostart","{$AUTOSTART}"); 
-
-	so.addVariable("enablejs","true");
-	so.addVariable("javascriptid","playlist");
-	so.addVariable('backcolor','{$BACK_COLOR}');
-	so.addVariable('frontcolor','{$FRONT_COLOR}');
-	so.addVariable('lightcolor','{$LIGHT_COLOR}');
-	so.addVariable('linktarget','_blank');
-    so.addParam("allowfullscreen","true");
-	so.addParam("allowscriptaccess","always"); 
-
-	so.addVariable("repeat","{$REPEAT}");
-	so.addVariable("shuffle","{$SHUFFLE}"); 
-	so.addVariable("autoscroll","{$AUTOSCROLL}"); 
- 
-	so.addVariable('displayheight','{$H}'); <!--Attention hauteur de la playlist !  -->
-	so.addVariable('displaywidth','{$L}');<!--Attention largeur de la miniature !  -->
-
-		
-
-	so.write("player");
-</script></div>
-</td>
-	  <td id="section_right"></td>
-    </tr>
-    <tr>
-      <td id="section_bottom_left"></td>
-      <td id="section_bottom" ></td>
-      <td id="section_bottom_right" ></td>
-    </tr>
-  </table>
-</div>
-</div> <!-- the_page -->
-
-</body>
-</html>
Index: extensions/music_player/template/style/lecteur.tpl
===================================================================
--- extensions/music_player/template/style/lecteur.tpl	(revision 3557)
+++ extensions/music_player/template/style/lecteur.tpl	(revision 3557)
@@ -0,0 +1,101 @@
+{html_head}<link rel="stylesheet" type="text/css" href="{$STYLE_FILE}">{/html_head}
+{html_head}<script type="text/javascript" src="./player/swfobject.js"></script>{/html_head}
+{html_head}<script type="text/javascript">
+{literal}
+
+	function loadFile(obj) { thisMovie("playlist").loadFile(obj); };
+	// This is a javascript handler for the player and is always needed.
+	function thisMovie(movieName) {
+	    if(navigator.appName.indexOf("Microsoft") != -1) {
+			return window[movieName];
+		} else {
+			return document[movieName];
+		}
+	};
+{/literal}
+
+</script>{/html_head}
+
+{if $conf_plugin_1!='true' }
+{html_head}<style type="text/css">{literal}
+#theHeader
+{
+display:none;
+}
+{/literal}</style>{/html_head}
+{/if}
+{if $conf_plugin_2!='true' }
+{html_head}<style type="text/css">{literal}
+
+#copyright
+{
+display:none;
+}	
+	  </style>{/literal}{/html_head}
+{/if}
+
+<div id="content" class="content">
+<div id="autre_content">
+  <table id="table_content" border="0" cellspacing="0" cellpadding="0">
+    <tr>
+      <td id="section_up_left"></td>
+      <td id="section_up"></td>
+      <td id="section_up_right"></td>
+    </tr>
+    <tr>
+      <td id="section_left"></td>
+      <td id="section_in">
+	<div class="titrePage">
+        <div id="montre" style="display:block" align="center">
+          <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='none';document.getElementById('cache').style.display ='block'">{'mp_montre'|@translate}</a>
+        </div>
+        <div id="cache" style="display:none" align="center">
+          <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='block';document.getElementById('cache').style.display ='none'">{'mp_cache'|@translate}</a><br />
+          <ul>
+          {foreach from=$playlist item=playlist}<!-- BEGIN playlist -->
+            <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist.URL}'{literal}}{/literal})" >{$playlist.TEXTE}</a></li>
+          {/foreach}<!-- END playlist -->
+          </ul>
+        </div>
+  </div>
+  <div id="close_button"><a href="#" onclick="window.close();" title="{'Close this window'|@translate}"><img src="template/icon/exit.png" class="button" alt="close"></a></div>
+  <div align="center" id="player">
+<script type="text/javascript">
+	var so = new SWFObject("player/mp3player.swf", "playlist", "{$L_TT}", "{$H_TT}", "7");
+	so.addVariable("file","{$URL}");
+	so.addVariable("autostart","{$AUTOSTART}"); 
+
+	so.addVariable("enablejs","true");
+	so.addVariable("javascriptid","playlist");
+	so.addVariable('backcolor','{$BACK_COLOR}');
+	so.addVariable('frontcolor','{$FRONT_COLOR}');
+	so.addVariable('lightcolor','{$LIGHT_COLOR}');
+	so.addVariable('linktarget','_blank');
+    so.addParam("allowfullscreen","true");
+	so.addParam("allowscriptaccess","always"); 
+
+	so.addVariable("repeat","{$REPEAT}");
+	so.addVariable("shuffle","{$SHUFFLE}"); 
+	so.addVariable("autoscroll","{$AUTOSCROLL}"); 
+ 
+	so.addVariable('displayheight','{$H}'); <!--Attention hauteur de la playlist !  -->
+	so.addVariable('displaywidth','{$L}');<!--Attention largeur de la miniature !  -->
+
+		
+
+	so.write("player");
+</script></div>
+</td>
+	  <td id="section_right"></td>
+    </tr>
+    <tr>
+      <td id="section_bottom_left"></td>
+      <td id="section_bottom" ></td>
+      <td id="section_bottom_right" ></td>
+    </tr>
+  </table>
+</div>
+</div> <!-- the_page -->
+
+</body>
+</html>
Index: extensions/music_player/template/style/yoga/lecteur.tpl
===================================================================
--- extensions/music_player/template/style/yoga/lecteur.tpl	(revision 3557)
+++ extensions/music_player/template/style/yoga/lecteur.tpl	(revision 3557)
@@ -0,0 +1,81 @@
+{html_head}<link rel="stylesheet" type="text/css" href="{$STYLE_FILE}">{/html_head}
+{html_head}<script type="text/javascript" src="./player/swfobject.js"></script>{/html_head}
+{html_head}<script type="text/javascript">
+{literal}
+
+	function loadFile(obj) { thisMovie("playlist").loadFile(obj); };
+	// This is a javascript handler for the player and is always needed.
+	function thisMovie(movieName) {
+	    if(navigator.appName.indexOf("Microsoft") != -1) {
+			return window[movieName];
+		} else {
+			return document[movieName];
+		}
+	};
+{/literal}
+
+</script>{/html_head}
+
+{if $conf_plugin_1!='true' }
+{html_head}<style type="text/css">{literal}
+#theHeader
+{
+display:none;
+}
+{/literal}</style>{/html_head}
+{/if}
+{if $conf_plugin_2!='true' }
+{html_head}<style type="text/css">{literal}
+
+#copyright
+{
+display:none;
+}	
+	  </style>{/literal}{/html_head}
+{/if}
+
+<div id="content" class="content">
+	<div class="titrePage">
+        <div id="montre" style="display:block" align="center">
+          <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='none';document.getElementById('cache').style.display ='block'">{'mp_montre'|@translate}</a>
+        </div>
+        <div id="cache" style="display:none" align="center">
+          <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='block';document.getElementById('cache').style.display ='none'">{'mp_cache'|@translate}</a><br />
+          <ul>
+          {foreach from=$playlist item=playlist}<!-- BEGIN playlist -->
+            <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist.URL}'{literal}}{/literal})" >{$playlist.TEXTE}</a></li>
+          {/foreach}<!-- END playlist -->
+          </ul>
+        </div>
+  </div>
+  <div id="close_button"><a href="#" onclick="window.close();" title="{'Close this window'|@translate}"><img src="template/icon/exit.png" class="button" alt="close"></a></div>
+  <div align="center" id="player">
+<script type="text/javascript">
+	var so = new SWFObject("player/mp3player.swf", "playlist", "{$L_TT}", "{$H_TT}", "7");
+	so.addVariable("file","{$URL}");
+	so.addVariable("autostart","{$AUTOSTART}"); 
+
+	so.addVariable("enablejs","true");
+	so.addVariable("javascriptid","playlist");
+	so.addVariable('backcolor','{$BACK_COLOR}');
+	so.addVariable('frontcolor','{$FRONT_COLOR}');
+	so.addVariable('lightcolor','{$LIGHT_COLOR}');
+	so.addVariable('linktarget','_blank');
+    so.addParam("allowfullscreen","true");
+	so.addParam("allowscriptaccess","always"); 
+
+	so.addVariable("repeat","{$REPEAT}");
+	so.addVariable("shuffle","{$SHUFFLE}"); 
+	so.addVariable("autoscroll","{$AUTOSCROLL}"); 
+ 
+	so.addVariable('displayheight','{$H}'); <!--Attention hauteur de la playlist !  -->
+	so.addVariable('displaywidth','{$L}');<!--Attention largeur de la miniature !  -->
+
+		
+
+	so.write("player");
+</script></div>
+</div> <!-- the_page -->
+
+</body>
+</html>
