function lightbox2_iframe_settings_form in Lightbox2 5.2
Same name and namespace in other branches
- 8 lightbox2.admin.inc \lightbox2_iframe_settings_form()
- 6 lightbox2.admin.inc \lightbox2_iframe_settings_form()
- 7.2 lightbox2.admin.inc \lightbox2_iframe_settings_form()
- 7 lightbox2.admin.inc \lightbox2_iframe_settings_form()
Configuration form for controlling the iframe behaviour.
1 string reference to 'lightbox2_iframe_settings_form'
- lightbox2_menu in ./
lightbox2.module - Implementation of hook_menu().
File
- ./
lightbox2.module, line 960 - Enables the use of lightbox2 which places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths.
Code
function lightbox2_iframe_settings_form() {
// Add the javascript which disables / enables form elements.
drupal_add_js(drupal_get_path('module', 'lightbox2') . '/js/lightbox2.js', 'module');
// Set up a hidden variable.
$form['lightbox2_lite'] = array(
'#type' => 'hidden',
'#value' => variable_get('lightbox2_lite', FALSE),
);
// Add text box for iframe width.
$form['lightbox2_default_frame_width'] = array(
'#type' => 'textfield',
'#title' => t('Default width'),
'#description' => t('The default width of the iframe in pixels.'),
'#default_value' => variable_get('lightbox2_default_frame_width', 600),
'#size' => 20,
);
// Add text box for iframe height.
$form['lightbox2_default_frame_height'] = array(
'#type' => 'textfield',
'#title' => t('Default height'),
'#description' => t('The default height of the iframe in pixels.'),
'#default_value' => variable_get('lightbox2_default_frame_height', 400),
'#size' => 20,
);
// Add option for iframe border.
$form['lightbox2_frame_border'] = array(
'#type' => 'checkbox',
'#title' => t('Enable border'),
'#description' => t('Enable iframe border. You can modify the border style in your theme\'s css file using the iframe\'s id "lightboxFrame".'),
'#default_value' => variable_get('lightbox2_frame_border', 1),
);
return system_settings_form($form);
}