Index: /extensions/ContestResults/admin.php
===================================================================
--- /extensions/ContestResults/admin.php	(revision 9974)
+++ /extensions/ContestResults/admin.php	(revision 9975)
@@ -1,4 +1,8 @@
 <?php
 if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+if (is_string($conf['ContestResults'])) {
+	$conf['ContestResults'] = unserialize($conf['ContestResults']);
+}
 
 // +-----------------------------------------------------------------------+
Index: /extensions/ContestResults/admin/config.php
===================================================================
--- /extensions/ContestResults/admin/config.php	(revision 9974)
+++ /extensions/ContestResults/admin/config.php	(revision 9975)
@@ -17,4 +17,5 @@
 		'menubar_block' => array(
 			'number' => $_POST['menubar_block_number'],
+			'display_days' => (isset($_POST['menubar_block_display_days'])) ? 1 : 0,
 		),
 		'truncate_summary' => $_POST['truncate_summary'],
@@ -34,4 +35,5 @@
 	'LINK_SPECIALS' => ($conf['ContestResults']['menubar_link']['specials']) ? 'checked="checked"' : '',
 	'BLOCK_NUMBER' => $conf['ContestResults']['menubar_block']['number'],
+	'BLOCK_DISPLAY_DAYS' => ($conf['ContestResults']['menubar_block']['display_days']) ? 'checked="checked"' : '',
 	'TRUNCATE_SUMMARY' => $conf['ContestResults']['truncate_summary'],
 ));
Index: /extensions/ContestResults/admin/get_tn.php
===================================================================
--- /extensions/ContestResults/admin/get_tn.php	(revision 9974)
+++ /extensions/ContestResults/admin/get_tn.php	(revision 9975)
@@ -1,4 +1,4 @@
 <?php
-define('PHPWG_ROOT_PATH','../../../');
+define('PHPWG_ROOT_PATH','./../../../');
 define('IN_ADMIN', true);
 include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
@@ -9,6 +9,4 @@
 
 if (!pwg_db_num_rows($image)) {
-	//$themeconf = $template->get_template_vars('themeconf');
-	//$data['TN_SRC'] = $themeconf['admin_icon_dir'] . '/errors.png';
 	$data['TN_SRC'] = 'admin/themes/default/icon/errors.png';
 	$data['IMAGE_NAME'] = 'N/A';
Index: /extensions/ContestResults/admin/manage.php
===================================================================
--- /extensions/ContestResults/admin/manage.php	(revision 9974)
+++ /extensions/ContestResults/admin/manage.php	(revision 9975)
@@ -33,5 +33,5 @@
 
 	$template->append('contests_'.$contest['status'], array(
-		'NAME' => trigger_event('render_CR_content', $contest['name']),
+		'NAME' => trigger_event('render_category_name', $contest['name']),
 		'VISIBLE' => $contest['visible'],
 		'DATE_BEGIN' => format_date($contest['date_begin']),
@@ -41,5 +41,5 @@
 		'U_EDIT' => CR_ADMIN . '-edit&amp;contest_id=' . $contest['id'],
 		'U_DELETE' => CR_ADMIN . '-manage&amp;delete_contest=' . $contest['id'],
-		'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_CR_content', $contest['name'])),
+		'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_category_name', $contest['name'])),
 		'DAYS' => $contest['days'],
 	));
Index: /extensions/ContestResults/admin/new.php
===================================================================
--- /extensions/ContestResults/admin/new.php	(revision 9974)
+++ /extensions/ContestResults/admin/new.php	(revision 9975)
@@ -19,5 +19,5 @@
 			
 		// Modification d'un concours
