You are here

function theme_marquee_block_scroller in Marquee Block 6

Same name and namespace in other branches
  1. 7 marquee_block.module \theme_marquee_block_scroller()
1 theme call to theme_marquee_block_scroller()
marquee_block_block in ./marquee_block.module

File

./marquee_block.module, line 78

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;
}