You are here

function _itweak_upload_setting_image_options in iTweak Upload 7.3

Same name and namespace in other branches
  1. 6.2 itweak_upload.admin.inc \_itweak_upload_setting_image_options()
2 calls to _itweak_upload_setting_image_options()
_itweak_upload_admin_settings in ./itweak_upload.admin.inc
Administration settings form worker code.
_itweak_upload_node_type_form in ./itweak_upload.admin.inc
Node type settings form.

File

./itweak_upload.admin.inc, line 12
Administration settings for iTweak Upload module @todo: Currently UNUSED in D7. Need to convert to D7 and include into the module.info.

Code

function _itweak_upload_setting_image_options($default_text = NULL) {
  $ret = array();
  if ($default_text) {
    $ret['_default'] = $default_text;
  }
  $ret['_none'] = t('No preview');
  $ret['_original'] = t('Full image');
  if (module_exists('imagecache')) {
    foreach (imagecache_presets() as $preset_id => $preset) {
      $ret[$preset_id] = $preset['presetname'];
    }
  }
  else {
    drupal_set_message(t('Imagecache module is not installed / enabled. Previously configured attachement preview images will be disabled. Use of "Full image" will impact website performance.'));
  }
  return $ret;
}