function _gallery_assist_settings_nodes in Gallery Assist 6
1 call to _gallery_assist_settings_nodes()
- gallery_assist_settings in ./
gallery_assist.admin.inc - Settings form.
File
- ./
gallery_assist.admin.inc, line 1132 - Administration page from Gallery Assist.
Code
function _gallery_assist_settings_nodes($settings, $type) {
$form = array();
$form['load_modi'] = array(
'#type' => 'fieldset',
'#title' => t('Items order'),
);
$form['load_modi']['gallery_assist_' . $type . '_ga_db_order_field'] = array(
'#type' => 'select',
'#title' => t('Field to order'),
'#default_value' => $settings['ga_db_order_field'],
'#options' => array(
'a.weight' => t('Weight'),
'f.timestamp' => t('Upload date'),
'a.filename' => t('File name'),
'tp.ptitle' => t('Image title'),
),
'#prefix' => '<div class="gallery-assist-settings-left-half">',
'#suffix' => '</div>',
);
$form['load_modi']['gallery_assist_' . $type . '_ga_db_order'] = array(
'#type' => 'select',
'#title' => t('Order type'),
'#default_value' => $settings['ga_db_order'],
'#options' => array(
'DESC' => t('Descending'),
'ASC' => t('Ascending'),
),
);
$form['common'] = array(
'#type' => 'fieldset',
'#title' => t('Common'),
);
$form['common']['prefix'] = array(
'#type' => 'markup',
'#value' => '<div class="gallery-assist-settings-left-half">',
);
$h_li = array(
t('privat: <em>Only the owner can see the gallery.</em>'),
t('public: <em>Public for all authenticated users.</em>'),
t('public for all: <em>Public for all users and anonymous.</em>'),
);
$form['common']['gallery_assist_' . $type . '_ga_public_status'] = array(
'#type' => 'select',
'#title' => t('Gallery Public Status'),
'#default_value' => $settings['ga_public_status'],
'#options' => array(
0 => t('public'),
1 => t('privat'),
2 => t('public for all'),
),
'#description' => theme('item_list', $h_li, NULL, 'ul'),
);
$form['common']['gallery_assist_' . $type . '_ga_public_status_updater'] = array(
'#type' => 'checkbox',
'#title' => t('Check to update the choosed status of all galleries from this content type.'),
'#default_value' => FALSE,
);
$form['common']['gallery_assist_' . $type . '_gallery_assist_weight'] = array(
'#type' => 'select',
'#title' => t('Gallery container weight'),
'#default_value' => $settings['gallery_assist_weight'],
'#options' => drupal_map_assoc(range(-50, 50)),
'#description' => t('Choose the gallery container position on this node.'),
);
$form['common']['gallery_assist_' . $type . '_show_layout'] = array(
'#type' => 'select',
'#title' => t('Show this gallery as'),
'#default_value' => empty($settings['show_layout']) ? 'grid' : $settings['show_layout'],
'#options' => array(
'list' => t('List'),
'grid' => t('Grid'),
),
);
$form['common']['suffix0'] = array(
'#type' => 'markup',
'#value' => '</div><div>',
);
$this['show_title'] = $settings['show_title'] == 1 ? t('Uncheck to hide the images titles. With the creation of the article are images-titles shown.') : t('Check to display the image titles. With the creation of the article are images-titles shown.');
$form['common']['gallery_assist_' . $type . '_show_title'] = array(
'#type' => 'checkbox',
'#title' => t('Show titles'),
'#default_value' => $settings['show_title'],
'#description' => $this['show_title'],
);
$toptions = array(
0 => t('Linked'),
1 => t('Text only'),
);
if (module_exists('gallery_assist_lightboxes') && variable_get('gallery_assist_lightbox', FALSE) != 'none') {
$toptions[2] = t('Linked to the lightbox');
}
$form['common']['gallery_assist_' . $type . '_ga_item_title_type'] = array(
'#type' => 'select',
'#title' => t('Titles format'),
'#options' => $toptions,
'#default_value' => $settings['ga_item_title_type'],
'#access' => isset($settings['show_title']) ? TRUE : FALSE,
);
$form['common']['gallery_assist_' . $type . '_in_profile'] = array(
'#type' => 'checkbox',
'#title' => t('Show in user profile'),
'#default_value' => $settings['in_profile'],
'#description' => '',
);
$this['help']['block'] = array(
'module' => 'gallery_assist',
'help_link' => 'gallery-assist-block-options',
'text' => t('Check to display this Gallery in the Site Galleries Block.'),
);
$help_string = gallery_assist_advanced_help_builder($this['help']['block']);
$form['common']['gallery_assist_' . $type . '_show_in_homepage_block'] = array(
'#type' => 'checkbox',
'#title' => t('Show in block'),
'#default_value' => $settings['show_in_homepage_block'],
'#description' => $help_string,
);
$form['common']['endfix'] = array(
'#type' => 'markup',
'#value' => '</div>',
);
$this['help']['layout'] = array(
'module' => 'gallery_assist',
'help_link' => 'gallery-assist-node-layout-settings',
'text' => t(''),
);
$form['layout'] = array(
'#type' => 'fieldset',
'#title' => t('Extra layout settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#description' => gallery_assist_advanced_help_builder($this['help']['layout']),
);
$form['layout']['teaser'] = array(
'#type' => 'fieldset',
'#title' => t('Teaser container'),
'#prefix' => '<div class="gallery-assist-settings-left">',
'#suffix' => '</div>',
'#description' => t('Settings of the gallery container in the teaser view.'),
);
$form['layout']['page'] = array(
'#type' => 'fieldset',
'#title' => t('Page container'),
'#prefix' => '<div class="gallery-assist-settings-left">',
'#suffix' => '</div>',
'#description' => t('Settings of the gallery container in the page view.'),
);
$form['layout']['preview'] = array(
'#type' => 'fieldset',
'#title' => t('Preview'),
'#prefix' => '<div class="gallery-assist-settings-left">',
'#suffix' => '</div>',
'#description' => t('Settings of the gallery container in the image preview.'),
);
$this['help']['hide_teaser'] = array(
'module' => 'gallery_assist',
'help_link' => 'gallery-assist-node-layout-settings',
'text' => t('If checked Gallery Assist will not show the gallery container in the teaser view.'),
);
$help_string = gallery_assist_advanced_help_builder($this['help']['hide_teaser']);
$form['layout']['teaser']['gallery_assist_' . $type . '_hide_in_teaser'] = array(
'#type' => 'checkbox',
'#title' => t('Hide container in teaser'),
'#default_value' => $settings['hide_in_teaser'],
'#description' => $help_string,
);
$form['layout']['teaser']['gallery_assist_' . $type . '_t_thm_link_format'] = array(
'#type' => 'select',
'#title' => t('Thumbnails hyperlinks'),
'#options' => array(
'none' => 'none',
'node' => 'linked to the Node',
'item' => 'linked to the Preview',
),
'#default_value' => $settings['t_thm_link_format'],
);
$form['layout']['preview']['gallery_assist_' . $type . '_show_download_link'] = array(
'#type' => 'checkbox',
'#title' => t('Display the download link'),
'#default_value' => $settings['show_download_link'],
'#prefix' => '<div class="gallery-assist-settings-left-30">',
'#suffix' => '</div>',
);
$form['layout']['preview']['gallery_assist_' . $type . '_gallery_call_type'] = array(
'#type' => 'select',
'#title' => t('Gallery call type'),
'#default_value' => $settings['gallery_call_type'],
'#options' => array(
0 => t('default'),
1 => t('single call'),
2 => t('single call random'),
),
'#description' => t('Choose a option to jump directly to the first image (cover) or a random image without to view the page. Default is the normaly node call.'),
);
$form['layout']['preview']['gallery_assist_' . $type . '_show_download_link_old'] = array(
'#type' => 'hidden',
'#value' => $settings['show_download_link'],
);
return $form;
}