function brilliant_gallery_admin in Brilliant Gallery 6.3
Same name and namespace in other branches
- 5.4 brilliant_gallery.module \brilliant_gallery_admin()
- 5.3 brilliant_gallery.module \brilliant_gallery_admin()
- 6.4 brilliant_gallery.module \brilliant_gallery_admin()
- 6 brilliant_gallery.module \brilliant_gallery_admin()
- 6.2 brilliant_gallery.module \brilliant_gallery_admin()
- 7.2 OLD_brilliant_gallery.module \brilliant_gallery_admin()
- 7.2 brilliant_gallery_config.inc \brilliant_gallery_admin()
- 7 brilliant_gallery.module \brilliant_gallery_admin()
1 string reference to 'brilliant_gallery_admin'
File
- ./
brilliant_gallery.module, line 162
Code
function brilliant_gallery_admin() {
$form['brilliant_gallery_folder'] = array(
'#type' => 'textfield',
'#title' => t('Path to the main gallery folder (for local, non-Picasa galleries)'),
'#default_value' => variable_get('brilliant_gallery_folder', ''),
'#size' => 77,
'#maxlength' => 333,
'#description' => t("Path to the main folder in which your individual gallery folders will be placed. Such folder must exist under your /files folder. Exclude trailing slashes. Example: <i>albums</i>. Leave empty if you wish your 'files' folder to be your album folder."),
);
$form['brilliant_gallery_pcache'] = array(
'#type' => 'textfield',
'#title' => t('Path to Picasa image CACHE folder'),
'#default_value' => variable_get('brilliant_gallery_pcache', file_directory_temp()),
'#size' => 77,
'#maxlength' => 333,
#'#description' => t("Full server path to the a folder in which resized images and images, including those fetched from Picasa, will be temporarily stored. If you are on a dedicated server, this can be your usual temp folder, but if you are on a shared host, it is imperative this path is in your /files directory. Remember: PHP has to have the permission to write into that directory! Start with a slash but do NOT end with a slash. E.g. /var/www/vhosts/domain.tld/httpdocs/sites/mysite.tld/files/tmp"),
'#description' => t("Path to a folder in which images fetched from Picasa will be temporarily stored. Such folder must exist under your /files folder. Exclude trailing slashes. Example: <i>bgcache</i>. Remember: PHP has to have the permission to write into that directory! <br>Leave empty if you wish your usual Drupal temp directory (see /admin/settings/file-system) be used for this cache. (If you are on a dedicated server, this can be your server's /tmp folder, but if you are on a shared host, it is important this path is somewhere inside your /files directory, esp. if you are fetching a large number of images from Picasa.)"),
);
/*
$form['brilliant_gallery_cache'] = array(
'#type' => 'radios',
'#title' => t('Database or file system caching of images and other gallery structures'),
'#default_value' => variable_get('brilliant_gallery_cache', 'd'),
'#options' => array('d' => t('Use the database table of Drupal for non-Picasa images. (Full size images fetched from Picasa are always stored locally in the image cache folder set above.)'),
'f' => t('Use the above image cache folder for caching all (also non-Picasa) images. Faster than database caching.'),
),
'#description' => t("Select database (default) or file system caching method."),
);
*/
$form['brilliant_gallery_cache_duration'] = array(
// Cache expiration - both DB cache and the Picasa file cache.
'#type' => 'textfield',
'#title' => t('Expiration time of the gallery cache (in days)'),
'#default_value' => variable_get('brilliant_gallery_cache_duration', '90'),
'#size' => 5,
'#maxlength' => 5,
'#description' => t("Images and other gallery structures are cached to improve speed of serving. Here you can set how long time they should be cached."),
);
$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_crop'] = array(
'#type' => 'checkbox',
'#title' => t('Crop to square'),
'#default_value' => variable_get('brilliant_gallery_crop', FALSE),
'#description' => t("If selected, all image thumbnails will have the same square shape."),
);
$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'),
'greybox' => t('Greybox'),
'none' => t('None'),
),
'#default_value' => variable_get('brilliant_gallery_overbrowser', 'lightbox'),
'#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).'),
),
);
return system_settings_form($form);
}