Changeset 517 for trunk


Ignore:
Timestamp:
Sep 5, 2004, 10:49:31 PM (20 years ago)
Author:
z0rglub
Message:
  • adjustements on length fields
  • usage of predefined values for nb_image_line and nb_line_page
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r516 r517  
    4747$textfield = array('type' => 'textfield');
    4848
     49$nb_image_row = array();
     50foreach ($conf['nb_image_row'] as $value)
     51{
     52  $nb_image_row[$value] = $value;
     53}
     54
     55$nb_row_page = array();
     56foreach ($conf['nb_row_page'] as $value)
     57{
     58  $nb_row_page[$value] = $value;
     59}
     60
    4961$sections = array(
    5062  'general' => array(
     
    6173    'show_comments' => $true_false,
    6274    'comments_forall' => $true_false,
    63     'nb_comment_page' => $textfield,
     75    'nb_comment_page' => array('type' => 'textfield','size' => 2),
    6476    'comments_validation' => $true_false
    6577   ),
     
    6779    'default_language' => array('type' => 'select',
    6880                                'options' => get_languages()),
    69     'nb_image_line' => $textfield,
    70     'nb_line_page' => $textfield,
     81    'nb_image_line' => array('type' => 'radio','options' => $nb_image_row),
     82    'nb_line_page' => array('type' => 'radio','options' => $nb_row_page),
    7183    'default_template' => array('type' => 'select',
    7284                                'options' => get_templates()),
    73     'recent_period' => $textfield,
     85    'recent_period' => array('type' => 'textfield','size' => 3),
    7486    'auto_expand' => $true_false,
    7587    'show_nb_comments' => $true_false
     
    7789  'upload' => array(
    7890    'upload_available' => $true_false,
    79     'upload_maxfilesize' => $textfield,
    80     'upload_maxwidth' => $textfield,
    81     'upload_maxheight' => $textfield,
    82     'upload_maxwidth_thumbnail' => $textfield,
    83     'upload_maxheight_thumbnail' => $textfield
     91    'upload_maxfilesize' => array('type' => 'textfield','size' => 4),
     92    'upload_maxwidth' => array('type' => 'textfield','size' => 4),
     93    'upload_maxheight' => array('type' => 'textfield','size' => 4),
     94    'upload_maxwidth_thumbnail' => array('type' => 'textfield','size' => 4),
     95    'upload_maxheight_thumbnail' => array('type' => 'textfield','size' => 4)
    8496   ),
    8597  'session' => array(
    8698    'authorize_cookies' => $true_false,
    87     'session_time' => $textfield,
    88     'session_id_size' => $textfield
     99    'session_time' => array('type' => 'textfield','size' => 2),
     100    'session_id_size' => array('type' => 'textfield','size' => 2)
    89101   ),
    90102  'metadata' => array(
     
    263275  if ($field['type'] == 'textfield')
    264276  {
     277    if (isset($field['size']))
     278    {
     279      $size = $field['size'];
     280    }
     281    else
     282    {
     283      $size = '';
     284    }
     285   
    265286    $template->assign_block_vars(
    266287      'line.textfield',
    267288      array(
    268289        'NAME' => $field_name,
    269         'VALUE' => $conf[$field_name]
     290        'VALUE' => $conf[$field_name],
     291        'SIZE' => $size
    270292       ));
    271293  }
  • trunk/template/default/admin/configuration.tpl

    r512 r517  
    3131
    3232      <!-- BEGIN textfield -->
    33       <input type="text" size="{line.textfield.SIZE}" name="{line.textfield.NAME}" value="{line.textfield.VALUE}" />
     33      <input type="text" size="{line.textfield.SIZE}" maxlength="{line.textfield.SIZE}" name="{line.textfield.NAME}" value="{line.textfield.VALUE}" />
    3434      <!-- END textfield -->
    3535
Note: See TracChangeset for help on using the changeset viewer.