Sf flickr

From ARK
Revision as of 09:26, 11 May 2009 by Stuarteve (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The sf_flickr is for displaying photos from flickr. The form runs a simple free-text search using the flickr API against the value of a field specified by the Administrator and returns a specified number of results.The field will need to be properly setup in field_settings.php. It is better to use an attribute field, or something without verbose text as the whole string will be sent as the search term.


sf_flickr is only available as of 0.7. You will need to have downloaded the phpFlickr API from [1] and copied it into the directory specified in your $pear_path variable (see env_settings.php). In addition you will need to have acquired an API key from flickr for your specific project.

Additional Fields

sf_flickr takes the following extra fields:

'api_key' - REQUIRED - this is the api key gained from flickr 'op_resultnum' - OPTIONAL - this is the number of results to pull (it defaults to 12 if not set).

Example Configuration

An example of sf_flickr returning photos of bird species

$conf_mcd_flickr =
        'view_state' => 'max',
        'edit_state' => 'view',
        'sf_title' => 'flickr_photos', 
        'sf_html_id' => 'brd_flickr', // Must be unique
        'script' => 'php/subforms/sf_flickr.php',
        'sf_nav_type' => 'full',
        'api_key' => FILL THIS WITH YOUR OWN API KEY,
        'op_label' => 'space',
        'op_input' => 'edit',
        'op_resultnum' => 12,
        'fields' => array(