You are here

function rotor_block_content in Rotor Banner 5.7

Same name and namespace in other branches
  1. 5 rotor.module \rotor_block_content()
  2. 6 rotor.module \rotor_block_content()

Returns the block content.

1 call to rotor_block_content()
rotor_block in ./rotor.module
Block hook

File

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

Code

function rotor_block_content() {
  $limit = variable_get('rotor_max_items', 3);
  $items = array();
  $result = db_query("SELECT nid FROM {node} WHERE type = 'rotor_item' LIMIT %d", $limit);
  if ($result) {
    while ($node = db_fetch_array($result)) {
      $items[] = node_load($node);
    }
  }
  return theme('rotor_block', $items);
}