Changeset 11839
- Timestamp:
- Jul 26, 2011, 9:04:50 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/intro.php
r10684 r11839 191 191 ;'; 192 192 list($nb_comments) = pwg_db_fetch_row(pwg_query($query)); 193 194 $query = ' 195 SELECT COUNT(*) 196 FROM '.RATE_TABLE.' 197 ;'; 198 list($nb_rates) = pwg_db_fetch_row(pwg_query($query)); 193 199 194 200 $template->assign( … … 214 220 'DB_GROUPS' => l10n_dec('%d group', '%d groups', $nb_groups), 215 221 'DB_COMMENTS' => l10n_dec('%d comment', '%d comments', $nb_comments), 222 'DB_RATES' => sprintf('%d rates', $nb_rates), 216 223 'U_CHECK_UPGRADE' => PHPWG_ROOT_PATH.'admin.php?action=check_upgrade', 217 224 'U_PHPINFO' => PHPWG_ROOT_PATH.'admin.php?action=phpinfo', -
trunk/admin/themes/default/template/intro.tpl
r10684 r11839 79 79 {/if} 80 80 </li> 81 <li>{$DB_RATES}</li> 81 82 </ul> 82 83 </dd> -
trunk/include/picture_comment.inc.php
r11236 r11839 32 32 foreach ($related_categories as $category) 33 33 { 34 if ($category['commentable'] == 'true')34 if ($category['commentable']) 35 35 { 36 36 $page['show_comments'] = true; -
trunk/language/en_UK/admin.lang.php
r11641 r11839 161 161 $lang['automatic order'] = 'automatic order'; 162 162 $lang['Available only with HTML format'] = "Available only with HTML format"; 163 $lang['Average rate'] = "Average rate"; 163 164 $lang['average time'] = "average time"; 164 165 $lang['Batch management'] = "Batch management"; … … 548 549 $lang['randomly represented'] = "random representative"; 549 550 $lang['ranks'] = "ranks"; 550 $lang['Rate date'] = "Rating date"; 551 $lang['Rate'] = "Rate"; 552 $lang['Rate date'] = "Rate date"; 551 553 $lang['Rating by guests'] = "Rating by guests"; 552 554 $lang['Rating'] = "Rating"; -
trunk/language/en_UK/common.lang.php
r10815 r11839 36 36 37 37 38 $lang['%.2f (rated %d times)'] = "%.2f (rated %d times)";39 $lang['%d Kb'] = "%d Kb";40 38 $lang['%d album updated'] = "%d album updated"; 41 39 $lang['%d albums updated'] = "%d albums updated"; 42 40 $lang['%d comment to validate'] = "%d comment to validate"; 41 $lang['%d comment'] = "%d comment"; 43 42 $lang['%d comments to validate'] = "%d comments to validate"; 44 $lang['%d new comment'] = "%d new comment";45 $lang['%d new comments'] = "%d new comments";46 $lang['%d comment'] = "%d comment";47 43 $lang['%d comments'] = "%d comments"; 48 44 $lang['%d hit'] = "%d hit"; 49 45 $lang['%d hits'] = "%d hits"; 46 $lang['%d Kb'] = "%d Kb"; 47 $lang['%d new comment'] = "%d new comment"; 48 $lang['%d new comments'] = "%d new comments"; 50 49 $lang['%d new photo'] = "%d new photo"; 51 50 $lang['%d new photos'] = "%d new photos"; 52 51 $lang['%d new user'] = "%d new user"; 53 52 $lang['%d new users'] = "%d new users"; 53 $lang['%d rates'] = "%d rates"; 54 54 $lang['About'] = "About"; 55 55 $lang['All tags'] = "All tags"; … … 58 58 $lang['At least one tag must match'] = "At least one tag must match"; 59 59 $lang['Author'] = "Author"; 60 $lang['Average rate'] = "Average rate";61 60 $lang['Albums'] = "Albums"; 62 61 $lang['Album'] = "Album"; … … 105 104 $lang['Quick connect'] = "Quick connect"; 106 105 $lang['RSS feed'] = "RSS feed"; 107 $lang['Rat e'] = "Rate";106 $lang['Rating score'] = "Rating score"; 108 107 $lang['Register'] = "Register"; 109 108 $lang['Registration'] = "Registration"; -
trunk/picture.php
r10970 r11839 314 314 { 315 315 include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php'); 316 rate_picture( 317 $page['image_id'], 318 isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate'] 319 ); 316 rate_picture($page['image_id'], $_POST['rate']); 320 317 redirect($url_self); 321 318 } … … 323 320 { 324 321 check_pwg_token(); 325 326 322 include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php'); 327 328 323 check_input_parameter('comment_to_edit', $_GET, false, PATTERN_ID); 329 330 324 $author_id = get_comment_author_id($_GET['comment_to_edit']); 331 332 325 if (can_manage_comment('edit', $author_id)) 333 326 { … … 442 435 while ($row = pwg_db_fetch_assoc($result)) 443 436 { 444 $row['commentable'] = boolean_to_string($row['commentable']);437 $row['commentable'] = get_boolean($row['commentable']); 445 438 array_push($related_categories, $row); 446 439 } -
trunk/themes/default/js/rating.js
r11834 r11839 70 70 gUserRating = rateButton.initialRateValue; 71 71 for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=false; 72 if (gRatingOptions.onSuccess) gRatingOptions.onSuccess(result); 72 73 if (gRatingOptions.updateRateElement) gRatingOptions.updateRateElement.innerHTML = gRatingOptions.updateRateText; 73 74 if (gRatingOptions.ratingSummaryElement) -
trunk/themes/default/template/picture.tpl
r11827 r11839 197 197 {if $display_info.average_rate and isset($rate_summary)} 198 198 <tr id="Average"> 199 <td class="label">{'Rating '|@translate}</td>200 <td class="value" id="ratingSummary">199 <td class="label">{'Rating score'|@translate}</td> 200 <td class="value"> 201 201 {if $rate_summary.count} 202 {assign var='rate_text' value='%.2f (rated %d times)'|@translate} 203 {$pwg->sprintf($rate_text, $rate_summary.score, $rate_summary.count, $rate_summary.average)} 202 <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> 204 203 {else} 205 {'no rate'|@translate}204 <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> 206 205 {/if} 207 206 </td> … … 229 228 var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; 230 229 _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, 231 updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"), 232 ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary"){rdelim} ); 230 onSuccess : function(rating) {ldelim} 231 var e = document.getElementById("updateRate"); 232 if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}"; 233 e = document.getElementById("ratingScore"); 234 if (e) e.innerHTML = rating.score; 235 e = document.getElementById("ratingCount"); 236 if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count); 237 {rdelim}{rdelim} ); 233 238 {/footer_script} 234 239 {/strip}
Note: See TracChangeset
for help on using the changeset viewer.