You are here

function brilliant_gallery_admin in Brilliant Gallery 6

Same name and namespace in other branches
  1. 5.4 brilliant_gallery.module \brilliant_gallery_admin()
  2. 5.3 brilliant_gallery.module \brilliant_gallery_admin()
  3. 6.4 brilliant_gallery.module \brilliant_gallery_admin()
  4. 6.2 brilliant_gallery.module \brilliant_gallery_admin()
  5. 6.3 brilliant_gallery.module \brilliant_gallery_admin()
  6. 7.2 OLD_brilliant_gallery.module \brilliant_gallery_admin()
  7. 7.2 brilliant_gallery_config.inc \brilliant_gallery_admin()
  8. 7 brilliant_gallery.module \brilliant_gallery_admin()
1 string reference to 'brilliant_gallery_admin'
brilliant_gallery_menu in ./brilliant_gallery.module

File

./brilliant_gallery.module, line 157

Code

function brilliant_gallery_admin() {
  $form['brilliant_gallery_folder'] = array(
    '#type' => 'textfield',
    '#title' => t('Path to the main gallery folder'),
    '#default_value' => variable_get('brilliant_gallery_folder', ''),
    '#size' => 50,
    '#maxlength' => 100,
    '#description' => t("Path to the main folder in which your individual gallery folders will be placed. This folder must exist under your 'files' folder. Exclude trailing slashes. Example: <i>albums</i>"),
  );
  $form['brilliant_gallery_maxcol'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum number of table columns'),
    '#default_value' => variable_get('brilliant_gallery_maxcol', 5),
    '#size' => 2,
    '#maxlength' => 2,
    '#description' => t("The maximum number of columns displayed in the table."),
  );
  $form['brilliant_gallery_maximagewidth'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum width of table images'),
    '#default_value' => variable_get('brilliant_gallery_maximagewidth', 150),
    '#size' => 3,
    '#maxlength' => 4,
    '#description' => t("The maximum width of thumbnails in the table (height calculated automatically)."),
  );
  $form['brilliant_gallery_bcgcolour'] = array(
    '#type' => 'colorpicker',
    '#title' => t('Table background colour'),
    '#default_value' => variable_get('brilliant_gallery_bcgcolour', '#000000'),
    '#size' => 8,
    '#maxlength' => 7,
    '#description' => t("Pick colour of the background of the table that holds the images."),
  );
  $form['brilliant_gallery_bcgcolour_textfield'] = array(
    '#type' => 'colorpicker_textfield',
    '#title' => t('Current background color'),
    '#description' => t(''),
    '#default_value' => variable_get('brilliant_gallery_bcgcolour_textfield', '#000000'),
    '#colorpicker' => 'brilliant_gallery_bcgcolour',
  );
  $form['brilliant_gallery_padding'] = array(
    '#type' => 'textfield',
    '#title' => t('Table cell padding'),
    '#default_value' => variable_get('brilliant_gallery_padding', 3),
    '#size' => 3,
    '#maxlength' => 3,
    '#description' => t("Cell padding (around each image) in pixels."),
  );
  $form['brilliant_gallery_overbrowser'] = array(
    '#type' => 'select',
    '#title' => t('Overlay browser'),
    '#required' => FALSE,
    '#options' => array(
      'lightbox' => t('Lightbox'),
      'thickbox' => t('Thickbox'),
      'greyboxr' => t('Greybox Redux'),
      'none' => t('None'),
    ),
    '#default_value' => variable_get('brilliant_gallery_overbrowser', 'thickbox'),
    '#description' => t('Select the overlay image browser (must be installed, of course).'),
  );
  $form['brilliant_gallery_maxwidth'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum width of full image'),
    '#default_value' => variable_get('brilliant_gallery_maxwidth', '1000'),
    '#size' => 5,
    '#maxlength' => 5,
    '#description' => t("Very large images will be scaled down to this width (in pixels) for display before they get displayed by the overlay browser."),
  );
  $form['brilliant_gallery_caption'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display file name as caption'),
    '#default_value' => variable_get('brilliant_gallery_caption', ''),
    #'#size' => 5,

    #'#maxlength' => 5,
    '#description' => t("Check this if you want the overlay browser to display a caption based on the image file name (dots and underscores are automatically replaced by spaces)."),
  );
  $form['brilliant_gallery_sort'] = array(
    '#type' => 'radios',
    '#title' => t('Sort or randomize image order'),
    '#default_value' => variable_get('brilliant_gallery_sort', '1'),
    '#options' => array(
      '1' => t('Sort images by their file names alphabetically.'),
      '' => t('The order of your gallery images will always be randomized (on each page load or cache refresh).'),
    ),
  );
  $form['brilliant_gallery_cache'] = array(
    '#type' => 'radios',
    '#title' => t('Database or file system caching of images'),
    '#default_value' => variable_get('brilliant_gallery_cache', 'd'),
    '#options' => array(
      'd' => t('Use the <i>cache</i> table of Drupal.'),
      'f' => t('Use the temporary directory you have set in <i>/admin/settings/file-system</i>. Faster than database caching!'),
    ),
    '#description' => t("Only images (not the table as such) are cached so that they can be served quicker at subsequent requests."),
  );
  return system_settings_form($form);
}