[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/image_fupload/image_fupload_image/ -> image_fupload_image.admin.inc (source)

   1  <?php
   2  // $Id: image_fupload_image.admin.inc,v 1.7 2009/01/31 00:13:38 grandcat Exp $
   3  
   4  function image_fupload_image_admin() {
   5    $form['info'] = array(
   6      '#value' => t('To be able to mass upload images using image_fupload, the corresponding permissions have to be set per !admin-permissions. To provide a preview page of all uploaded images and the ability to edit its fields (title and body), have a look at the category "Images preview list".', array('!admin-permissions' => l(t('user role'), 'admin/user/permissions'))),
   7      '#weight' => -12,
   8    );
   9    $form['previewlist'] = array(
  10      '#type' => 'fieldset',
  11      '#title' => t('Images preview list'),
  12      '#description' => t('This feature adds the ability to show a list of all images after having uploaded them. At the same time, all title and body fields can be edited all at once.<br /> In order to use it, it has to be activated separately per !admin-permissions.', array('!admin-permissions' => l(t('user role'), 'admin/user/permissions'))),
  13      '#collapsible' => TRUE,
  14      '#weight' => -10,
  15    );
  16    $form['previewlist']['fupload_previewlist_img'] = array(
  17      '#type' => 'select',
  18      '#title' => t('Preview Image Preset'),
  19      '#description' => t('This setting is responsible for the way of displaying and handling the preview image which is generated out of the original image. Between different image sizes can be chosen.<br /> If <em>imagecache module</em> is installed and enabled, also its presets (if available) can be used to display the preview image.'),
  20      '#options' => _fupload_imagepreview_settings('list', 'image'),
  21      '#default_value' => _fupload_imagepreview_settings('read', 'image'),
  22      '#required' => TRUE,
  23    );
  24    $form['previewlist']['fupload_previewlist_img_attributes'] = array(
  25      '#type' => 'textfield',
  26      '#title' => t('Image Attributes'),
  27      '#description' => t('Provide some additional attributes to be integrated in image (preview) tag, for example: class="my_custom_css"'),
  28      '#default_value' => variable_get('fupload_previewlist_img_attributes', ''),
  29    );
  30    $form['previewlist']['field_settings'] = array(
  31      '#type' => 'fieldset',
  32      '#title' => t('Field settings'),
  33      '#collapsible' => TRUE,
  34      '#collapsed' => TRUE,
  35    );
  36    $form['previewlist']['field_settings']['fupload_previewlist_field_settings'] = array(
  37      '#type' => 'checkboxes',
  38      '#title' => t('Editable fields'),
  39      '#description' => t('Choose the fields which should be editable by the uploader.') .'<p>'.t('<strong>Important information:</strong><br /> If the body is not editable by the user, <em>"minimum number of words"</em> !setting for the body field has to be <strong>0</strong>.', array('!setting' => l(t('setting'), 'admin/content/node-type/image'))).'</p>',
  40      '#options' => array(
  41        'title' => t('Title'),
  42        'body' => t('Body'),    
  43      ),
  44      '#default_value' => variable_get('fupload_previewlist_field_settings', array('title', 'body')),
  45    );
  46    
  47    $form['fupload_title_replacements'] = array(
  48      '#type' => 'textfield',
  49      '#title' => t('Image Title Processor'),
  50      '#description' => t('All entered elements which have to be separated by a semicolon (";"), are replaced by a whitespace when the node title is created out of the original image filename.')
  51        .'<p>'. t('<em>Note:</em> The theme function "fupload_create_filename" can be overwritten to provide a customised title creation.') .'</p>',
  52      '#default_value' => variable_get('fupload_title_replacements', '_;{;}'),
  53      '#weight' => -5,
  54      '#required' => TRUE,
  55    );
  56    $form['#submit'][] = 'image_fupload_image_admin_submit';
  57  
  58    return system_settings_form($form);
  59  }
  60  
  61  function image_fupload_image_admin_submit($form, &$form_state) {
  62    _fupload_imagepreview_settings('write', 'image', array('preview_preset' => $form_state['values']['fupload_previewlist_img']));     
  63  }


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7