diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2002-05-11 15:20:35 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2002-05-11 15:20:35 +0000 |
commit | df5dee8444a48dce64a83054791175e88e3cd160 (patch) | |
tree | 756313248d1f26e4812cb2213b4c7a275ef56bcf /modules/poll.module | |
parent | cd19768bf1350f02c88b2edc53d2b61cfcc18606 (diff) | |
download | brdo-df5dee8444a48dce64a83054791175e88e3cd160.tar.gz brdo-df5dee8444a48dce64a83054791175e88e3cd160.tar.bz2 |
Poll.module:
- (forgot to mention in the last update) The side-block for the poll now has node-links
- Prevented 'read more' links (there's nothing to 'read more' for polls)
Diffstat (limited to 'modules/poll.module')
-rw-r--r-- | modules/poll.module | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/poll.module b/modules/poll.module index 4f2765bee..ee78abddc 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -17,7 +17,7 @@ function poll_block() { $poll = node_load(array("type" => "poll", "created" => $timestamp, "status" => "1")); if ($poll->nid) { // Poll_view dumps the output into $poll->body - poll_view($poll, 0, 1); + poll_view($poll, 1, 1); } } $blocks[0][subject] = t("Latest poll: %t", array("%t" => $poll->title)); @@ -263,7 +263,11 @@ function poll_view(&$node, $main = 0, $block = 0) { } } } - $output .= "<br /><div align=\"center\">Total votes: ". $votestotal . ($block ? "<br />" . $theme->links(link_node($node, 1)) : "") ."</div>"; + if ($block) { + // Prevent a 'read more' link in the side-block. + $node->body = $node->teaser = ""; + } + $output .= "<br /><div align=\"center\">Total votes: ". $votestotal . ($block ? "<br />" . $theme->links(link_node($node, $main)) : "") ."</div>"; } // Force the output on both the mainpage and elsewhere $node->body = $output; |