Index: extensions/Random_Header/admin.php
===================================================================
--- extensions/Random_Header/admin.php	(revision 10938)
+++ extensions/Random_Header/admin.php	(revision 10938)
@@ -0,0 +1,69 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $template,$conf;
+$me = get_plugin_data($plugin_id);
+include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
+
+// delete conf for deleted themes (but not for deactivated themes)
+foreach ($me->rh_config as $theme_in_rh_conf => $test) {
+	if (!file_exists($conf['themes_dir'].'/'.$theme_in_rh_conf.'/'.'themeconf.inc.php')) {
+		unset($me->rh_config[$theme_in_rh_conf]);
+	}
+}
+$me->save_config();
+
+
+
+$template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/admin/admin.tpl') );
+$template->assign("RH_VERSION",RH_VERSION);
+$template->assign("RH_confpanel",realpath( dirname(__FILE__).'/admin/rh_theme_conf.tpl'));
+$template->append('head_elements','<link rel="stylesheet" type="text/css" href="'.RH_PATH.'admin/admin.css" />');
+$rhthemes = new themes();
+$rh_vierge=0;
+
+foreach (get_pwg_themes() as  $pwg_templateID => $pwg_template) {
+	if (isset($_POST['submit'])) {
+		$me->rh_config[$pwg_templateID]['selected_cat'] 		= $_POST[$pwg_templateID.'selected_cat'];
+		$me->rh_config[$pwg_templateID]['active_on_picture'] 	= (isset( $_POST[$pwg_templateID.'active_on_picture'] )) ? $_POST[$pwg_templateID.'active_on_picture'] : 'off' ; 
+		$me->rh_config[$pwg_templateID]['concat_before'] 		= (isset( $_POST[$pwg_templateID.'concat_before'] )) ? $_POST[$pwg_templateID.'concat_before'] : 'off' ; 
+		$me->rh_config[$pwg_templateID]['concat_after'] 		= (isset( $_POST[$pwg_templateID.'concat_after'] )) ? $_POST[$pwg_templateID.'concat_after'] : 'off' ; 
+		$me->rh_config[$pwg_templateID]['head_css'] 			= $_POST[$pwg_templateID.'head_css']; 
+		$me->rh_config[$pwg_templateID]['img_css'] 				= $_POST[$pwg_templateID.'img_css']; 
+		$me->rh_config[$pwg_templateID]['mode_background'] 		= (isset( $_POST[$pwg_templateID.'mode_background'] )) ? $_POST[$pwg_templateID.'mode_background'] : 'off' ;
+		$me->rh_config[$pwg_templateID]['root_link'] 			= (isset( $_POST[$pwg_templateID.'root_link'] )) ? $_POST[$pwg_templateID.'root_link'] : 'off' ;
+		$me->save_config();
+		
+	}
+	
+	$rhscreenshot=(file_exists(PHPWG_THEMES_PATH.$pwg_templateID . '/screenshot.png')) ? PHPWG_THEMES_PATH.$pwg_templateID . '/screenshot.png' : PHPWG_ROOT_PATH.'admin/themes/'.$conf['admin_theme'].'/images/missing_screenshot.png';
+    $rhthemboxclass=($me->rh_config[$pwg_templateID]['selected_cat']!=0) ? 'themeDefault' : '';      
+	$rh_vierge=($me->rh_config[$pwg_templateID]['selected_cat']!=0) ? $rh_vierge+1 : $rh_vierge;
+	$template->append('rhthemes', array(
+				'CURRENT_THEME_NAME'=> $pwg_template,
+				'CURRENT_THEME_ID' 	=> $pwg_templateID,
+				'ACTIVE_ON_PICTURE' => ($me->rh_config[$pwg_templateID]['active_on_picture']=='on') ? 'checked' : '',
+				'MODE_BACKGROUND' 	=> ($me->rh_config[$pwg_templateID]['mode_background']=='on') ? 'checked' : '',
+				'CONCAT_BEFORE' 	=> ($me->rh_config[$pwg_templateID]['concat_before']=='on') ? 'checked' : '',
+				'CONCAT_AFTER' 		=> ($me->rh_config[$pwg_templateID]['concat_after']=='on') ? 'checked' : '',
+				'ROOT_LINK' 		=> ($me->rh_config[$pwg_templateID]['root_link']=='on') ? 'checked' : '',
+				'HEAD_CSS' 			=>  $me->rh_config[$pwg_templateID]['head_css'],
+				'IMG_CSS' 			=>  $me->rh_config[$pwg_templateID]['img_css'],
+				'CATSELECTED' 		=>  $me->rh_config[$pwg_templateID]['selected_cat'],
+				'SCREENSHOT_URL'	=>	$rhscreenshot,
+				'THEMEBOXCLASS'		=>	$rhthemboxclass
+				));
+}
+$template->assign('rh_vierge',$rh_vierge);
+display_select_cat_wrapper(
+	  'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE,
+	  array(),
+	  'categories'
+	  );
+	  
+load_language('plugin.lang', RH_PATH);
+
+  
+  
+$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
+?>
Index: extensions/Random_Header/admin/admin.css
===================================================================
--- extensions/Random_Header/admin/admin.css	(revision 10938)
+++ extensions/Random_Header/admin/admin.css	(revision 10938)
@@ -0,0 +1,30 @@
+.randomHeader_fieldset legend{color:#ff3363;font-weight:bold;}
+.rh_input{width:335px;}
+
+.black_overlay{
+	display: none;
+	position: absolute;
+	top: 0%;
+	left: 0%;
+	width: 100%;
+	height: 100%;
+	background-color: black;
+	z-index:1001;
+	-moz-opacity: 0.8;
+	opacity:.80;
+	filter: alpha(opacity=80);
+}
+ 
+.rhconfpanel {
+	display: none;
+	position: fixed;
+	min-width: 480px;
+	max-width: 71%;
+	top: 25%;
+	left: 25%;
+	padding: 6px;
+	border: 1px solid #444444;
+	background-color: #222222;
+	z-index:1002;
+	overflow: auto;
+}
Index: extensions/Random_Header/admin/admin.tpl
===================================================================
--- extensions/Random_Header/admin/admin.tpl	(revision 10938)
+++ extensions/Random_Header/admin/admin.tpl	(revision 10938)
@@ -0,0 +1,39 @@
+<div class="titrePage"><h2>Random Header {$RH_VERSION}</h2></div>
+<p>{'rh_description'|@translate}</p>
+<p><i>{'rh_aide'|@translate}</i></p>
+<form method="post" action="" class="properties">
+  
+  
+<div id="themesContent">
+{if $rh_vierge!=0}
+	<fieldset>
+		<legend>{'rh_active_conf'|@translate}</legend>
+		
+		<div class="themeBoxes">
+		{foreach from=$rhthemes item=i}
+			{if $i.CATSELECTED!=0}
+				{include file="$RH_confpanel"}
+			{/if}
+		{/foreach}
+		</div> <!-- themeBoxes -->
+	</fieldset>
+{/if}	
+
+	<fieldset>
+		<legend>{'rh_inactive_conf'|@translate} : </legend>
+		
+		<div class="themeBoxes">
+		{foreach from=$rhthemes item=i}
+			{if $i.CATSELECTED==0}
+				{include file="$RH_confpanel"}
+			{/if}
+		{/foreach}
+		</div> <!-- themeBoxes -->
+	</fieldset>
+	
+</div> <!-- themesContent -->
+ 
+<div id="fade" class="black_overlay"></div> 
+ 
+<div style="text-align:center;clear:left"><input class="submit" type="submit" value="{'rh_submit'|@translate}" name="submit" ></div>
+</form>
Index: extensions/Random_Header/admin/rh_admin.css
===================================================================
--- extensions/Random_Header/admin/rh_admin.css	(revision 7954)
+++ 	(revision )
@@ -1,30 +1,0 @@
-.randomHeader_fieldset legend{color:#ff3363;font-weight:bold;}
-.rh_input{width:335px;}
-
-.black_overlay{
-	display: none;
-	position: absolute;
-	top: 0%;
-	left: 0%;
-	width: 100%;
-	height: 100%;
-	background-color: black;
-	z-index:1001;
-	-moz-opacity: 0.8;
-	opacity:.80;
-	filter: alpha(opacity=80);
-}
- 
-.rhconfpanel {
-	display: none;
-	position: fixed;
-	min-width: 480px;
-	max-width: 71%;
-	top: 25%;
-	left: 25%;
-	padding: 6px;
-	border: 1px solid #444444;
-	background-color: #222222;
-	z-index:1002;
-	overflow: auto;
-}
Index: extensions/Random_Header/admin/rh_admin.php
===================================================================
--- extensions/Random_Header/admin/rh_admin.php	(revision 7954)
+++ 	(revision )
@@ -1,69 +1,0 @@
-<?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-global $template,$conf;
-$me = get_plugin_data($plugin_id);
-include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
-
-// delete conf for deleted themes (but not for deactivated themes)
-foreach ($me->rh_config as $theme_in_rh_conf => $test) {
-	if (!file_exists($conf['themes_dir'].'/'.$theme_in_rh_conf.'/'.'themeconf.inc.php')) {
-		unset($me->rh_config[$theme_in_rh_conf]);
-	}
-}
-$me->save_config();
-
-
-
-$template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/rh_admin.tpl') );
-$template->assign("RH_VERSION",RH_VERSION);
-$template->assign("RH_confpanel",realpath( dirname(__FILE__).'/rh_theme_conf.tpl'));
-$template->append('head_elements','<link rel="stylesheet" type="text/css" href="'.RH_PATH.'admin/rh_admin.css" />');
-$rhthemes = new themes();
-$rh_vierge=0;
-
-foreach (get_pwg_themes() as  $pwg_templateID => $pwg_template) {
-	if (isset($_POST['submit'])) {
-		$me->rh_config[$pwg_templateID]['selected_cat'] 		= $_POST[$pwg_templateID.'selected_cat'];
-		$me->rh_config[$pwg_templateID]['active_on_picture'] 	= (isset( $_POST[$pwg_templateID.'active_on_picture'] )) ? $_POST[$pwg_templateID.'active_on_picture'] : 'off' ; 
-		$me->rh_config[$pwg_templateID]['concat_before'] 		= (isset( $_POST[$pwg_templateID.'concat_before'] )) ? $_POST[$pwg_templateID.'concat_before'] : 'off' ; 
-		$me->rh_config[$pwg_templateID]['concat_after'] 		= (isset( $_POST[$pwg_templateID.'concat_after'] )) ? $_POST[$pwg_templateID.'concat_after'] : 'off' ; 
-		$me->rh_config[$pwg_templateID]['head_css'] 			= $_POST[$pwg_templateID.'head_css']; 
-		$me->rh_config[$pwg_templateID]['img_css'] 				= $_POST[$pwg_templateID.'img_css']; 
-		$me->rh_config[$pwg_templateID]['mode_background'] 		= (isset( $_POST[$pwg_templateID.'mode_background'] )) ? $_POST[$pwg_templateID.'mode_background'] : 'off' ;
-		$me->rh_config[$pwg_templateID]['root_link'] 			= (isset( $_POST[$pwg_templateID.'root_link'] )) ? $_POST[$pwg_templateID.'root_link'] : 'off' ;
-		$me->save_config();
-		
-	}
-	
-	$rhscreenshot=(file_exists(PHPWG_THEMES_PATH.$pwg_templateID . '/screenshot.png')) ? PHPWG_THEMES_PATH.$pwg_templateID . '/screenshot.png' : PHPWG_ROOT_PATH.'admin/themes/'.$conf['admin_theme'].'/images/missing_screenshot.png';
-    $rhthemboxclass=($me->rh_config[$pwg_templateID]['selected_cat']!=0) ? 'themeDefault' : '';      
-	$rh_vierge=($me->rh_config[$pwg_templateID]['selected_cat']!=0) ? $rh_vierge+1 : $rh_vierge;
-	$template->append('rhthemes', array(
-				'CURRENT_THEME_NAME'=> $pwg_template,
-				'CURRENT_THEME_ID' 	=> $pwg_templateID,
-				'ACTIVE_ON_PICTURE' => ($me->rh_config[$pwg_templateID]['active_on_picture']=='on') ? 'checked' : '',
-				'MODE_BACKGROUND' 	=> ($me->rh_config[$pwg_templateID]['mode_background']=='on') ? 'checked' : '',
-				'CONCAT_BEFORE' 	=> ($me->rh_config[$pwg_templateID]['concat_before']=='on') ? 'checked' : '',
-				'CONCAT_AFTER' 		=> ($me->rh_config[$pwg_templateID]['concat_after']=='on') ? 'checked' : '',
-				'ROOT_LINK' 		=> ($me->rh_config[$pwg_templateID]['root_link']=='on') ? 'checked' : '',
-				'HEAD_CSS' 			=>  $me->rh_config[$pwg_templateID]['head_css'],
-				'IMG_CSS' 			=>  $me->rh_config[$pwg_templateID]['img_css'],
-				'CATSELECTED' 		=>  $me->rh_config[$pwg_templateID]['selected_cat'],
-				'SCREENSHOT_URL'	=>	$rhscreenshot,
-				'THEMEBOXCLASS'		=>	$rhthemboxclass
-				));
-}
-$template->assign('rh_vierge',$rh_vierge);
-display_select_cat_wrapper(
-	  'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE,
-	  array(),
-	  'categories'
-	  );
-	  
-load_language('plugin.lang', RH_PATH);
-
-  
-  
-$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
-?>
Index: extensions/Random_Header/admin/rh_admin.tpl
===================================================================
--- extensions/Random_Header/admin/rh_admin.tpl	(revision 7954)
+++ 	(revision )
@@ -1,39 +1,0 @@
-<div class="titrePage"><h2>Random Header {$RH_VERSION}</h2></div>
-<p>{'rh_description'|@translate}</p>
-<p><i>{'rh_aide'|@translate}</i></p>
-<form method="post" action="" class="properties">
-  
-  
-<div id="themesContent">
-{if $rh_vierge!=0}
-	<fieldset>
-		<legend>{'rh_active_conf'|@translate}</legend>
-		
-		<div class="themeBoxes">
-		{foreach from=$rhthemes item=i}
-			{if $i.CATSELECTED!=0}
-				{include file="$RH_confpanel"}
-			{/if}
-		{/foreach}
-		</div> <!-- themeBoxes -->
-	</fieldset>
-{/if}	
-
-	<fieldset>
-		<legend>{'rh_inactive_conf'|@translate} : </legend>
-		
-		<div class="themeBoxes">
-		{foreach from=$rhthemes item=i}
-			{if $i.CATSELECTED==0}
-				{include file="$RH_confpanel"}
-			{/if}
-		{/foreach}
-		</div> <!-- themeBoxes -->
-	</fieldset>
-	
-</div> <!-- themesContent -->
- 
-<div id="fade" class="black_overlay"></div> 
- 
-<div style="text-align:center;clear:left"><input class="submit" type="submit" value="{'rh_submit'|@translate}" name="submit" ></div>
-</form>
Index: extensions/Random_Header/main.inc.php
===================================================================
--- extensions/Random_Header/main.inc.php	(revision 7954)
+++ extensions/Random_Header/main.inc.php	(revision 10938)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: Random Header
-Version: 2.1.2
+Version: 2.2
 Description: Random Header allow you to show in the header a random picture from the choosen categorie, as a normal image, or as a background
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=188
@@ -10,5 +10,5 @@
 
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-DEFINE('RH_VERSION','v2.1.2');
+DEFINE('RH_VERSION','v2.2');
 define('RH_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
 
@@ -57,5 +57,5 @@
 		array_push($menu,array(
 				'NAME' => 'Random Header',
-				'URL'  => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/rh_admin.php')));
+				'URL'  =>  get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__))));
 		return $menu;
 	}
