Ignore:
Timestamp:
Mar 23, 2010, 10:19:55 PM (15 years ago)
Author:
patdenice
Message:

Feature 1533: Change "General" by "Options" in Configuration menu.
Change "Default Display" tab by "Guest Settings" tab.
Add display tab in Configuration/Option menu.

Allow to activate/deactivate a lot of display features:

On main page:
# Display only recently posted images
# Sort order
# Display all elements in all sub-categories
# Display a calendar by posted date
# Display a calendar by creation date
# Slideshow

On photo page:
# Show file metadata
# slideshow
# Add this image to your favorites
# Navigation Bar
# Navigation Thumbnails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r5196 r5293  
    7676  );
    7777
     78$display_checkboxes = array(
     79    'menubar_filter_icon',
     80    'index_sort_order_input',
     81    'index_flat_icon',
     82    'index_posted_date_icon',
     83    'index_created_date_icon',
     84    'index_slideshow_icon',
     85    'picture_metadata_icon',
     86    'picture_slideshow_icon',
     87    'picture_favorite_icon',
     88    'picture_navigation_icons',
     89    'picture_navigation_thumb',
     90  );
     91
    7892//------------------------------ verification and registration of modifications
    7993if (isset($_POST['submit']) and !is_adviser())
     
    130144    {
    131145      // Never go here
     146      break;
     147    }
     148    case 'display' :
     149    {
     150      foreach( $display_checkboxes as $checkbox)
     151      {
     152        $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
     153      }
    132154      break;
    133155    }
     
    175197// TabSheet initialization
    176198$tabsheet->add('main', l10n('Main'), $conf_link.'main');
     199$tabsheet->add('display', l10n('Display'), $conf_link.'display');
    177200$tabsheet->add('history', l10n('History'), $conf_link.'history');
    178201$tabsheet->add('comments', l10n('Comments'), $conf_link.'comments');
    179202$tabsheet->add('upload', l10n('Upload'), $conf_link.'upload');
    180 $tabsheet->add('default', l10n('Default display'), $conf_link.'default');
     203$tabsheet->add('default', l10n('Guest Settings'), $conf_link.'default');
    181204// TabSheet selection
    182205$tabsheet->select($page['section']);
     
    299322    break;
    300323  }
     324  case 'display' :
     325  {
     326    foreach ($display_checkboxes as $checkbox)
     327    {
     328      $template->append(
     329          'display',
     330          array(
     331            $checkbox => $conf[$checkbox]
     332            ),
     333          true
     334        );
     335    }
     336    break;
     337  }
    301338}
    302339
Note: See TracChangeset for help on using the changeset viewer.