-		if (isset($_GET['contest_id']) AND get_contest_name($_GET['contest_id'])) {	
+		if (isset($_GET['contest_id'])) {	
 			pwg_query("UPDATE " . CR_TABLE_1 . " SET
 				`name` = '" . $_POST['name'] ."',
@@ -74,4 +74,8 @@
 //				Définition des variables template
 // +-----------------------------------------------------------------------+	
+if (isset($_GET['contest_id']) AND !get_contest_name($_GET['contest_id'])) {
+	redirect(CR_ADMIN .'-new');
+}
+
 // Formulaire incomplet
 if ($page['errors']) {
@@ -99,5 +103,5 @@
 
 // Edition d'un concours
-} else if (isset($_GET['contest_id']) AND get_contest_name($_GET['contest_id'])) {
+} else if (isset($_GET['contest_id'])) {
 	$query = "SELECT * FROM " . CR_TABLE_1 . " WHERE id = " . $_GET['contest_id'] . ";";
 	$contest = pwg_db_fetch_assoc(pwg_query($query));
Index: /extensions/ContestResults/admin/results.php
===================================================================
--- /extensions/ContestResults/admin/results.php	(revision 9974)
+++ /extensions/ContestResults/admin/results.php	(revision 9975)
@@ -11,31 +11,33 @@
 	$_DUPLICATE = array();
 	
-	foreach ($_POST['results'] AS $i => $data) {
-		if (!in_array($data['image_id'], $registered_ids)) {
-			$registered_ids[] = $data['image_id'];
+	if (isset($_POST['results'])) {
+		foreach ($_POST['results'] AS $i => $data) {
+			if (!in_array($data['image_id'], $registered_ids)) {
+				$registered_ids[] = $data['image_id'];
+				
+				pwg_query("INSERT INTO " . CR_TABLE_2 . "
+					(
+						image_id, 
+						contest_id, 
+						rank,
+						comment, 
+						author
+					)
+					VALUES(
+						'" . $data['image_id'] ."',
+						'" . $_GET['contest_id'] ."',
+						'" . $data['rank'] ."',
+						'" . $data['comment'] ."',
+						'" . $data['author'] . "'
+					);");
 			
-			pwg_query("INSERT INTO " . CR_TABLE_2 . "
-				(
-					image_id, 
-					contest_id, 
-					rank,
-					comment, 
-					author
-				)
-				VALUES(
-					'" . $data['image_id'] ."',
-					'" . $_GET['contest_id'] ."',
-					'" . $data['rank'] ."',
-					'" . $data['comment'] ."',
-					'" . $data['author'] . "'
-				);");
-		
-		} else {
-			$_DUPLICATE[] = $data;
+			} else {
+				$_DUPLICATE[] = $data;
+			}
 		}
 	}
 	
 	if (isset($_GET['redirect']) AND $_GET['redirect'] == 'page') {
-		redirect(CR_PUBLIC . $_GET['contest_id'] . '-' . str2url(trigger_event('render_CR_content', get_contest_name($_GET['contest_id']))) . '#results');
+		redirect(CR_PUBLIC . $_GET['contest_id'] . '-' . str2url(trigger_event('render_category_name', get_contest_name($_GET['contest_id']))) . '#results');
 	} else if (!isset($_DUPLICATE)) {
 		$page['infos'][] = l10n('CR_results_saved');
@@ -56,5 +58,5 @@
 
 	$template->assign(array(
-		'NAME' => trigger_event('render_CR_content', $contest['name']),
+		'NAME' => trigger_event('render_category_name', $contest['name']),
 		'CONTEST_ID' => $_GET['contest_id']
 	));
@@ -108,6 +110,5 @@
 		
 		if (!pwg_db_num_rows($image)) {
-			$themeconf = $template->get_template_vars('themeconf');
-			$data['TN_SRC'] = $themeconf['admin_icon_dir'] . '/errors.png';
+			$data['TN_SRC'] = 'admin/themes/default/icon/errors.png';
 			$data['IMAGE_NAME'] = 'N/A';
 			$data['ERROR'] = true;
Index: /extensions/ContestResults/admin/template/config.tpl
===================================================================
--- /extensions/ContestResults/admin/template/config.tpl	(revision 9974)
+++ /extensions/ContestResults/admin/template/config.tpl	(revision 9975)
@@ -64,4 +64,8 @@
 				<td><input type="text" size="2" name="menubar_block_number" value="{$BLOCK_NUMBER}"/></td>
 			</tr>
+			<tr>
+				<td><span class="title">{'CR_menubar_block_display_days'|@translate}</span></td>
+				<td><input type="checkbox" name="menubar_block_display_days" value="true" {$BLOCK_DISPLAY_DAYS}/></td>
+			</tr>
 		</table>
 	</fieldset>
Index: /extensions/ContestResults/admin/template/image/index.php
===================================================================
--- /extensions/ContestResults/admin/template/image/index.php	(revision 9975)
+++ /extensions/ContestResults/admin/template/image/index.php	(revision 9975)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/ContestResults/admin/template/new.tpl
===================================================================
--- /extensions/ContestResults/admin/template/new.tpl	(revision 9974)
+++ /extensions/ContestResults/admin/template/new.tpl	(revision 9975)
@@ -1,5 +1,4 @@
-{combine_script id='jquery.ui' 			require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js'}
-{combine_script id='jquery.ui.sortable' require='jquery' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js'}
-{combine_script id='jquery.cluetip' 	require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'}
+{combine_script id='jquery.ui.sortable'}
+{combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'}
 
 {combine_css path=$CR_PATH|@cat:'admin/template/style.css'}
@@ -115,7 +114,7 @@
 			<tr>
 				<td><span class="title">{'CR_dateB'|@translate}</span></td>
-				<td><input type="text" size="11" maxlength="10" value="{$DATE_BEGIN}" id="DateBegin" class="inputdate" name="date_begin"/></td>
+				<td><input type="text" maxlength="10" value="{$DATE_BEGIN}" id="DateBegin" class="inputdate" name="date_begin"/></td>
 				<td><span class="title">{'CR_dateE'|@translate}</span></td>
-				<td><input type="text" size="11" maxlength="10" value="{$DATE_END}" id="DateEnd" class="inputdate" name="date_end"/></td>
+				<td><input type="text" maxlength="10" value="{$DATE_END}" id="DateEnd" class="inputdate" name="date_end"/></td>
 			</tr>
 
Index: /extensions/ContestResults/admin/template/results.tpl
===================================================================
--- /extensions/ContestResults/admin/template/results.tpl	(revision 9974)
+++ /extensions/ContestResults/admin/template/results.tpl	(revision 9975)
@@ -1,6 +1,5 @@
-{combine_script id='jquery.ui' 			require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js'}
-{combine_script id='jquery.ui.sortable' require='jquery' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js'}
-{combine_script id='jquery.cluetip' 	require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'}
-{combine_script id='jquery.vtip' 		require='jquery' path=$CR_PATH|@cat:'admin/template/vtip.js'}
+{combine_script id='jquery.ui.sortable'}
+{combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'}
+{combine_script id='jquery.vtip' require='jquery' path=$CR_PATH|@cat:'admin/template/vtip.js'}
 
 {combine_css path=$CR_PATH|@cat:'admin/template/style.css'}
@@ -51,9 +50,9 @@
 	// MET A JOUR LA PREVISUALISATION DE L'IMAGE
 	function UpdatePreview(image_id, input){ldelim}
-		$.get("{$CR_PATH}admin/get_tn.php", {ldelim}image_id: input.value},
+		jQuery.get("{$CR_PATH}admin/get_tn.php", {ldelim}image_id: input.value},
 			function success(data){ldelim}
-				document.getElementById('preview-'+image_id).innerHTML = '<span class="vtip" title="'+ data + '">'+
+				jQuery('#preview-'+image_id).html('<span class="vtip" title="'+ data + '">'+
 						'<img src="{$CR_PATH}admin/template/image/images.png"/>'+
-					'</span>';
+					'</span>');
 				vtip();
 			}
Index: /extensions/ContestResults/admin/template/style.css
===================================================================
--- /extensions/ContestResults/admin/template/style.css	(revision 9974)
+++ /extensions/ContestResults/admin/template/style.css	(revision 9975)
@@ -39,4 +39,5 @@
 	background-repeat:no-repeat;
 	background-position:center right;
+	width:85px;
 }
 
@@ -79,2 +80,5 @@
 	font-weight:normal;
 }
+.titrePage {
+	clear:right;
+}
Index: /extensions/ContestResults/include/compatibility.inc.php
===================================================================
--- /extensions/ContestResults/include/compatibility.inc.php	(revision 9974)
+++ /extensions/ContestResults/include/compatibility.inc.php	(revision 9975)
@@ -70,4 +70,5 @@
 if (!isset($conf['ContestResults']['truncate_summary'])) {
 	$conf['ContestResults']['truncate_summary'] = 350;
+	$conf['ContestResults']['menubar_bloc']['display_days'] = true;
 	pwg_query("UPDATE " . CONFIG_TABLE . " SET value='" . serialize($conf['ContestResults']) . "' WHERE param = 'ContestResults';");
 }
Index: /extensions/ContestResults/include/cr_comment_picture.php
===================================================================
--- /extensions/ContestResults/include/cr_comment_picture.php	(revision 9974)
+++ /extensions/ContestResults/include/cr_comment_picture.php	(revision 9975)
@@ -29,5 +29,5 @@
 		
 		// Lien vers le concours
-		$result['contest_name'] = trigger_event('render_CR_content', $result['contest_name']);
+		$result['contest_name'] = trigger_event('render_category_name', $result['contest_name']);
 		$result['contest_link'] = CR_PUBLIC . $result['contest_id'] . '-' . str2url($result['contest_name']);
 		
@@ -35,5 +35,5 @@
 		$comment .= '<div class="CR_comment">
 			<b><a href="' . $result['contest_link'] .'">' . $result['contest_name'] . '</a></b> :: <u>' . $result['rank'] . ' ' . l10n('CR_place') . '</u>
-			<p>' . trigger_event('render_CR_content', $result['comment']) . '</p>
+			<p>' . trigger_event('render_category_name', $result['comment']) . '</p>
 		</div>';
 		
Index: /extensions/ContestResults/include/cr_main.php
===================================================================
--- /extensions/ContestResults/include/cr_main.php	(revision 9974)
+++ /extensions/ContestResults/include/cr_main.php	(revision 9975)
@@ -23,5 +23,5 @@
 		$item =  array(
 			'ID' => $contest['id'],
-			'NAME' => trigger_event('render_CR_content', $contest['name']),
+			'NAME' => trigger_event('render_element_name', $contest['name']),
 			'VISIBLE' => $contest['visible'],
 			'STATUS' => $contest['status'],
@@ -29,6 +29,6 @@
 			'DATE_BEGIN' => format_date($contest['date_begin']),
 			'LOGO' => $contest['logo'],
-			'SUMMARY' => CR_cut_string(trigger_event('render_CR_content', $contest['summary']), $conf['ContestResults']['truncate_summary']),
-			'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_CR_content', $contest['name'])),
+			'SUMMARY' => CR_cut_string(trigger_event('render_category_name', $contest['summary']), $conf['ContestResults']['truncate_summary']),
+			'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_category_name', $contest['name'])),
 			'DAYS' => $contest['days'],
 		);
Index: /extensions/ContestResults/include/cr_menubar.php
===================================================================
--- /extensions/ContestResults/include/cr_menubar.php	(revision 9974)
+++ /extensions/ContestResults/include/cr_menubar.php	(revision 9975)
@@ -26,4 +26,8 @@
 	$menu = &$menu_ref_arr[0];
 	
+	if (is_string($conf['ContestResults'])) {
+		$conf['ContestResults'] = unserialize($conf['ContestResults']);
+	}
+	
 	// Block Contest - un nouveau bloc dans le menu
 	if (($block = $menu->get_block('mbContestResults')) != null) {
@@ -46,10 +50,10 @@
 			if (($contest['visible'] OR is_admin()) AND $m < $conf['ContestResults']['menubar_block']['number']) {
 				array_push($data, array(
-					'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_CR_content', $contest['name'])),
-					'LABEL' => trigger_event('render_CR_content', $contest['name']),
+					'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_category_name', $contest['name'])),
+					'LABEL' => trigger_event('render_category_name', $contest['name']),
 					'DATE' => format_date($contest['date_begin']) . ' - ' . format_date($contest['date_end']),
 					'VISIBLE' => $contest['visible'],
 					'STATUS' => $contest['status'],
-					'DAYS' => $contest['days'],
+					'DAYS' => $conf['ContestResults']['menubar_block']['display_days'] ? $contest['days'] : null,
 				));
 			}
Index: /extensions/ContestResults/include/cr_page.php
===================================================================
--- /extensions/ContestResults/include/cr_page.php	(revision 9974)
+++ /extensions/ContestResults/include/cr_page.php	(revision 9975)
@@ -22,5 +22,5 @@
 $template->assign(array(
 	'ID' => $contest['id'],
-	'NAME' => trigger_event('render_CR_content', $contest['name']),
+	'NAME' => trigger_event('render_category_name', $contest['name']),
 	'VISIBLE' => $contest['visible'],
 	'STATUS' => $contest['status'],
@@ -29,5 +29,5 @@
 	'LOGO' => $contest['logo'],
 	'BANNER' => $contest['banner'],
-	'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_CR_content', $contest['name'])),
+	'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_category_name', $contest['name'])),
 	'DAYS' => $contest['days'],
 ));
@@ -38,6 +38,6 @@
 	foreach ($contest['description'] as $desc) {
 		$template->append('description', array(
-			'NAME' => trigger_event('render_CR_content', stripslashes($desc['name'])),
-			'CONTENT' => trigger_event('render_CR_content', stripslashes($desc['content'])),
+			'NAME' => trigger_event('render_category_name', stripslashes($desc['name'])),
+			'CONTENT' => trigger_event('render_category_name', stripslashes($desc['content'])),
 		));
 	}
@@ -90,5 +90,5 @@
 				'IMAGE_URL' => $image['url'],
 				'IMAGE_NAME' => (empty($image['name'])) ? get_name_from_file($image['file']) : $image['name'],
-				'COMMENT' => CR_cut_string(trigger_event('render_CR_content', $result['comment']), 450),
+				'COMMENT' => CR_cut_string(trigger_event('render_category_name', $result['comment']), 450),
 			);
 		}else{
Index: /extensions/ContestResults/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/ContestResults/language/en_UK/plugin.lang.php	(revision 9974)
+++ /extensions/ContestResults/language/en_UK/plugin.lang.php	(revision 9975)
@@ -1,3 +1,4 @@
 <?php
+global $pwg_loaded_plugins;
 
 /* général */
@@ -52,9 +53,10 @@
 
 /* config */
-$lang['CR_menubar_mode'] = 'Add Contest Results to the menu';
+$lang['CR_menubar_mode'] = 'Add ContestResults to the menu';
 $lang['CR_menubar_link'] = 'Add a link to a existing menu-block';
 $lang['CR_menubar_link_display'] = 'Display the link in the following blocks';
 $lang['CR_menubar_block'] = 'New menu block';
-$lang['CR_menubar_block_number'] = 'Quantity of contests to display in the block';
+$lang['CR_menubar_block_number'] = 'Number of contests to display in the block';
+$lang['CR_menubar_block_display_days'] = 'Display the status of the contest';
 $lang['CR_truncate_summary'] = "Truncate the summary of the contest after x characters";
 
@@ -64,5 +66,5 @@
 
 /* cluetip */
-$lang['CR_help_lang'] = (CR_ED_STATE == 'active') ? "<b>You can use HTML and multilanguage descriptions.</b>" : "<b>You can use HTML.</b>";
+$lang['CR_help_lang'] = isset($pwg_loaded_plugins['ExtendedDescription']) ? "<b>You can use HTML and multilanguage descriptions.</b>" : "<b>You can use HTML.</b>";
 $lang['CR_help_title'] = "" . $lang['CR_help_lang'];
 $lang['CR_help_status'] = "When the contest is <i>Finished</i> the results are displayed on the contest page and the marker <span style='color:#a00;'>(Finished)</span> is activated.<br/>
Index: /extensions/ContestResults/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/ContestResults/language/es_ES/plugin.lang.php	(revision 9974)
+++ /extensions/ContestResults/language/es_ES/plugin.lang.php	(revision 9975)
@@ -1,3 +1,4 @@
 <?php
+global $pwg_loaded_plugins;
 
 /* général */
@@ -57,4 +58,5 @@
 $lang['CR_menubar_block'] = 'Nuevo bloque menú';
 $lang['CR_menubar_block_number'] = 'Número de Concursos para mostrar en el bloque';
+$lang['CR_menubar_block_display_days'] = 'Display the status of the contest';
 $lang['CR_truncate_summary'] = "Truncate the summary of the contest after x characters";
 
@@ -64,5 +66,5 @@
 
 /* cluetip */
-$lang['CR_help_lang'] = (CR_ED_STATE == 'active') ? "<b>Puede usar HTML y descripciones multilingüe.</b>" : "<b>Puede usar HTML.</b>";
+$lang['CR_help_lang'] = isset($pwg_loaded_plugins['ExtendedDescription']) ? "<b>Puede usar HTML y descripciones multilingüe.</b>" : "<b>Puede usar HTML.</b>";
 $lang['CR_help_title'] = "" .$lang['CR_help_lang'];
 $lang['CR_help_status'] = "Cuando el concurso se <i>Termina</i> los resultados se publican en la página del concurso y el indicador <span style='color:#a00;'>(Terminado)</span> se activa.<br/>
Index: /extensions/ContestResults/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/ContestResults/language/fr_FR/plugin.lang.php	(revision 9974)
+++ /extensions/ContestResults/language/fr_FR/plugin.lang.php	(revision 9975)
@@ -1,3 +1,4 @@
 <?php
+global $pwg_loaded_plugins;
 
 /* général */
@@ -52,9 +53,10 @@
 
 /* config */
-$lang['CR_menubar_mode'] = 'Intégrer Contest Results au menu';
+$lang['CR_menubar_mode'] = 'Intégrer ContestResults au menu';
 $lang['CR_menubar_link'] = 'Lien dans un bloc menu existant';
 $lang['CR_menubar_link_display'] = 'Afficher le lien dans les blocs';
 $lang['CR_menubar_block'] = 'Nouveau bloc menu';
 $lang['CR_menubar_block_number'] = 'Nombre de concours à afficher dans le bloc';
+$lang['CR_menubar_block_display_days'] = "Afficher l'état du concours";
 $lang['CR_truncate_summary'] = "Tronquer le résumé du concours après x caractères";
 
@@ -64,5 +66,5 @@
 
 /* cluetip */
-$lang['CR_help_lang'] = (CR_ED_STATE == 'active') ? "<b>Vous pouvez utiliser du HTML et les descriptions multilingues.</b>" : "<b>Vous pouvez utiliser du HTML.</b>";
+$lang['CR_help_lang'] = isset($pwg_loaded_plugins['ExtendedDescription']) ? "<b>Vous pouvez utiliser du HTML et les descriptions multilingues.</b>" : "<b>Vous pouvez utiliser du HTML.</b>";
 $lang['CR_help_title'] = "" . $lang['CR_help_lang'];
 $lang['CR_help_status'] = "Quand le concours est <i>Terminé</i> les résultats sont affichés sur la page du concours et l'indicateur <span style='color:#a00;'>(Terminé)</span> s'active.<br/>
Index: /extensions/ContestResults/language/lv_LV/plugin.lang.php
===================================================================
--- /extensions/ContestResults/language/lv_LV/plugin.lang.php	(revision 9974)
+++ /extensions/ContestResults/language/lv_LV/plugin.lang.php	(revision 9975)
@@ -1,3 +1,4 @@
 <?php
+global $pwg_loaded_plugins;
 
 /* général */
@@ -52,9 +53,10 @@
 
 /* config */
-$lang['CR_menubar_mode'] = 'Pievienot Konkursa Rezultātus izvēlnei';
+$lang['CR_menubar_mode'] = 'Pievienot ContestResults izvēlnei';
 $lang['CR_menubar_link'] = 'Pievienot saiti uz esošu izvēlnes bloku';
 $lang['CR_menubar_link_display'] = 'Rādīt saiti sekojošos blokos';
 $lang['CR_menubar_block'] = 'Jauns izvēlnes bloks';
 $lang['CR_menubar_block_number'] = 'Blokā attēlojamo konkursu skaits';
+$lang['CR_menubar_block_display_days'] = 'Display the status of the contest';
 $lang['CR_truncate_summary'] = "Truncate the summary of the contest after x characters";
 
@@ -64,5 +66,5 @@
 
 /* cluetip */
-$lang['CR_help_lang'] = (CR_ED_STATE == 'active') ? "<b>Iespējasm lietot HTML un multivalodu aprakstus.</b>" : "<b>Varat lietot HTML.</b>";
+$lang['CR_help_lang'] = isset($pwg_loaded_plugins['ExtendedDescription']) ? "<b>Iespējasm lietot HTML un multivalodu aprakstus.</b>" : "<b>Varat lietot HTML.</b>";
 $lang['CR_help_title'] = "" . $lang['CR_help_lang'];
 $lang['CR_help_status'] = "Kad konkurss ir <i>Pabeigts</i>, tā rezultāti tiek atainoti konkursa lapā un tiek aktivēts marķieris <span style='color:#a00;'>(Pabeigts)</span>.<br/>
Index: /extensions/ContestResults/main.inc.php
===================================================================
--- /extensions/ContestResults/main.inc.php	(revision 9974)
+++ /extensions/ContestResults/main.inc.php	(revision 9975)
@@ -24,5 +24,4 @@
 define('CR_ADMIN', get_root_url().'admin.php?page=plugin-' . CR_DIR);
 define('CR_PUBLIC', make_index_url(array('section' => 'contests')) . '/');
-define('CR_ED_STATE', isset($pwg_loaded_plugins['ExtendedDescription']) ? 'active' : 'unactive');
 
 
@@ -36,5 +35,4 @@
 add_event_handler('loc_end_picture', 'CR_comment_picture', 10); 		// Commentaire sur la page image
 add_event_handler('get_stuffs_modules', 'CR_register_stuffs_module');	// Ajoute un module pour PWG Stuffs
-if(CR_ED_STATE == 'active') add_event_handler('render_CR_content', 'get_user_language_desc'); 	// Textes multilangues
 
 
@@ -46,5 +44,7 @@
 
 // Gestion du menu
-include(CR_PATH . 'include/cr_menubar.php');
+if (script_basename() != 'admin') {
+	include(CR_PATH . 'include/cr_menubar.php');
+}
 
 // Chargement des fichiers de langue et de la config
@@ -77,5 +77,5 @@
 				
 				if ($contest_name = get_contest_name($page['contest'])) { // vérifie si le concours existe
-					$page['title'] .= $conf['level_separator'] . trigger_event('render_CR_content', $contest_name);
+					$page['title'] .= $conf['level_separator'] . trigger_event('render_category_name', $contest_name);
 				} else {
 					page_not_found(l10n('CR_notavailable'));
Index: /extensions/ContestResults/maintain.inc.php
===================================================================
--- /extensions/ContestResults/maintain.inc.php	(revision 9974)
+++ /extensions/ContestResults/maintain.inc.php	(revision 9975)
@@ -6,12 +6,13 @@
 	'menubar_mode' => array(
 		'link' => 0,
-		'block' => 1
+		'block' => 1,
 	),
 	'menubar_link' => array(
 		'menu' => 1,
-		'specials' => 0
+		'specials' => 0,
 	),
 	'menubar_block' => array(
-		'number' => 5
+		'number' => 5,
+		'display_days' => true,
 	),
 	'truncate_summary' => 350,
Index: /extensions/ContestResults/stuffs_module/config.inc.php
===================================================================
--- /extensions/ContestResults/stuffs_module/config.inc.php	(revision 9974)
+++ /extensions/ContestResults/stuffs_module/config.inc.php	(revision 9975)
@@ -34,5 +34,5 @@
 	$template->append('contests', array(
 		'ID' => $contest['id'],
-		'NAME' => trigger_event('render_CR_content', $contest['name']),
+		'NAME' => trigger_event('render_category_name', $contest['name']),
 		'SELECTED' => in_array($contest['id'], $selected_ids) ? true : false,
 	));
Index: /extensions/ContestResults/stuffs_module/main.inc.php
===================================================================
--- /extensions/ContestResults/stuffs_module/main.inc.php	(revision 9974)
+++ /extensions/ContestResults/stuffs_module/main.inc.php	(revision 9975)
@@ -23,5 +23,5 @@
 		$block['contests'][$contest['id']] =  array(
 			'ID' => $contest['id'],
-			'NAME' => trigger_event('render_CR_content', $contest['name']),
+			'NAME' => trigger_event('render_category_name', $contest['name']),
 			'VISIBLE' => $contest['visible'],
 			'STATUS' => $contest['status'],
@@ -29,6 +29,6 @@
 			'DATE_BEGIN' => format_date($contest['date_begin']),
 			'LOGO' => $contest['logo'],
-			'SUMMARY' => CR_cut_string(trigger_event('render_CR_content', $contest['summary']), $conf['ContestResults']['truncate_summary']),
-			'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_CR_content', $contest['name'])),
+			'SUMMARY' => CR_cut_string(trigger_event('render_category_name', $contest['summary']), $conf['ContestResults']['truncate_summary']),
+			'URL' => CR_PUBLIC . $contest['id'] . '-' . str2url(trigger_event('render_category_name', $contest['name'])),
 			'DAYS' => $contest['days'],
 		);
Index: /extensions/ContestResults/template/cr_page.tpl
===================================================================
--- /extensions/ContestResults/template/cr_page.tpl	(revision 9974)
+++ /extensions/ContestResults/template/cr_page.tpl	(revision 9975)
@@ -11,4 +11,7 @@
 			<li><a href="{$U_EDIT}" title="{'CR_edit_tab'|@translate}" class="pwg-state-default pwg-button">
 				<span class="pwg-icon pwg-icon-category-edit"> </span><span class="pwg-button-text">{'CR_edit_tab'|@translate}</span>
+			</a></li>
+			<li><a href="{$U_RESULTS}" title="{'CR_results_tab'|@translate}" class="pwg-state-default pwg-button">
+				<span class="pwg-icon pwg-icon-category-view-flat"> </span><span class="pwg-button-text">{'CR_results_tab'|@translate}</span>
 			</a></li>
 			{/if}
@@ -52,6 +55,6 @@
 		<ul class="categoryActions">  
 			{if isset($U_RESULTS) }
-			<li><a href="{$U_RESULTS}" title="{'CR_results'|@translate}" class="pwg-state-default pwg-button">
-				<span class="pwg-icon pwg-icon-category-edit"> </span><span class="pwg-button-text">{'CR_edit_tab'|@translate}</span>
+			<li><a href="{$U_RESULTS}" title="{'CR_results_tab'|@translate}" class="pwg-state-default pwg-button">
+				<span class="pwg-icon pwg-icon-category-view-flat"> </span><span class="pwg-button-text">{'CR_results_tab'|@translate}</span>
 			</a></li>
 			{/if}
