function theme_rotor_item in Rotor Banner 6.2
Same name and namespace in other branches
- 5.7 rotor.module \theme_rotor_item()
- 5 rotor.module \theme_rotor_item()
- 6 rotor.module \theme_rotor_item()
- 7 rotor.module \theme_rotor_item()
Theme for each Rotor item.
Parameters
node $item The rotor_item node to theme.:
2 theme calls to theme_rotor_item()
- rotor-row-rotor.tpl.php in theme/
rotor-row-rotor.tpl.php - views-view-unformatted.tpl.php Default simple view template to display a list of rows.
- rotor_nodeapi in ./
rotor.module
File
- ./
rotor.module, line 318 - A rotor banner consists in a set of images that will be changing. This module is made using jquery.
Code
function theme_rotor_item($item, $preset_id = NULL) {
$output = '';
if ($item->fid) {
// Separate out the anchor if any.
if (strpos($item->url, '#') !== FALSE) {
$fragment = substr($item->url, strpos($item->url, '#') + 1);
$item->url = substr($item->url, 0, strpos($item->url, '#'));
}
// Separate out the query string if any.
if (strpos($item->url, '?') !== FALSE) {
$query = substr($item->url, strpos($item->url, '?') + 1);
$item->url = substr($item->url, 0, strpos($item->url, '?'));
}
$attributes = $item->link_target ? array(
'target' => $item->link_target,
) : array();
$output .= $item->url ? l(theme('rotor_image', $item, $preset_id), $item->url, array(
'query' => $query,
'fragment' => $fragment,
'html' => TRUE,
'attributes' => $attributes,
)) : theme('rotor_image', $item, $preset_id);
}
else {
$output .= check_markup($item->body, $item->format, FALSE);
}
return $output;
}