Changeset 1877


Ignore:
Timestamp:
Mar 7, 2007, 11:21:35 PM (17 years ago)
Author:
rub
Message:

Undo revision 1865 in order to add tabsheet for categories.

(Not really undo help)

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r1866 r1877  
    9595    'U_MOVE'=> $link_start.'cat_move',
    9696    'U_CAT_UPLOAD'=> $opt_link.'upload',
     97    'U_CAT_COMMENTS'=> $opt_link.'comments',
    9798    'U_CAT_VISIBLE'=> $opt_link.'visible',
    9899    'U_CAT_STATUS'=> $opt_link.'status',
  • trunk/admin/cat_options.php

    r1865 r1877  
    6161      break;
    6262    }
     63    case 'comments' :
     64    {
     65      $query = '
     66UPDATE '.CATEGORIES_TABLE.'
     67  SET commentable = \'false\'
     68  WHERE id IN ('.implode(',', $_POST['cat_true']).')
     69;';
     70      pwg_query($query);
     71      break;
     72    }
    6373    case 'visible' :
    6474    {
     
    94104UPDATE '.CATEGORIES_TABLE.'
    95105  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 = '
     114UPDATE '.CATEGORIES_TABLE.'
     115  SET commentable = \'true\'
    96116  WHERE id IN ('.implode(',', $_POST['cat_false']).')
    97117;';
     
    186206    break;
    187207  }
     208  case 'comments' :
     209  {
     210    $query_true = '
     211SELECT id,name,uppercats,global_rank
     212  FROM '.CATEGORIES_TABLE.'
     213  WHERE commentable = \'true\'
     214;';
     215    $query_false = '
     216SELECT 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  }
    188229  case 'visible' :
    189230  {
  • trunk/admin/configuration.php

    r1865 r1877  
    159159}
    160160
    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 
    187161//----------------------------------------------------- template initialization
    188162$template->set_filenames( array('config'=>'admin/configuration.tpl') );
     
    253227        );
    254228    }
    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');
    268229    break;
    269230  }
  • trunk/language/en_UK.iso-8859-1/help/cat_options.html

    r862 r1877  
    1111
    1212  <dt>Comments</dt>
    13   <dd>Authorize users to add comments on selected categories. By
    14   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.
     14Selects the categories which are commentable.
     15An image is commentable if it belongs to at least one category that is commentable.</dd>
    1616
    1717  <dt>Lock</dt>
  • trunk/language/en_UK.iso-8859-1/help/configuration.html

    r1865 r1877  
    117117User comments validation takes place in the screen <span class="pwgScreen">Administration, Pictures, Comments</span>.</li>
    118118
    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  
    122119</ul>
  • trunk/language/fr_FR.iso-8859-1/help/cat_options.html

    r1099 r1877  
    1313  <dt>Commentaires utilisateur</dt>
    1414
    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.
     16Par héritage, une image est commentable si elle appartient à au moins une catégorie commentable.</dd>
    1817 
    1918  <dt>Verrouiller</dt>
  • trunk/language/fr_FR.iso-8859-1/help/configuration.html

    r1865 r1877  
    122122La validation des commentaires utilisateurs a lieu dans l'écran <span class="pwgScreen">Administration, Images, Commentaires</span>.</li>
    123123
    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 
    127124</ul>
  • trunk/template/yoga/admin.tpl

    r1866 r1877  
    1616      <ul>
    1717        <li><a href="{U_CONFIG_GENERAL}">{lang:general}</a></li>
     18        <li><a href="{U_CONFIG_COMMENTS}">{lang:comments}</a></li>
    1819        <li><a href="{U_CONFIG_DISPLAY}">{lang:conf_default}</a></li>
    19         <li><a href="{U_CONFIG_COMMENTS}">{lang:comments}</a></li>
    2020      </ul>
    2121    </dd>
     
    3030        <li><a href="{U_MOVE}">{lang:Move}</a></li>
    3131        <li><a href="{U_CAT_UPLOAD}">{lang:upload}</a></li>
     32        <li><a href="{U_CAT_COMMENTS}">{lang:comments}</a></li>
    3233        <li><a href="{U_CAT_VISIBLE}">{lang:lock}</a></li>
    3334        <li><a href="{U_CAT_STATUS}">{lang:cat_security}</a></li>
  • trunk/template/yoga/admin/configuration.tpl

    r1865 r1877  
    222222  </p>
    223223</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="&raquo;" 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="&laquo;" 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.