function shrinktheweb_generateOptions in ShrinkTheWeb 7
Same name and namespace in other branches
- 8 shrinktheweb.api.inc \shrinktheweb_generateOptions()
- 6 shrinktheweb.api.inc \shrinktheweb_generateOptions()
4 calls to shrinktheweb_generateOptions()
- shrinktheweb_deleteThumbnail in ./
shrinktheweb.api.inc - Delete thumbnail
- shrinktheweb_getNoResponseImage in ./
shrinktheweb.api.inc - Gets the account problem image and returns the relative path to the cached image
- shrinktheweb_getThumbnailURL in ./
shrinktheweb.api.inc - Gets the thumbnail for the specified website, stores it in the cache, and then returns the HTML for loading the image. !!! SLIGTHLY CHANGED FOR DRUPAL !!!
- shrinktheweb_refreshThumbnail in ./
shrinktheweb.api.inc - refresh a thumbnail for a url with specified options first delete it and then do a new request and return the HTML for image loading !!! SLIGTHLY CHANGED FOR DRUPAL !!!
File
- ./
shrinktheweb.api.inc, line 153
Code
function shrinktheweb_generateOptions($aOptions) {
// check if there are options set, otherwise set it to default or false
$aOptions['Size'] = isset($aOptions['Size']) ? $aOptions['Size'] : variable_get('shrinktheweb_thumb_size');
$aOptions['SizeCustom'] = isset($aOptions['SizeCustom']) ? $aOptions['SizeCustom'] : variable_get('shrinktheweb_thumb_size_custom');
$aOptions['FullSizeCapture'] = isset($aOptions['FullSizeCapture']) ? $aOptions['FullSizeCapture'] : variable_get('shrinktheweb_full_size');
$aOptions['MaxHeight'] = isset($aOptions['MaxHeight']) ? $aOptions['MaxHeight'] : variable_get('shrinktheweb_max_height');
$aOptions['NativeResolution'] = isset($aOptions['NativeResolution']) ? $aOptions['NativeResolution'] : variable_get('shrinktheweb_native_res');
$aOptions['WidescreenY'] = isset($aOptions['WidescreenY']) ? $aOptions['WidescreenY'] : variable_get('shrinktheweb_widescreen_y');
$aOptions['RefreshOnDemand'] = isset($aOptions['RefreshOnDemand']) ? $aOptions['RefreshOnDemand'] : false;
$aOptions['Delay'] = isset($aOptions['Delay']) ? $aOptions['Delay'] : variable_get('shrinktheweb_delay');
$aOptions['Quality'] = isset($aOptions['Quality']) ? $aOptions['Quality'] : variable_get('shrinktheweb_quality');
return $aOptions;
}