Index: /trunk/admin/intro.php
===================================================================
--- /trunk/admin/intro.php	(revision 11838)
+++ /trunk/admin/intro.php	(revision 11839)
@@ -191,4 +191,10 @@
 ;';
 list($nb_comments) = pwg_db_fetch_row(pwg_query($query));
+
+$query = '
+SELECT COUNT(*)
+  FROM '.RATE_TABLE.'
+;';
+list($nb_rates) = pwg_db_fetch_row(pwg_query($query));
 
 $template->assign(
@@ -214,4 +220,5 @@
     'DB_GROUPS' => l10n_dec('%d group', '%d groups', $nb_groups),
     'DB_COMMENTS' => l10n_dec('%d comment', '%d comments', $nb_comments),
+		'DB_RATES' => sprintf('%d rates', $nb_rates),
     'U_CHECK_UPGRADE' => PHPWG_ROOT_PATH.'admin.php?action=check_upgrade',
     'U_PHPINFO' => PHPWG_ROOT_PATH.'admin.php?action=phpinfo',
Index: /trunk/admin/themes/default/template/intro.tpl
===================================================================
--- /trunk/admin/themes/default/template/intro.tpl	(revision 11838)
+++ /trunk/admin/themes/default/template/intro.tpl	(revision 11839)
@@ -79,4 +79,5 @@
         {/if}
       </li>
+			<li>{$DB_RATES}</li>
     </ul>
   </dd>
Index: /trunk/include/picture_comment.inc.php
===================================================================
--- /trunk/include/picture_comment.inc.php	(revision 11838)
+++ /trunk/include/picture_comment.inc.php	(revision 11839)
@@ -32,5 +32,5 @@
 foreach ($related_categories as $category)
 {
-  if ($category['commentable'] == 'true')
+  if ($category['commentable'])
   {
     $page['show_comments'] = true;
Index: /trunk/language/en_UK/admin.lang.php
===================================================================
--- /trunk/language/en_UK/admin.lang.php	(revision 11838)
+++ /trunk/language/en_UK/admin.lang.php	(revision 11839)
@@ -161,4 +161,5 @@
 $lang['automatic order'] = 'automatic order';
 $lang['Available only with HTML format'] = "Available only with HTML format";
+$lang['Average rate'] = "Average rate";
 $lang['average time'] = "average time";
 $lang['Batch management'] = "Batch management";
@@ -548,5 +549,6 @@
 $lang['randomly represented'] = "random representative";
 $lang['ranks'] = "ranks";
-$lang['Rate date'] = "Rating date";
+$lang['Rate'] = "Rate";
+$lang['Rate date'] = "Rate date";
 $lang['Rating by guests'] = "Rating by guests";
 $lang['Rating'] = "Rating";
Index: /trunk/language/en_UK/common.lang.php
===================================================================
--- /trunk/language/en_UK/common.lang.php	(revision 11838)
+++ /trunk/language/en_UK/common.lang.php	(revision 11839)
@@ -36,20 +36,20 @@
 
 
-$lang['%.2f (rated %d times)'] = "%.2f (rated %d times)";
-$lang['%d Kb'] = "%d Kb";
 $lang['%d album updated'] = "%d album updated";
 $lang['%d albums updated'] = "%d albums updated";
 $lang['%d comment to validate'] = "%d comment to validate";
+$lang['%d comment'] = "%d comment";
 $lang['%d comments to validate'] = "%d comments to validate";
-$lang['%d new comment'] = "%d new comment";
-$lang['%d new comments'] = "%d new comments";
-$lang['%d comment'] = "%d comment";
 $lang['%d comments'] = "%d comments";
 $lang['%d hit'] = "%d hit";
 $lang['%d hits'] = "%d hits";
+$lang['%d Kb'] = "%d Kb";
+$lang['%d new comment'] = "%d new comment";
+$lang['%d new comments'] = "%d new comments";
 $lang['%d new photo'] = "%d new photo";
 $lang['%d new photos'] = "%d new photos";
 $lang['%d new user'] = "%d new user";
 $lang['%d new users'] = "%d new users";
+$lang['%d rates'] = "%d rates";
 $lang['About'] = "About";
 $lang['All tags'] = "All tags";
@@ -58,5 +58,4 @@
 $lang['At least one tag must match'] = "At least one tag must match";
 $lang['Author'] = "Author";
-$lang['Average rate'] = "Average rate";
 $lang['Albums'] = "Albums";
 $lang['Album'] = "Album";
@@ -105,5 +104,5 @@
 $lang['Quick connect'] = "Quick connect";
 $lang['RSS feed'] = "RSS feed";
-$lang['Rate'] = "Rate";
+$lang['Rating score'] = "Rating score";
 $lang['Register'] = "Register";
 $lang['Registration'] = "Registration";
Index: /trunk/picture.php
===================================================================
--- /trunk/picture.php	(revision 11838)
+++ /trunk/picture.php	(revision 11839)
@@ -314,8 +314,5 @@
     {
       include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php');
-      rate_picture(
-        $page['image_id'],
-        isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate']
-        );
+      rate_picture($page['image_id'], $_POST['rate']);
       redirect($url_self);
     }
@@ -323,11 +320,7 @@
     {
       check_pwg_token();
-
       include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
-
       check_input_parameter('comment_to_edit', $_GET, false, PATTERN_ID);
-
       $author_id = get_comment_author_id($_GET['comment_to_edit']);
-
       if (can_manage_comment('edit', $author_id))
       {
@@ -442,5 +435,5 @@
 while ($row = pwg_db_fetch_assoc($result))
 {
-  $row['commentable'] = boolean_to_string($row['commentable']);
+  $row['commentable'] = get_boolean($row['commentable']);
   array_push($related_categories, $row);
 }
Index: /trunk/themes/default/js/rating.js
===================================================================
--- /trunk/themes/default/js/rating.js	(revision 11838)
+++ /trunk/themes/default/js/rating.js	(revision 11839)
@@ -70,4 +70,5 @@
 				gUserRating = rateButton.initialRateValue;
 				for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=false;
+				if (gRatingOptions.onSuccess) gRatingOptions.onSuccess(result);
 				if (gRatingOptions.updateRateElement) gRatingOptions.updateRateElement.innerHTML = gRatingOptions.updateRateText;
 				if (gRatingOptions.ratingSummaryElement)
Index: /trunk/themes/default/template/picture.tpl
===================================================================
--- /trunk/themes/default/template/picture.tpl	(revision 11838)
+++ /trunk/themes/default/template/picture.tpl	(revision 11839)
@@ -197,11 +197,10 @@
 {if $display_info.average_rate and isset($rate_summary)}
 	<tr id="Average">
-		<td class="label">{'Rating'|@translate}</td>
-		<td class="value" id="ratingSummary">
+		<td class="label">{'Rating score'|@translate}</td>
+		<td class="value">
 		{if $rate_summary.count}
-			{assign var='rate_text' value='%.2f (rated %d times)'|@translate}
-			{$pwg->sprintf($rate_text, $rate_summary.score, $rate_summary.count, $rate_summary.average)}
+			<span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)})</span>
 		{else}
-			{'no rate'|@translate}
+			<span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
 		{/if}
 		</td>
@@ -229,6 +228,12 @@
 				var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[];
 				_pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id},
-					updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
-					ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary"){rdelim} );
+					onSuccess : function(rating) {ldelim}
+						var e = document.getElementById("updateRate");
+						if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}";
+						e = document.getElementById("ratingScore");
+						if (e) e.innerHTML = rating.score;
+						e = document.getElementById("ratingCount");
+						if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
+					{rdelim}{rdelim} );
 			{/footer_script}
 			{/strip}
