Changeset 1286
- Timestamp:
- Apr 28, 2006, 6:38:36 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/picture_rate.inc.php
r1094 r1286 55 55 } 56 56 57 $user_rate = null; 57 58 if ($conf['rate_anonymous'] or is_autorize_status(ACCESS_CLASSIC) ) 58 59 { … … 79 80 { 80 81 $row = mysql_fetch_array($result); 81 $sentence = $lang['already_rated']; 82 $sentence.= ' ('.$row['rate'].'). '; 83 $sentence.= $lang['update_rate']; 84 } 85 else 86 { 87 $sentence = $lang['never_rated'].'. '.$lang['Rate']; 82 $user_rate = $row['rate']; 88 83 } 89 84 } 90 else 91 { 92 $sentence = $lang['never_rated'].'. '.$lang['Rate']; 93 } 85 94 86 $template->assign_block_vars( 95 87 'rate', 96 88 array( 97 'CONTENT' => $value, 98 'SENTENCE' => $sentence 89 'SENTENCE' =>isset($user_rate) ? l10n('update_rate') : l10n('new_rate'), 90 'F_ACTION' => add_url_params( 91 $url_self, 92 array('action'=>'rate') 93 ) 99 94 ) 100 95 ); 101 96 102 97 $template->assign_block_vars('info_rate', array('CONTENT' => $value)); 103 104 $template->assign_vars(105 array(106 'INFO_RATE' => $value107 )108 );109 98 110 99 foreach ($conf['rate_items'] as $num => $mark) … … 114 103 array( 115 104 'OPTION' => $mark, 116 'URL' => add_url_params(117 $url_self,118 array(119 'action'=>'rate',120 'rate'=>$mark121 )122 ),123 105 'SEPARATOR' => ($num > 0 ? '|' : ''), 124 106 ) 125 107 ); 108 if (isset($user_rate) and $user_rate==$mark) 109 { 110 $template->assign_block_vars('rate.rate_option.my_rate', array() ); 111 } 112 else 113 { 114 $template->assign_block_vars('rate.rate_option.not_my_rate', array() ); 115 } 126 116 } 127 117 } -
trunk/language/en_UK.iso-8859-1/common.lang.php
r1172 r1286 131 131 $lang['all'] = 'all'; 132 132 $lang['all_categories'] = 'all categories'; 133 $lang['already_rated'] = 'You\'ve already rated this item';134 133 $lang['ascending'] = 'ascending'; 135 134 $lang['author(s) : %s'] = 'author(s) : %s'; … … 245 244 $lang['nb_row_per_page'] = 'Number of rows per page'; 246 245 $lang['nbm_unknown_identifier'] = 'Unknown identifier'; 247 $lang['never_rated'] = 'You\'ve never rated this item';248 246 $lang['new_password'] = 'New password'; 249 247 $lang['new_password_hint'] = 'You only have to give a password if you wish to change it.'; 250 248 $lang['next_page'] = 'Next'; 249 $lang['new_rate'] = 'Rate this picture'; 251 250 $lang['no'] = 'No'; 252 251 $lang['no_category'] = 'Home'; -
trunk/language/fr_FR.iso-8859-1/common.lang.php
r1172 r1286 130 130 $lang['all'] = 'tout'; 131 131 $lang['all_categories'] = 'toutes les catégories'; 132 $lang['already_rated'] = 'Vous avez déjà voté pour cette image';133 132 $lang['ascending'] = 'croissant'; 134 133 $lang['author(s) : %s'] = 'auteur(s) : %s'; … … 244 243 $lang['nb_row_per_page'] = 'Nombre de lignes par page'; 245 244 $lang['nbm_unknown_identifier'] = 'Identifiants inconnus'; 246 $lang['never_rated'] = 'Vous n\'avez jamais voté pour cette image';247 245 $lang['new_password'] = 'Nouveau mot de passe'; 248 246 $lang['new_password_hint'] = 'Vous n\'avez à confirmer votre mot de passe que si vous désirez en changer.'; 247 $lang['new_rate'] = 'Votez pur cette image'; 249 248 $lang['next_page'] = 'Suivant'; 250 249 $lang['no'] = 'Non'; -
trunk/picture.php
r1247 r1286 166 166 { 167 167 include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php'); 168 rate_picture($page['image_id'], $_GET['rate']); 168 rate_picture($page['image_id'], 169 isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate'] ); 169 170 redirect($url_self); 170 171 } -
trunk/template/yoga/image.css
r1253 r1286 108 108 } 109 109 110 .rateButton, .rateButtonSelected { 111 background-color:transparent; 112 padding:0; 113 border:0; 114 } 115 116 .rateButton { 117 cursor: pointer; 118 } 119 120 .rateButtonSelected { 121 color:inherit; 122 font-weight:bold; 123 font-size:120%; 124 } 125 110 126 #comments { 111 127 text-align: left; -
trunk/template/yoga/picture.tpl
r1266 r1286 154 154 155 155 <!-- BEGIN rate --> 156 < p>157 {rate.SENTENCE} :156 <form action="{rate.F_ACTION}" method="post"> 157 <div>{rate.SENTENCE} : 158 158 <!-- BEGIN rate_option --> 159 {rate.rate_option.SEPARATOR} <a href="{rate.rate_option.URL}" rel="nofollow" {TAG_INPUT_ENABLED}>{rate.rate_option.OPTION}</a> 159 {rate.rate_option.SEPARATOR} 160 <!-- BEGIN my_rate --> 161 <input type="button" name="rate" value="{rate.rate_option.OPTION}" class="rateButtonSelected" /> 162 <!-- END my_rate --> 163 <!-- BEGIN not_my_rate --> 164 <input type="submit" name="rate" value="{rate.rate_option.OPTION}" class="rateButton" /> 165 <!-- END not_my_rate --> 160 166 <!-- END rate_option --> 161 </p> 167 </div> 168 </form> 162 169 <!-- END rate --> 163 170 -
trunk/template/yoga/theme/clear/theme.css
r1176 r1286 54 54 55 55 /* links */ 56 A {56 A, .rateButton { 57 57 color: #005e89; 58 58 background: transparent; -
trunk/template/yoga/theme/dark/theme.css
r1197 r1286 84 84 85 85 /* links */ 86 A {86 A, .rateButton { 87 87 color: #FFFFFF; 88 88 }
Note: See TracChangeset
for help on using the changeset viewer.