diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-04-14 18:44:59 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-04-14 18:44:59 +0000 |
commit | 70f5b8649bbd6c7d115fbbf9c1976d9f82b4e8d4 (patch) | |
tree | eea2800600238d557c4d99f22764b20d88929183 /modules/poll.module | |
parent | 2116f7a017e1dc6484b235045b2e4a6c9a6ea5c5 (diff) | |
download | brdo-70f5b8649bbd6c7d115fbbf9c1976d9f82b4e8d4.tar.gz brdo-70f5b8649bbd6c7d115fbbf9c1976d9f82b4e8d4.tar.bz2 |
A batch of changes:
- Renamed '---' to '<!--break-->'.
- Removed hard-coded call to the statistics module from the node module.
Patch by Gerhard.
- Removed tables from poll module. Modified patch by Al. Changes to Al's
patch are:
"polltext" -> "poll-text"
"pollfg" -> "poll-foreground"
"pollbg" -> "poll-background"
- Changed some 'statistics.foo's to 's.foo's. Patch by Gary.
[If this closes any bug reports, please update them on drupal.org.]
Diffstat (limited to 'modules/poll.module')
-rw-r--r-- | modules/poll.module | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/modules/poll.module b/modules/poll.module index 8538bf4a6..cb8710132 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -303,16 +303,10 @@ function poll_view_results(&$node, $main, $block, $links) { $width = round($node->chvotes[$key] * 100 / $votesmax); $percentage = round($node->chvotes[$key] * 100 / max($votestotal, 1)); - $output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" align=\"center\"><tr><td>$value</td><td><div align=\"right\"> $percentage%". (!$block ? " (". format_plural($node->chvotes[$key], "1 vote", "%count votes") .")" : "") ."</div></td></tr></table>"; - if ($width == 0) { - $output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" align=\"center\"><tr><td class=\"pollbg\" width=\"100%\"> </td></tr></table>"; - } - else if ($width == 100) { - $output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" align=\"center\"><tr><td class=\"pollfg\" width=\"100%\"> </td></tr></table>"; - } - else { - $output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" align=\"center\"><tr><td class=\"pollfg\" width=\"". $width ."%\"> </td><td class=\"pollbg\" width=\"". (100 - $width) ."%\"> </td></tr></table>"; - } + $output .= "<div class=\"poll-text\">$value</div>"; + $output .= "<div style=\"float:left; width:". $width ."%; height: 1em;\" class=\"poll-foreground\"></div>"; + $output .= "<div style=\"float:left; width:". (100 - $width) ."%; height: 1em;\" class=\"poll-background\"></div>"; + $output .= "<div align=\"right\"> $percentage%". (!$block ? " (". format_plural($node->chvotes[$key], "1 vote", "%count votes") .")" : "") ."</div>"; } } } |