facebook_album.admin.inc in Facebook Album 7
Same filename and directory in other branches
facebook_album.admin.inc Facebook Album administration pages.
File
facebook_album.admin.incView source
<?php
/**
* @file facebook_album.admin.inc
* Facebook Album administration pages.
*/
/**
* Implements hook_admin().
*
*/
function facebook_album_admin_form() {
$form = array();
$form = system_settings_form($form);
$form['facebook_album_pageID'] = array(
'#type' => 'textfield',
'#title' => t('Facebook Page ID'),
'#default_value' => variable_get('facebook_album_pageID', 'acromediainc'),
'#description' => t('The page ID of the page you want to pull the albums from. I.e. https://www.facebook.com/acromediainc'),
);
$form['facebook_album_visibility'] = array(
'#type' => 'radios',
'#title' => t('Album Visibility'),
'#options' => array(
0 => t('Exclude the listed albums'),
1 => t('Only show the specified albums'),
),
'#default_value' => variable_get('facebook_album_visibility', 0),
);
$form['facebook_album_albums'] = array(
'#type' => 'textarea',
'#description' => t('Enter nothing to show all albums. Specify albums by using their album IDs. Enter one ID per line.'),
'#default_value' => implode("\n", variable_get('facebook_album_albums', array())),
);
$form['display_settings'] = array(
'#title' => t('Album Display Settings'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
);
$form['display_settings']['facebook_album_albumLimit'] = array(
'#title' => t('Album Limit'),
'#type' => 'textfield',
'#default_value' => variable_get('facebook_album_albumLimit', 3),
);
$form['display_settings']['facebook_album_showDescription'] = array(
'#title' => t('Show Album Description'),
'#type' => 'checkbox',
'#default_value' => variable_get('facebook_album_showDescription', 1),
);
$form['display_settings']['facebook_album_showLocation'] = array(
'#title' => t('Show Album Location'),
'#type' => 'checkbox',
'#default_value' => variable_get('facebook_album_showLocation', 1),
);
$form['display_settings']['facebook_album_albumThumbWidth'] = array(
'#title' => t('Album Thumbnail Width'),
'#type' => 'textfield',
'#default_value' => variable_get('facebook_album_albumThumbWidth', 365),
);
$form['display_settings']['facebook_album_albumThumbHeight'] = array(
'#title' => t('Album Thumbnail Height'),
'#type' => 'textfield',
'#default_value' => variable_get('facebook_album_albumThumbHeight', 250),
);
$form['display_settings']['facebook_album_photoThumbWidth'] = array(
'#title' => t('Photo Thumbnail Width'),
'#type' => 'textfield',
'#default_value' => variable_get('facebook_album_photoThumbWidth', 160),
);
$form['display_settings']['facebook_album_photoThumbHeight'] = array(
'#title' => t('Photo Thumbnail Height'),
'#type' => 'textfield',
'#default_value' => variable_get('facebook_album_photoThumbHeight', 120),
);
$form['display_settings']['colorbox'] = array(
'#title' => t('Colorbox Settings'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#description' => t('Facebook Albums support displaying images in Colorbox if it is enabled.'),
);
$form['display_settings']['colorbox']['facebook_album_colorboxOptions'] = array(
'#title' => t('Colorbox Options'),
'#type' => 'textarea',
'#default_value' => variable_get('facebook_album_colorboxOptions', ''),
'#description' => t('Specify any additional Colorbox options here. i.e. "transition:\'elastic\', speed:350"'),
);
array_unshift($form['#submit'], 'facebook_album_admin_form_submit');
return $form;
}
/**
* Submit handler for our settings form
*/
function facebook_album_admin_form_submit($form, &$form_state) {
$form_state['values']['facebook_album_albums'] = explode("\r\n", $form_state['values']['facebook_album_albums']);
}
Functions
Name | Description |
---|---|
facebook_album_admin_form | Implements hook_admin(). |
facebook_album_admin_form_submit | Submit handler for our settings form |