function image_ncck_flickr_error_check in Embedded Media Field 5
This will log an error if we don't have a key yet. In addition, if the user is an admin, we'll display an error.
1 call to image_ncck_flickr_error_check()
- image_ncck_flickr_request in contrib/
image_ncck/ providers/ flickr.inc - this is a wrapper for image_ncck_request_xml that includes flickr's api key
File
- contrib/
image_ncck/ providers/ flickr.inc, line 148
Code
function image_ncck_flickr_error_check() {
static $checked;
if (!$checked && variable_get('image_ncck_flickr_api_key', '') == '') {
global $user;
$error = t('You do not yet have a Flickr API key set. You will need to !apply and enter your key at the !settings before Flickr images may be displayed.', array(
'!apply' => l(t('apply for a Flickr API key'), IMAGE_NCCK_FLICKR_API_APPLICATION_URL, array(
'target' => '_blank',
)),
'!settings' => l(t('settings administration page'), 'admin/content/emfield'),
));
if (user_access('administer site configuration')) {
drupal_set_message($error, 'error');
}
watchdog('Embedded Media Field', $error);
}
$checked = TRUE;
}