Index: /extensions/music_player/class.inc.php
===================================================================
--- /extensions/music_player/class.inc.php	(revision 3499)
+++ /extensions/music_player/class.inc.php	(revision 3500)
@@ -11,14 +11,5 @@
     $this->plugin_name = $plugin_name;
     $this->plugin_path = $plugin_path;
-    // handler
-   // $this->initialize_event_handler();
   }
-  /*
-  function loading_lang()
-  {
-    global $lang;
-    //include(get_language_filepath('plugin.lang.php', $this->plugin_path));
-	load_language('plugin.lang', $this->plugin_path);
-  }  */
   function var_template()
   {
@@ -34,34 +25,4 @@
    return $r;
   }
-  /*function remove_code($tlp_handle, $str_begin, $str_end)
-  {
-      global $template;
- 
-      $template->loadfile($tlp_handle);
- 
-      $p_beg = strpos($template->uncompiled_code[$tlp_handle], $str_begin);
-      $p_end = strpos($template->uncompiled_code[$tlp_handle], $str_end) + strlen($str_end);
-      $s = substr($template->uncompiled_code[$tlp_handle], $p_beg, $p_end - $p_beg);
- 
-      $template->uncompiled_code[$tlp_handle] = 
-      substr_replace($template->uncompiled_code[$tlp_handle], '', $p_beg, $p_end - $p_beg);
- 
-      return $s;
-  }
-  
-  function add_before_code($tlp_handle, $insert_before, $code)
-  {
-      global $template;
- 
-      $template->loadfile($tlp_handle);
-      $template->uncompiled_code[$tlp_handle] = str_replace($insert_before, $code.$insert_before, $template->uncompiled_code[$tlp_handle]);
-  } 
-  function add_after_code($tlp_handle, $insert_after, $code)
-  {
-    global $template;
- 
-    $template->loadfile($tlp_handle);
-    $template->uncompiled_code[$tlp_handle] = str_replace($insert_after, $insert_after.$code, $template->uncompiled_code[$tlp_handle]);
-  }*/
    function register_mp_menubar_blocks($menu_ref_arr) {
     $menu = & $menu_ref_arr[0];
@@ -70,5 +31,13 @@
     $menu->register_block(new RegisteredBlock('mbMusicPlayer', 'Music player', 'MP'));
   }
-
+  function placer_icon()
+  {
+	global $conf, $template;
+	$conf_plugin = explode("," , $conf['mp_plugin']);
+ 	 if (isset($conf_plugin)) {
+		$template->concat( 'PLUGIN_INDEX_ACTIONS',
+		  '<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>');
+	  }
+  }
 
   function placer_lien($menu_ref_arr)
@@ -76,14 +45,7 @@
 
 ///////////////////////[début de l'affichage lien]////////////////////
-    //$this->loading_lang();
 	
     global $lang, $conf, $template;
 	
-    /*$conf_plugin = explode("," , $conf['mp_plugin']);
-
-    $this->add_before_code('menubar','<!-- END quick_search -->','<ul>
-	<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>
-</ul>
-	');*/
 	
 	  $menu = & $menu_ref_arr[0];
Index: /extensions/music_player/main.inc.php
===================================================================
--- /extensions/music_player/main.inc.php	(revision 3499)
+++ /extensions/music_player/main.inc.php	(revision 3500)
@@ -27,9 +27,14 @@
 add_event_handler('get_admin_plugin_menu_links', array(&$m_p, 'mp_lien_menu') );
 
-//add_event_handler('loc_end_menubar', array(&$m_p, 'placer_lien'), 70 ); 
-//add_event_handler('blockmanager_apply', array(&$m_p, 'placer_lien'), 70 ); 
 
-add_event_handler('blockmanager_apply', array(&$m_p, 'placer_block'));
-add_event_handler('blockmanager_register_blocks', array(&$m_p, 'register_mp_menubar_blocks'));
+add_event_handler('loc_end_index', array(&$m_p, 'placer_icon') );
+
+global $conf;
+$conf_plugin = explode("," , $conf['mp_plugin']);
+if (isset($conf_plugin[0]) and $conf_plugin[0]=="true")
+{
+	add_event_handler('blockmanager_apply', array(&$m_p, 'placer_block'));
+	add_event_handler('blockmanager_register_blocks', array(&$m_p, 'register_mp_menubar_blocks'));
+}
 
 add_event_handler('loc_begin_page_header', array(&$m_p, 'add_css') );
Index: /extensions/music_player/template/admin.tpl
===================================================================
--- /extensions/music_player/template/admin.tpl	(revision 3499)
+++ /extensions/music_player/template/admin.tpl	(revision 3500)
@@ -51,5 +51,5 @@
 <form action="" method="post" name="option_plugin">
   <input type="checkbox" name="evidence" value="true" {$MP_EVIDENCE} />
-  {'mp_admin_2_opt1'|@translate}// !!Inactive option !! <br />
+  {'mp_admin_2_opt1'|@translate}<br />
   <input type="checkbox" name="head" value="true" {$MP_HEAD} />
   {'mp_admin_2_opt2'|@translate}<br />
Index: /extensions/music_player/template/block.tpl
===================================================================
--- /extensions/music_player/template/block.tpl	(revision 3499)
+++ /extensions/music_player/template/block.tpl	(revision 3500)
@@ -3,5 +3,5 @@
 #block_mp li a {literal}{{/literal}
 	display: block ;
-	background: transparent url({$PLG_path}/template/icon/fond1.png) left top no-repeat ;
+	background: transparent url({$PLG_path}/template/icon/fond_fus.png) left bottom no-repeat ;
 	padding: 4px ;
 	text-align: center ;
@@ -10,5 +10,5 @@
 	{literal}}{/literal}
 #block_mp li a:hover, #block_mp li a:focus, #block_mp li a:active {literal}{{/literal}
-	background: transparent url({$PLG_path}/template/icon/fond2.png) left top no-repeat ;
+	background: transparent url({$PLG_path}/template/icon/fond_fus.png) left top no-repeat ;
 	{literal}}{/literal}
 #block_mp li{literal}{{/literal}
