You are here

function theme_rotor_item in Rotor Banner 5

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

Theme for each Rotor item.

Parameters

node $item The rotor_item node to theme.:

1 theme call to theme_rotor_item()
theme_rotor_items in ./rotor.module
Theme for the Rotor items list.

File

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

Code

function theme_rotor_item($node) {
  $show_tabs = variable_get('rotor_show_tabs', 1);
  $group_tabs = variable_get('rotor_group_tabs', ROTOR_GROUP_TABS);
  $css_width = variable_get('rotor_width', 200) . 'px';
  $css_height = variable_get('rotor_height', 200) . 'px';
  $output = '<div class="rotor-content">';
  if ($show_tabs && $group_tabs == ROTOR_DONT_GROUP_TABS) {
    $output .= '<div class="rotor-tab">' . $node->title . '</div>';
  }
  $output .= " <div class='rotor-content-detail' style=\"height:{$css_height}; width:{$css_width};\">";
  if ($node->rotor_image) {
    $output .= $node->rotor_image->url ? l(theme('rotor_image', $node), $node->rotor_image->url, array(
      'target' => $node->rotor_image->link_target,
    ), NULL, NULL, FALSE, $html = TRUE) : theme('rotor_image', $node);
  }
  else {
    $output .= check_markup($node->body, $item->format, FALSE);
  }
  $output .= '</div>';
  $output .= '</div>';
  return $output;
}