Changeset 1044


Ignore:
Timestamp:
Feb 16, 2006, 1:45:18 AM (18 years ago)
Author:
rvelices
Message:

feature 264: gallery_url, rate and rate_anonymous from config file to database

Location:
trunk
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r1004 r1044  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    6161    case 'general' :
    6262    {
     63      if ( !url_is_remote($_POST['gallery_url']) )
     64      {
     65        array_push($page['errors'], $lang['conf_gallery_url_error']);
     66      }
    6367      break;
    6468    }
     
    157161  case 'general' :
    158162  {
     163    $html_check='checked="checked"';
     164   
    159165    $history_yes = ($conf['log']=='true')?'checked="checked"':'';
    160166    $history_no  = ($conf['log']=='false')?'checked="checked"':'';
     
    169175        'GALLERY_LOCKED_YES'=>$lock_yes,
    170176        'GALLERY_LOCKED_NO'=>$lock_no,
     177        ($conf['rate']=='true'?'RATE_YES':'RATE_NO')=>$html_check,
     178        ($conf['rate_anonymous']=='true'
     179             ? 'RATE_ANONYMOUS_YES' : 'RATE_ANONYMOUS_NO')=>$html_check,
    171180        'CONF_GALLERY_TITLE' => $conf['gallery_title'],
    172181        'CONF_GALLERY_DESCRIPTION' => $conf['gallery_description'],
     182        'CONF_GALLERY_URL' => $conf['gallery_url'],
    173183        ));
    174184    break;
  • trunk/include/config_default.inc.php

    r1041 r1044  
    9191$conf['calendar_datefield'] = 'date_creation';
    9292
    93 // rate : enable feature for rating elements
    94 $conf['rate'] = true;
    95 
    96 // rate_anonymous : visitors are able to rate pictures (requires
    97 // $conf['rate'] set to true)
    98 $conf['rate_anonymous'] = true;
    99 
    10093// newcat_default_commentable : at creation, must a category be commentable
    10194// or not ?
     
    171164// category and element description.
    172165$conf['allow_html_descriptions'] = true;
    173 
    174 // galery_url : URL given in RSS feed
    175 $conf['gallery_url'] = 'http://demo.phpwebgallery.net';
    176166
    177167// prefix_thumbnail : string before filename. Thumbnail's prefix must only
  • trunk/install/config.sql

    r965 r1044  
    1717INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_title','PhpWebGallery demonstration site','Title at top of each page and for RSS feed');
    1818INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_description','My photos web site','Short description displayed with gallery title');
     19INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_url','http://demo.phpwebgallery.net','URL given in RSS feed');
     20INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('rate','true','Rating pictures feature is enabled');
     21INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('rate_anonymous','true','Rating pictures feature is also enabled for visitors');
    1922
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r1042 r1044  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    7272$lang['Expand all categories'] = 'Expand all categories';
    7373$lang['Form'] = 'Form';
     74$lang['Gallery URL'] = 'Gallery URL';
    7475$lang['Gallery description'] = 'Gallery description';
    7576$lang['Gallery title'] = 'Gallery title';
     
    121122$lang['Rate date'] = 'Rate date';
    122123$lang['Rating'] = 'Rating';
     124$lang['Rating by guests'] = 'Rating by guests';
    123125$lang['Recent period'] = 'Recent period';
    124126$lang['Registration date'] = 'Registration date';
     
    163165$lang['cat_comments_title'] = 'Authorize users to add comments on selected categories';
    164166$lang['cat_error_name'] = 'The name of a category should not be empty';
    165 $lang['cat_image_info'] = 'Images info';
    166167$lang['cat_lock_title'] = 'Lock categories';
    167168$lang['cat_private'] = 'Private category';
     
    179180$lang['conf_default'] = 'Default display';
    180181$lang['conf_default_title'] = 'Default display';
     182$lang['conf_gallery_url_error'] = 'The gallery URL is not valid.';
    181183$lang['conf_general_title'] = 'Main configuration';
    182184$lang['conf_nb_comment_page_error'] = 'The number of comments a page must be between 5 and 50 included.';
  • trunk/language/en_UK.iso-8859-1/help/configuration.html

    r883 r1044  
    2020  title.</li>
    2121
     22  <li><strong>Gallery URL</strong>: used for the RSS feed.</li>
     23
    2224  <li><strong>History</strong>: visits on pages <span
    2325  class="pwgScreen">category.php</span> and <span
     
    2931  maintenance. Only administrator users will be able to reach the
    3032  gallery.</li>
     33
     34  <li><strong>Rating</strong>: Picture rating feature is enabled.</li>
     35
     36  <li><strong>Rating by guests</strong>: Even non registered users can
     37rate images.</li>
    3138
    3239</ul>
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r1042 r1044  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    7272$lang['Expand all categories'] = 'Développer toutes les catégories';
    7373$lang['Form'] = 'Formulaire';
     74$lang['Gallery URL'] = 'URL de la galerie';
    7475$lang['Gallery description'] = 'Description de la galerie';
    7576$lang['Gallery title'] = 'Titre de la galerie';
     
    121122$lang['Rate date'] = 'Date de notation';
    122123$lang['Rating'] = 'Notation';
     124$lang['Rating by guests'] = 'Notation par les visiteurs';
    123125$lang['Recent period'] = 'Période récente';
    124126$lang['Registration date'] = 'Date d\'enregistrement';
     
    178180$lang['conf_default'] = 'Affichage par défaut';
    179181$lang['conf_default_title'] = 'Affichage par défaut';
     182$lang['conf_gallery_url_error'] = 'L\'adresse de la galerie n\'est pas valide.';
    180183$lang['conf_general_title'] = 'Configuration principale';
    181184$lang['conf_nb_comment_page_error'] = 'Le nombre de commentaires utilisateurs par page doit être compris entre 5 et 50.';
  • trunk/language/fr_FR.iso-8859-1/help/configuration.html

    r889 r1044  
    2020titre de la galerie.</li>
    2121
     22  <li><strong>URL de la galerie</strong>: utilisé pour le flux RSS.</li>
     23
    2224  <li><strong>Historique</strong>: visites des pages <span
    2325class="pwgScreen">category.php</span> et <span
     
    2931galerie pour maintenance. Seul les administrateurs pourront accéder à la
    3032galerie.</li>
     33
     34  <li><strong>Notation</strong>: La notation des photos est possible.</li>
     35
     36  <li><strong>Notation par les visiteurs</strong>: Même les utilisateurs
     37non enregistrés peuvent noter les images.</li>
    3138
    3239</ul>
  • trunk/template/yoga/admin/configuration.tpl

    r980 r1044  
    2525
    2626    <li>
     27      <label for="gallery_title"><strong>{lang:Gallery URL}</strong></label>
     28      <input type="text" maxlength="255" size="50" name="gallery_url" id="gallery_url" value="{general.CONF_GALLERY_URL}" />
     29    </li>
     30
     31    <li>
    2732      <label><strong>{lang:History}</strong></label>
    2833      <input type="radio" class="radio" name="log" value="true" {general.HISTORY_YES} />{lang:Yes}
     
    3439      <input type="radio" class="radio" name="gallery_locked" value="true" {general.GALLERY_LOCKED_YES} />{lang:Yes}
    3540      <input type="radio" class="radio" name="gallery_locked" value="false" {general.GALLERY_LOCKED_NO} />{lang:No}
     41    </li>
     42  </ul>
     43 
     44  <ul>
     45    <li>
     46      <label><strong>{lang:Rating}</strong></label>
     47      <input type="radio" class="radio" name="rate" value="true" {general.RATE_YES} />{lang:Yes}
     48      <input type="radio" class="radio" name="rate" value="false" {general.RATE_NO} />{lang:No}
     49    </li>
     50
     51    <li>
     52      <label><strong>{lang:Rating by guests}</strong></label>
     53      <input type="radio" class="radio" name="rate_anonymous" value="true" {general.RATE_ANONYMOUS_YES} />{lang:Yes}
     54      <input type="radio" class="radio" name="rate_anonymous" value="false" {general.RATE_ANONYMOUS_NO} />{lang:No}
    3655    </li>
    3756  </ul>
Note: See TracChangeset for help on using the changeset viewer.