Ignore:
Timestamp:
May 2, 2008, 11:56:21 PM (16 years ago)
Author:
rub
Message:

Resolved issue 0000823: Enhance upload functionalities

First commit, others will be follow.
Not hesitate to change my translations.

Add upload configuration tabsheet (move and add configuration)
Change and add define for access level
Can show upload link every time
Can restrict access upload.class.php
Can choice category on upload page
Add upload class not use for the moment
Review quickly and temporary style of upload.tpl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r2299 r2325  
    5252    'rate_anonymous',
    5353    'email_admin_on_new_user',
    54     'email_admin_on_picture_uploaded',
    5554   );
    5655
     
    5958    'history_admin',
    6059    'history_guest'
     60   );
     61
     62$upload_checkboxes = array(
     63    'upload_link_everytime',
     64    'email_admin_on_picture_uploaded',
    6165   );
    6266
     
    106110      }
    107111      foreach( $comments_checkboxes as $checkbox)
     112      {
     113        $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
     114      }
     115      break;
     116    }
     117    case 'upload' :
     118    {
     119      foreach( $upload_checkboxes as $checkbox)
    108120      {
    109121        $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
     
    161173$tabsheet->add('history', l10n('conf_history_title'), $conf_link.'history');
    162174$tabsheet->add('comments', l10n('conf_comments_title'), $conf_link.'comments');
     175$tabsheet->add('upload', l10n('conf_upload_title'), $conf_link.'upload');
    163176$tabsheet->add('default', l10n('conf_display'), $conf_link.'default');
    164177// TabSheet selection
     
    188201        ));
    189202
    190     foreach( $main_checkboxes as $checkbox)
     203    foreach ($main_checkboxes as $checkbox)
    191204    {
    192205      $template->append(
     
    203216  {
    204217    //Necessary for merge_block_vars
    205     foreach( $history_checkboxes as $checkbox)
     218    foreach ($history_checkboxes as $checkbox)
    206219    {
    207220      $template->append(
     
    223236        ));
    224237
    225     foreach( $comments_checkboxes as $checkbox)
     238    foreach ($comments_checkboxes as $checkbox)
    226239    {
    227240      $template->append(
     
    235248    break;
    236249  }
     250  case 'upload' :
     251  {
     252    $template->assign(
     253      'upload',
     254      array(
     255        'upload_user_access_options'=> get_user_access_level_html_options(ACCESS_GUEST),
     256        'upload_user_access_options_selected' => array($conf['upload_user_access'])
     257        )
     258      );
     259    //Necessary for merge_block_vars
     260    foreach ($upload_checkboxes as $checkbox)
     261    {
     262      $template->append(
     263          'upload',
     264          array(
     265            $checkbox => $conf[$checkbox]
     266            ),
     267          true
     268        );
     269    }
     270    break;
     271  }
    237272  case 'default' :
    238273  {
Note: See TracChangeset for help on using the changeset viewer.