Changeset 1865
- Timestamp:
- Feb 28, 2007, 1:16:53 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r1760 r1865 96 96 'U_MOVE'=> $link_start.'cat_move', 97 97 'U_CAT_UPLOAD'=> $opt_link.'upload', 98 'U_CAT_COMMENTS'=> $opt_link.'comments',99 98 'U_CAT_VISIBLE'=> $opt_link.'visible', 100 99 'U_CAT_STATUS'=> $opt_link.'status', -
trunk/admin/cat_options.php
r1072 r1865 61 61 break; 62 62 } 63 case 'comments' :64 {65 $query = '66 UPDATE '.CATEGORIES_TABLE.'67 SET commentable = \'false\'68 WHERE id IN ('.implode(',', $_POST['cat_true']).')69 ;';70 pwg_query($query);71 break;72 }73 63 case 'visible' : 74 64 { … … 104 94 UPDATE '.CATEGORIES_TABLE.' 105 95 SET uploadable = \'true\' 106 WHERE id IN ('.implode(',', $_POST['cat_false']).')107 ;';108 pwg_query($query);109 break;110 }111 case 'comments' :112 {113 $query = '114 UPDATE '.CATEGORIES_TABLE.'115 SET commentable = \'true\'116 96 WHERE id IN ('.implode(',', $_POST['cat_false']).') 117 97 ;'; … … 206 186 break; 207 187 } 208 case 'comments' :209 {210 $query_true = '211 SELECT id,name,uppercats,global_rank212 FROM '.CATEGORIES_TABLE.'213 WHERE commentable = \'true\'214 ;';215 $query_false = '216 SELECT id,name,uppercats,global_rank217 FROM '.CATEGORIES_TABLE.'218 WHERE commentable = \'false\'219 ;';220 $template->assign_vars(221 array(222 'L_SECTION' => $lang['cat_comments_title'],223 'L_CAT_OPTIONS_TRUE' => $lang['authorized'],224 'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],225 )226 );227 break;228 }229 188 case 'visible' : 230 189 { -
trunk/admin/configuration.php
r1763 r1865 159 159 } 160 160 161 if ( $page['section']=='comments' and !is_adviser() ) 162 { 163 if (isset($_POST['falsify']) 164 and isset($_POST['cat_true']) 165 and count($_POST['cat_true']) > 0) 166 { 167 $query = ' 168 UPDATE '.CATEGORIES_TABLE.' 169 SET commentable = \'false\' 170 WHERE id IN ('.implode(',', $_POST['cat_true']).') 171 ;'; 172 pwg_query($query); 173 } 174 if (isset($_POST['trueify']) 175 and isset($_POST['cat_false']) 176 and count($_POST['cat_false']) > 0) 177 { 178 $query = ' 179 UPDATE '.CATEGORIES_TABLE.' 180 SET commentable = \'true\' 181 WHERE id IN ('.implode(',', $_POST['cat_false']).') 182 ;'; 183 pwg_query($query); 184 } 185 } 186 161 187 //----------------------------------------------------- template initialization 162 188 $template->set_filenames( array('config'=>'admin/configuration.tpl') ); … … 227 253 ); 228 254 } 255 256 $query_true = ' 257 SELECT id,name,uppercats,global_rank 258 FROM '.CATEGORIES_TABLE.' 259 WHERE commentable = \'true\' 260 ;'; 261 $query_false = ' 262 SELECT id,name,uppercats,global_rank 263 FROM '.CATEGORIES_TABLE.' 264 WHERE commentable = \'false\' 265 ;'; 266 display_select_cat_wrapper($query_true,array(),'comments.category_option_true'); 267 display_select_cat_wrapper($query_false,array(),'comments.category_option_false'); 229 268 break; 230 269 } -
trunk/language/en_UK.iso-8859-1/help/configuration.html
r1763 r1865 9 9 <p>This screen is divided in several sections, regrouping configuration 10 10 parameters by theme.</p> 11 11 12 12 13 <h3>General</h3> … … 43 44 </ul> 44 45 45 46 <h3>User comments</h3>47 48 <ul>49 50 <li><strong>Comments for all</strong>: Even guest not registered can post51 comments.</li>52 53 <li><strong>Number of comments per page</strong>.</li>54 55 <li><strong>Validation</strong>: an administrator validate users posted56 comments before they become visible on the site. User comments validation57 takes place in screen <span class="pwgScreen">Administration, Pictures,58 Comments</span>.</li>59 60 </ul>61 46 62 47 <h3>Default display</h3> … … 109 94 110 95 </ul> 96 97 98 <h3>User comments</h3> 99 100 <ul> 101 102 <li><strong>Comments for all</strong>: Even guest not registered can post 103 comments.</li> 104 105 <li><strong>Number of comments per page</strong>.</li> 106 107 <li><strong>Validation</strong>: an administrator validate users posted 108 comments before they become visible on the site. User comments validation 109 takes place in screen <span class="pwgScreen">Administration, Pictures, 110 Comments</span>.</li> 111 112 <li><strong>Email admin when a valid comment is entered</strong>: 113 Sends an email to the administrators when a user enters a comment and this comment is validated.</li> 114 115 <li><strong>Email admin when a comment requires validation</strong>: 116 Sends an email to the administrators when a user enters a comment that requires validation by the admin. 117 User comments validation takes place in the screen <span class="pwgScreen">Administration, Pictures, Comments</span>.</li> 118 119 <li><strong>Authorize users to add comments on selected categories</strong>: 120 Selects the categories which are commentable. An image is commentable if it belongs to at least one category that is commentable.</li> 121 122 </ul> -
trunk/language/fr_FR.iso-8859-1/help/configuration.html
r1763 r1865 44 44 </ul> 45 45 46 47 <h3>Commentaires utilisateur</h3>48 49 <ul>50 51 <li><strong>Commentaires utilisateur pour tous</strong>: même les52 utilisateurs non enregistrés peuvent enregistrer des commentaires.</li>53 54 <li><strong>Nombre de commentaires utilisateur par page</strong>.</li>55 56 <li><strong>Validation</strong>: un administrateur doit valider les57 commentaires utilisateurs avant qu'ils puissent devenir visibles dans la58 partie publique. La validation des commentaires utilisateurs a lieu dans59 l'écran <span class="pwgScreen">Administration, Images,60 Commentaires</span>.</li>61 62 </ul>63 46 64 47 <h3>Affichage par défaut</h3> … … 115 98 116 99 </ul> 100 101 102 <h3>Commentaires utilisateur</h3> 103 104 <ul> 105 106 <li><strong>Commentaires utilisateur pour tous</strong>: même les 107 utilisateurs non enregistrés peuvent enregistrer des commentaires.</li> 108 109 <li><strong>Nombre de commentaires utilisateur par page</strong>.</li> 110 111 <li><strong>Validation</strong>: un administrateur doit valider les 112 commentaires utilisateurs avant qu'ils puissent devenir visibles dans la 113 partie publique. La validation des commentaires utilisateurs a lieu dans 114 l'écran <span class="pwgScreen">Administration, Images, 115 Commentaires</span>.</li> 116 117 <li><strong>Notifier le webmestre quand un commentaire est enregistré</strong>: 118 Envoi un courriel aux administrateurrs lorsqu'un utilisateur enregistre un commentaire qui est validé.</li> 119 120 <li><strong>Notifier le webmestre quand un commentaire requiert sa validation </strong>: 121 Envoi un courriel aux administrateurrs lorsqu'un utilisateur enregistre un commentaire qui demande une validation de la part des administrateurs. 122 La validation des commentaires utilisateurs a lieu dans l'écran <span class="pwgScreen">Administration, Images, Commentaires</span>.</li> 123 124 <li><strong>Autoriser les utilisateurs à ajouter des commentaires dans les catégories sélectionnées</strong>: 125 Une image est commentable si elle appartient à au moins une catégorie commentable.</li> 126 127 </ul> -
trunk/template/yoga/admin.tpl
r1853 r1865 16 16 <ul> 17 17 <li><a href="{U_CONFIG_GENERAL}">{lang:general}</a></li> 18 <li><a href="{U_CONFIG_DISPLAY}">{lang:conf_default}</a></li> 18 19 <li><a href="{U_CONFIG_COMMENTS}">{lang:comments}</a></li> 19 <li><a href="{U_CONFIG_DISPLAY}">{lang:conf_default}</a></li>20 20 </ul> 21 21 </dd> … … 30 30 <li><a href="{U_MOVE}">{lang:Move}</a></li> 31 31 <li><a href="{U_CAT_UPLOAD}">{lang:upload}</a></li> 32 <li><a href="{U_CAT_COMMENTS}">{lang:comments}</a></li>33 32 <li><a href="{U_CAT_VISIBLE}">{lang:lock}</a></li> 34 33 <li><a href="{U_CAT_STATUS}">{lang:cat_security}</a></li> -
trunk/template/yoga/admin/configuration.tpl
r1780 r1865 222 222 </p> 223 223 </form> 224 225 226 <!-- BEGIN comments --> 227 <form method="post" action="{F_ACTION}" class="properties"> 228 <fieldset> 229 <legend>{lang:cat_comments_title}</legend> 230 <table class="doubleSelect"> 231 <tr> 232 <td> 233 <h3>{lang:authorized}</h3> 234 <select class="categoryList" name="cat_true[]" multiple="multiple" size="30"> 235 <!-- BEGIN category_option_true --> 236 <option {comments.category_option_true.SELECTED} value="{comments.category_option_true.VALUE}">{comments.category_option_true.OPTION}</option> 237 <!-- END category_option_true --> 238 </select> 239 <p><input class="submit" type="submit" value="»" name="falsify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> 240 </td> 241 242 <td> 243 <h3>{lang:forbidden}</h3> 244 <select class="categoryList" name="cat_false[]" multiple="multiple" size="30"> 245 <!-- BEGIN category_option_false --> 246 <option {comments.category_option_false.SELECTED} value="{comments.category_option_false.VALUE}">{comments.category_option_false.OPTION}</option> 247 <!-- END category_option_false --> 248 </select> 249 <p><input class="submit" type="submit" value="«" name="trueify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> 250 </td> 251 </tr> 252 </table> 253 </fieldset> 254 </form> 255 <!-- END comments -->
Note: See TracChangeset
for help on using the changeset viewer.