You are here

function theme_rotor_image in Rotor Banner 5

Same name and namespace in other branches
  1. 6.2 rotor.module \theme_rotor_image()
  2. 6 rotor.module \theme_rotor_image()
  3. 7 rotor.module \theme_rotor_image()

This is a theme function to act as a wrapper for the image either case that we are using imagecache or not.

Parameters

string $rotor_image The path for the image to be themed:

Return value

string The image themed

4 theme calls to theme_rotor_image()
rotor_form in ./rotor.module
Node form hook
rotor_view in ./rotor.module
Implementation of hook_view().
theme_rotor_admin_list in ./rotor.module
Theme the admin list to include in the rotor administration page.
theme_rotor_item in ./rotor.module
Theme for each Rotor item.

File

./rotor.module, line 529
A rotor banner consists in a set of images that will be changing. This module is made using jquery.

Code

function theme_rotor_image($node) {
  $presset_id = variable_get('rotor_imagecache_preset', 0);
  if (module_exists('imagecache') && $presset_id > 0) {
    $pressets = rotor_get_imagecache_presets();
    $presset = $pressets[$presset_id];
    return theme('imagecache', $presset, $node->rotor_image->filepath, $node->rotor_image->alt_text, $node->title);
  }
  return theme('image', $node->rotor_image->filepath, $node->rotor_image->alt_text, $node->title);
}