You are here

function theme_advpoll_view_block_poll in Advanced Poll 6.3

Content of the block when a poll is flagged to display as a block

1 theme call to theme_advpoll_view_block_poll()
advpoll_block in ./advpoll.module
Implementation of hook_block().

File

./advpoll.module, line 315
Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.

Code

function theme_advpoll_view_block_poll($nid) {
  $node = advpoll_view(node_load($nid), FALSE, FALSE);
  $output = '';
  if ($node && $node->status && $node->active && $node->start_date < time() && $node->end_date > time()) {
    $output .= '<h3>' . $node->title . '</h3>';
    $output .= drupal_render($node->content);
  }
  return $output;
}