Changeset 1877
- Timestamp:
- Mar 7, 2007, 11:21:35 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r1866 r1877 95 95 'U_MOVE'=> $link_start.'cat_move', 96 96 'U_CAT_UPLOAD'=> $opt_link.'upload', 97 'U_CAT_COMMENTS'=> $opt_link.'comments', 97 98 'U_CAT_VISIBLE'=> $opt_link.'visible', 98 99 'U_CAT_STATUS'=> $opt_link.'status', -
trunk/admin/cat_options.php
r1865 r1877 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 } 63 73 case 'visible' : 64 74 { … … 94 104 UPDATE '.CATEGORIES_TABLE.' 95 105 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\' 96 116 WHERE id IN ('.implode(',', $_POST['cat_false']).') 97 117 ;'; … … 186 206 break; 187 207 } 208 case 'comments' : 209 { 210 $query_true = ' 211 SELECT id,name,uppercats,global_rank 212 FROM '.CATEGORIES_TABLE.' 213 WHERE commentable = \'true\' 214 ;'; 215 $query_false = ' 216 SELECT id,name,uppercats,global_rank 217 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 } 188 229 case 'visible' : 189 230 { -
trunk/admin/configuration.php
r1865 r1877 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 187 161 //----------------------------------------------------- template initialization 188 162 $template->set_filenames( array('config'=>'admin/configuration.tpl') ); … … 253 227 ); 254 228 } 255 256 $query_true = '257 SELECT id,name,uppercats,global_rank258 FROM '.CATEGORIES_TABLE.'259 WHERE commentable = \'true\'260 ;';261 $query_false = '262 SELECT id,name,uppercats,global_rank263 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');268 229 break; 269 230 } -
trunk/language/en_UK.iso-8859-1/help/cat_options.html
r862 r1877 11 11 12 12 <dt>Comments</dt> 13 <dd>Authorize users to add comments on selected categories. By14 inheritance, an element is commentable if it belongs at least to one 15 commentable category.</dd>13 <dd>Authorize users to add comments on selected categories. 14 Selects the categories which are commentable. 15 An image is commentable if it belongs to at least one category that is commentable.</dd> 16 16 17 17 <dt>Lock</dt> -
trunk/language/en_UK.iso-8859-1/help/configuration.html
r1865 r1877 117 117 User comments validation takes place in the screen <span class="pwgScreen">Administration, Pictures, Comments</span>.</li> 118 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 119 </ul> -
trunk/language/fr_FR.iso-8859-1/help/cat_options.html
r1099 r1877 13 13 <dt>Commentaires utilisateur</dt> 14 14 15 <dd>Autoriser les utilisateurs à commenter les images des catégories 16 sélectionnées. Par héritage, une image est commentable si elle appartient à 17 au moins une catégorie commentable.</dd> 15 <dd>Autoriser les utilisateurs à ajouter des commentaires dans les catégories sélectionnée. 16 Par héritage, une image est commentable si elle appartient à au moins une catégorie commentable.</dd> 18 17 19 18 <dt>Verrouiller</dt> -
trunk/language/fr_FR.iso-8859-1/help/configuration.html
r1865 r1877 122 122 La validation des commentaires utilisateurs a lieu dans l'écran <span class="pwgScreen">Administration, Images, Commentaires</span>.</li> 123 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 124 </ul> -
trunk/template/yoga/admin.tpl
r1866 r1877 16 16 <ul> 17 17 <li><a href="{U_CONFIG_GENERAL}">{lang:general}</a></li> 18 <li><a href="{U_CONFIG_COMMENTS}">{lang:comments}</a></li> 18 19 <li><a href="{U_CONFIG_DISPLAY}">{lang:conf_default}</a></li> 19 <li><a href="{U_CONFIG_COMMENTS}">{lang:comments}</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> 32 33 <li><a href="{U_CAT_VISIBLE}">{lang:lock}</a></li> 33 34 <li><a href="{U_CAT_STATUS}">{lang:cat_security}</a></li> -
trunk/template/yoga/admin/configuration.tpl
r1865 r1877 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.