Index: /extensions/Media_Icon/admin.php
===================================================================
--- /extensions/Media_Icon/admin.php	(revision 19325)
+++ /extensions/Media_Icon/admin.php	(revision 19325)
@@ -0,0 +1,44 @@
+<?php
+//Chech whether we are indeed included by Piwigo.
+if (!defined('MEDIA_ICON_PATH')) die('Hacking attempt!');
+
+//Load globals
+global $conf, $page;
+
+//Library for tabs
+include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
+
+//Load translation files
+load_language('plugin.lang', MEDIA_ICON_PATH);
+
+//Check access and exit when user status is not ok
+check_status(ACCESS_ADMINISTRATOR);
+
+//Initialization
+$my_base_url = get_admin_plugin_menu_link(__FILE__);
+
+//Tab management
+if (!isset($_GET['tab']))
+    $page['tab'] = 'general';
+else
+    $page['tab'] = $_GET['tab'];
+
+$tabsheet = new tabsheet();
+$tabsheet->add('general',
+               l10n('General'),
+               $my_base_url.'&amp;tab=general');
+$tabsheet->add('advanced',
+               l10n('Advanced options'),
+               $my_base_url.'&amp;tab=advanced');
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
+
+switch ($page['tab']) {
+	case 'advanced':
+		include_once(dirname(__FILE__).'/admin/admin_advanced.php');
+		break;
+	default:
+		include_once(dirname(__FILE__).'/admin/admin_general.php');
+		break;
+}
+?>
Index: tensions/Media_Icon/admin/admin.php
===================================================================
--- /extensions/Media_Icon/admin/admin.php	(revision 19324)
+++ 	(revision )
@@ -1,44 +1,0 @@
-<?php
-//Chech whether we are indeed included by Piwigo.
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-//Load globals
-global $conf, $page;
-
-//Library for tabs
-include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
-
-//Load translation files
-load_language('plugin.lang', MEDIA_ICON_PATH);
-
-//Check access and exit when user status is not ok
-check_status(ACCESS_ADMINISTRATOR);
-
-//Initialization
-$my_base_url = get_admin_plugin_menu_link(__FILE__);
-
-//Tab management
-if (!isset($_GET['tab']))
-    $page['tab'] = 'general';
-else
-    $page['tab'] = $_GET['tab'];
-
-$tabsheet = new tabsheet();
-$tabsheet->add('general',
-               l10n('General'),
-               $my_base_url.'&amp;tab=general');
-$tabsheet->add('advanced',
-               l10n('Advanced options'),
-               $my_base_url.'&amp;tab=advanced');
-$tabsheet->select($page['tab']);
-$tabsheet->assign();
-
-switch ($page['tab']) {
-	case 'advanced':
-		include_once(dirname(__FILE__).'/admin_advanced.php');
-		break;
-	default:
-		include_once(dirname(__FILE__).'/admin_general.php');
-		break;
-}
-?>
Index: /extensions/Media_Icon/main.inc.php
===================================================================
--- /extensions/Media_Icon/main.inc.php	(revision 19324)
+++ /extensions/Media_Icon/main.inc.php	(revision 19325)
@@ -13,4 +13,5 @@
 define('MEDIA_ICON_DIR' , basename(dirname(__FILE__)));
 define('MEDIA_ICON_PATH' , PHPWG_PLUGINS_PATH.MEDIA_ICON_DIR.'/');
+define('MEDIA_ICON_ADMIN',   get_root_url() . 'admin.php?page=plugin-media_icon');
 
 /* +-----------------------------------------------------------------------+
@@ -25,5 +26,5 @@
 		$menu, array(
 			'NAME'  => 'Media Icon',
-			'URL'   => get_admin_plugin_menu_link(dirname(__FILE__)).'/admin/admin.php',
+			'URL'   => MEDIA_ICON_ADMIN,
 		)
 	);      
Index: /extensions/Media_Icon/thumbnails.php
===================================================================
--- /extensions/Media_Icon/thumbnails.php	(revision 19324)
+++ /extensions/Media_Icon/thumbnails.php	(revision 19325)
@@ -1,3 +1,4 @@
 <?php
+add_event_handler('loc_end_page_header', 'media_icon_thumbnails_css');
 add_event_handler('loc_end_index_thumbnails', 'media_icon_thumbnails');
 
@@ -6,6 +7,4 @@
 
 	$conf_media_icon_advanced = unserialize($conf['media_icon_advanced']);
-	
-	add_event_handler('loc_end_page_header', 'media_icon_thumbnails_css');
 	
 	$template->set_prefilter('index_thumbnails', 'media_icon_prefilter_thumbnails');
