nid = $presetname; $fid = variable_get('isettasrus_marvin_uc_catalog_browse', md5($path)) . '_img'; $filepath = $path; // Apply Zoomify to the category image: $viewer = $base_url .'/'. variable_get('zoomify_applet', drupal_get_path('module', 'zoomify') .'/ZoomifyViewer.swf'); $image = file_create_url(_zoomify_filepath($node, $fid)); $info = image_get_info($filepath); // See if it is bigger than the zoomify min width/height: if (($info['width'] <= variable_get('zoomify_minimum_width', 1024)) && ($info['height'] <= variable_get('zoomify_minimum_height', 768))) { return theme_imagecache($presetname, $path, $alt, $title, $attributes, $getsize); } $image_width = $info['width']; $image_height = $info['height']; $max_width = variable_get('zoomify_width', 800); $max_height = variable_get('zoomify_height', 600); if (variable_get('zoomify_fixframe', TRUE)) { $width = $max_width; $height = $max_height; } else if ($image_width > $image_height) { // keep aspect ratio $width = $max_width; $height = ceil($max_width * $image_height / $image_width); } else { $height = $max_height + ZOOMIFY_TOOLBAR_HEIGHT; $width = ceil($max_height * $image_width / $image_height); } $width = '100%'; $flashVars = variable_get('zoomify_flashvars', NULL); if (!empty($flashVars)) $flashVars = '&'. $flashVars; $nid = $node->nid; $type = str_replace('_', '-', $node->type); return << EOS; /***/ } else { // ... otherwise, process as normal imagecache request: return theme_imagecache($presetname, $path, $alt, $title, $attributes, $getsize); } }