@@ -77,9 +77,9 @@
 
 				if ($this->rh_config[$usertheme]['mode_background']=='on') {
-					$template->append('head_elements','<style>#theHeader{background: url('.$toto[0].') no-repeat;'. $this->rh_config[$usertheme]['head_css'] .'}</style>');
+					$template->append('head_elements','<style type="text/css">#theHeader{background: url('.$toto[0].') no-repeat;'. $this->rh_config[$usertheme]['head_css'] .'}</style>');
 				}
 				else {
 					if ($this->rh_config[$usertheme]['img_css']!='' || $this->rh_config[$usertheme]['head_css']!='')
-						$template->append('head_elements','<style>#theHeader{'. $this->rh_config[$usertheme]['head_css'] .'}#theHeader #RandomImage{'. $this->rh_config[$usertheme]['img_css'] .'}</style>');
+						$template->append('head_elements','<style type="text/css">#theHeader{'. $this->rh_config[$usertheme]['head_css'] .'}#theHeader #RandomImage{'. $this->rh_config[$usertheme]['img_css'] .'}</style>');
 					$page['page_banner'] = ($this->rh_config[$usertheme]['concat_before']=='on') ? $conf['page_banner'] : '';
 					$page['page_banner'].= ($this->rh_config[$usertheme]['root_link']=='on') ? '<a href="'.PHPWG_ROOT_PATH.'" title="'.l10n('Home').'">'	: '';
