You are here

function node_makemeeting_simplepoll_view in Make Meeting Scheduler 6

node_view()

If $teaser is TRUE, we return empty string, so we can hide the poll body from the list site/node.

Parameters

mixed $node:

bool $teaser:

bool $page:

File

./makemeeting_simplepoll.module, line 459
Make Meeting Simple Poll module

Code

function node_makemeeting_simplepoll_view($node, $teaser = FALSE, $page = FALSE) {
  unset($node->title);
  $node = node_prepare($node, $teaser);
  $node->content['poll_panel'] = array(
    "#value" => theme("makemeeting_simplepoll_showpoll_theme", $node, drupal_get_form('makemeeting_simplepoll_pollpanel_form', $node)),
    "#weight" => 1,
  );
  if ($teaser || $page) {
    unset($node->content);
  }
  elseif (!preg_match("/" . $node->poll_url . "/i", request_uri())) {
    unset($node->content);
  }
  return $node;
}