From 4060a9ee8078f0855d8cbf2ab24a804819a152dd Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Fri, 1 Jun 2001 23:23:53 +0000 Subject: Shrunk the poll output... it was rather big in full-view :) --- modules/poll/poll.module | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'modules/poll/poll.module') diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 3282d21ea..5ed349a8a 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -115,11 +115,10 @@ function poll_view($node, $main = 0, $block = 0) { foreach ($node->choice as $key => $value) { if ($value) { - if ($main) { - $output .= "
" . check_output($value) . "" . poll_graph($node->chvotes[$key] / $node->maxvotes) . "" . round(($node->chvotes[$key] / $node->totalvotes) * 100) . "%
"; - } - else { + if ($block) { $output .= (!$block ? "
" : "") . check_output($value) . "
" . poll_graph($node->chvotes[$key] / $node->maxvotes) . "" . round(($node->chvotes[$key] / $node->totalvotes) * 100) . "%
"; + } else { + $output .= "
" . check_output($value) . "" . poll_graph($node->chvotes[$key] / $node->maxvotes) . "" . round(($node->chvotes[$key] / $node->totalvotes) * 100) . "%
"; } } } @@ -140,8 +139,11 @@ function poll_view($node, $main = 0, $block = 0) { $output .= "chid[$key] . "\"> " . check_output($value) . "
"; } } - $output .= ""; - $output .= "
" . form_submit("Vote") . "
" . $footer . "
"; + if ($block) { + $output .= "
" . form_submit("Vote") . "
" . $footer . "
"; + } else { + $output .= "     
" . form_submit("Vote") . "
" . $footer . "
"; + } $output = form($REQUEST_URI, $output); } -- cgit v1.2.3