/[drupal]/contributions/modules/flickr/flickr.admin.inc
ViewVC logotype

Diff of /contributions/modules/flickr/flickr.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.1, Fri Jan 30 10:39:01 2009 UTC revision 1.1.2.2, Mon Mar 16 17:34:49 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: flickr.admin.inc,v 1.1 2008/03/24 19:57:18 drewish Exp $  // $Id: flickr.admin.inc,v 1.1.2.1 2009/01/30 10:39:01 paulbooker Exp $
3    
4  /**  /**
5   * Implementation of hook_settings   * Implementation of hook_settings
# Line 34  function flickr_admin_settings() { Line 34  function flickr_admin_settings() {
34      '#default_value' => variable_get('flickr_cache_duration', 3600),      '#default_value' => variable_get('flickr_cache_duration', 3600),
35      '#description' => t("The refresh interval indicating how often you want to check cached Flickr API calls are up to date."),      '#description' => t("The refresh interval indicating how often you want to check cached Flickr API calls are up to date."),
36    );    );
37      $form['flickr_photos_per_page'] = array(
38        '#type' => 'select',
39        '#title' => t('Number of photos per photoset'),
40        '#default_value' => variable_get('flickr_photos_per_page', '30'),
41        '#options' => array(
42          '10' => t('10'),
43          '30' => t('30'),
44          '50' => t('50'),
45          '100' => t('100'),
46          '150' => t('150'),
47          '200' => t('200'),
48          '300' => t('300'),
49          '400' => t('400'),
50          '500' => t('500'),
51        ),
52        '#description' => t("The number indicates how many photos of a photoset display in your nodes. After saving the configuration, <a href='?q=admin/settings/performance'>clear the cache</a>."),
53      );
54    // we need an api key before we can verify usernames    // we need an api key before we can verify usernames
55    if (!$form['flickr_api_key']['#default_value']) {    if (!$form['flickr_api_key']['#default_value']) {
56      $form['flickr_default_userid']['#disabled'] = TRUE;      $form['flickr_default_userid']['#disabled'] = TRUE;
# Line 72  function flickr_admin_settings_submit($f Line 88  function flickr_admin_settings_submit($f
88    // clean up the data ...    // clean up the data ...
89    $form_state['values']['flickr_api_key'] = trim($form_state['values']['flickr_api_key']);    $form_state['values']['flickr_api_key'] = trim($form_state['values']['flickr_api_key']);
90    $form_state['values']['flickr_api_secret'] = trim($form_state['values']['flickr_api_secret']);    $form_state['values']['flickr_api_secret'] = trim($form_state['values']['flickr_api_secret']);
91      $form_state['values']['flickr_photos_per_page'] = trim($form_state['values']['flickr_photos_per_page']);
92    $form_state['values']['flickr_default_userid'] = trim($form_state['values']['flickr_default_userid']);    $form_state['values']['flickr_default_userid'] = trim($form_state['values']['flickr_default_userid']);
93    
94    // ... replace the usernames with a user id ...    // ... replace the usernames with a user id ...

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.2