You are here

function emimage_flickr_settings in Embedded Media Field 6

hook emimage_PROVIDER_settings this should return a subform to be added to the emimage_settings() admin settings page. note that a form field will already be provided, at $form['PROVIDER'] (such as $form['flickr']) so if you want specific provider settings within that field, you can add the elements to that form field.

File

contrib/emimage/providers/flickr.inc, line 89
This include processes flickr.com image files for use by emfield.module.

Code

function emimage_flickr_settings() {
  $form['flickr']['api'] = array(
    '#type' => 'fieldset',
    '#title' => t('Flickr API'),
    '#description' => t('You will first need to apply for an API Developer Key from the <a href="@flickr" target="_blank">Flickr Developer Profile page</a>.', array(
      '@flickr' => EMIMAGE_FLICKR_API_APPLICATION_URL,
    )),
    '#collapsible' => TRUE,
    '#collapsed' => variable_get('emimage_flickr_api_key', '') != '',
  );
  $form['flickr']['api']['emimage_flickr_api_key'] = array(
    '#type' => 'textfield',
    '#title' => t('Flickr API Key'),
    '#default_value' => variable_get('emimage_flickr_api_key', ''),
    '#description' => t('Please enter your Flickr Developer Key here.'),
  );
  $form['flickr']['api']['emimage_flickr_api_secret'] = array(
    '#type' => 'textfield',
    '#title' => t('Flickr API Secret'),
    '#default_value' => variable_get('emimage_flickr_api_secret', ''),
    '#description' => t('If you have a secret for the Flickr API, enter it here.'),
  );
  return $form;
}