You are here

function flickrgallery_settings_form in FlickrGallery 6.2

Same name and namespace in other branches
  1. 7.3 includes/flickrgallery.admin.inc \flickrgallery_settings_form()
  2. 7 flickrgallery.admin.inc \flickrgallery_settings_form()
  3. 7.2 flickrgallery.admin.inc \flickrgallery_settings_form()
1 string reference to 'flickrgallery_settings_form'
flickrgallery_admin_settings in ./flickrgallery.module

File

./flickrgallery.module, line 59
This module shows the sets and photo's from a Flickr account

Code

function flickrgallery_settings_form() {
  $form = array();

  // Check if phpFlickr.php is in place
  _flickrgallery_check_file();
  $options = array(
    's' => t('small square 75x75'),
    't' => t('thumbnail, 100 on longest side'),
    'm' => t('small, 240 on longest side'),
    'z' => t('medium 640, 640 on longest side'),
    'b' => t('large, 1024 on longest side'),
  );
  $sizes = array(
    "square" => t('small square 75x75'),
    "thumbnail" => t('thumbnail, 100 on longest side'),
    "small" => t('small, 240 on longest side'),
    "medium_640" => t('medium 640, 640 on longest side'),
    "large" => t('large, 1024 on longest side'),
  );
  $form['flickrgallery_apikey'] = array(
    '#type' => 'textfield',
    '#title' => t('API Key'),
    '#description' => t('Fill in your API key.') . ' ' . l('Get your API key', 'http://www.flickr.com/services/apps/by/me'),
    '#default_value' => variable_get('flickrgallery_apikey', NULL),
  );
  $form['flickrgallery_secretkey'] = array(
    '#type' => 'textfield',
    '#title' => t('Secret Key'),
    '#description' => t('Fill in your secret key.') . ' ' . l('Get your secret key', 'http://www.flickr.com/services/apps/by/me'),
    '#default_value' => variable_get('flickrgallery_secretkey', NULL),
  );
  $form['flickrgallery_userID'] = array(
    '#type' => 'textfield',
    '#title' => t('User ID'),
    '#description' => t('Fill in your user ID.') . ' ' . l('Find your User ID', 'http://idgettr.com/'),
    '#default_value' => variable_get('flickrgallery_userID', NULL),
  );
  $form['flickrgallery_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title sets page'),
    '#description' => t('Provide a title for the sets page.'),
    '#default_value' => variable_get('flickrgallery_title', NULL),
  );
  $form['flickrgallery_description'] = array(
    '#type' => 'textarea',
    '#title' => t('Description'),
    '#description' => t('Provide a description for the sets page.'),
    '#default_value' => variable_get('flickrgallery_description', NULL),
  );
  $form['flickrgallery_lightbox_type'] = array(
    '#type' => 'textfield',
    '#title' => t('Lightbox type'),
    '#description' => t('Fill in what type of Lightbox you would like to use. Examples: lightbox, shadowbox, colorbox, ...<br />This field will be used as the link rel tag and class name. (You need to download these modules separately)'),
    '#default_value' => variable_get('flickrgallery_lightbox_type', 'lightbox'),
  );
  $form['flickrgallery_albums'] = array(
    '#type' => 'select',
    '#title' => t('Display sets images size.'),
    '#description' => t('Select the size for the sets images'),
    '#default_value' => variable_get('flickrgallery_albums', 's'),
    '#options' => $options,
  );
  $form['flickrgallery_thumb'] = array(
    '#type' => 'select',
    '#title' => t('Display thumbnails on a set page'),
    '#description' => t('Select the size for the thumbnails on a set page.'),
    '#default_value' => variable_get('flickrgallery_thumb', 'square'),
    '#options' => $sizes,
  );
  $form['flickrgallery_large'] = array(
    '#type' => 'select',
    '#title' => t('Display large images from a set'),
    '#description' => t('Select the size for the larger images'),
    '#default_value' => variable_get('flickrgallery_large', 'b'),
    '#options' => $sizes,
  );
  $form['flickrgallery_help'] = array(
    '#type' => 'markup',
    '#value' => '<div>' . t('When all settings are filled in correctly, you can visit your ') . l('Flickr Gallery', 'flickr') . '</div>',
  );
  return system_settings_form($form);
}