function theme_marquee_block_scroller in Marquee Block 7
Same name and namespace in other branches
- 6 marquee_block.module \theme_marquee_block_scroller()
1 theme call to theme_marquee_block_scroller()
- marquee_block_block_view in ./
marquee_block.module - Implementation of hook_block_view().
File
- ./
marquee_block.module, line 109
Code
function theme_marquee_block_scroller() {
$path = drupal_get_path('module', 'marquee_block');
drupal_add_css($path . '/marquee_block.css');
drupal_add_js($path . '/jquery.marquee.js');
drupal_add_js($path . '/marquee_block.js');
$message = variable_get('marquee_block_message', '');
$speed = variable_get('marquee_block_scroll_speed', 3);
$direction = variable_get('marquee_block_scroll_direction', 'left');
$behavior = variable_get('marquee_block_scroll_direction', 'scroll');
if (strlen(trim($message)) > 0) {
$output = '';
$output .= '<div id="marquee-scroller">';
$output .= '<div id="marquee-scroller-inner">';
$output .= sprintf('<marquee class="marquee-block" behavior="%s" scrollamount="%s" direction="%s">', $behavior, $speed, $direction);
$output .= '<span>' . $message . '</span>';
$output .= '</marquee>';
$output .= '</div>';
$output .= '</div>';
}
return $output;
}