diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2001-06-09 19:31:34 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2001-06-09 19:31:34 +0000 |
commit | 959b77c3fa9b602cf50722c0c2b5aa2c08b59e99 (patch) | |
tree | a66836f1668cf51e6c9d307e0a507196a18b662a | |
parent | 0e2fc70e3da74596b30b83832ae8dd0260154674 (diff) | |
download | brdo-959b77c3fa9b602cf50722c0c2b5aa2c08b59e99.tar.gz brdo-959b77c3fa9b602cf50722c0c2b5aa2c08b59e99.tar.bz2 |
- Added $theme->foreground and $theme->background vars to provide some general usable colors outside of a theme.
- Updated poll.module to use the new $theme color variables
-rw-r--r-- | modules/poll.module | 7 | ||||
-rw-r--r-- | modules/poll/poll.module | 7 | ||||
-rw-r--r-- | themes/example/example.theme | 3 | ||||
-rw-r--r-- | themes/goofy/goofy.theme | 4 | ||||
-rw-r--r-- | themes/jeroen/jeroen.theme | 5 | ||||
-rw-r--r-- | themes/marvin/marvin.theme | 4 | ||||
-rw-r--r-- | themes/unconed/unconed.theme | 3 | ||||
-rw-r--r-- | themes/yaroon/yaroon.theme | 4 |
8 files changed, 29 insertions, 8 deletions
diff --git a/modules/poll.module b/modules/poll.module index 2597a2498..ba6a0250a 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -91,9 +91,10 @@ function poll_help() { <?php } -function poll_graph($val, $clrfill, $clrempty) { - $clrfill = $clrfill ? $clrfill : "#ffffff"; - $clrempty = $clrempty ? $clrempty : "#000000"; +function poll_graph($val) { + global $theme; + $clrfill = $theme->foreground ? $theme->foreground : "#000000"; + $clrempty = $theme->background ? $theme->background : "#ffffff"; $p = round($val * 100); return "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>" . ($p ? "<td width=\"" . $p . "%\" style=\"background-color: $clrfill;\"><span style=\"font-size: 4pt;\"> </span></td>" : "") . ($p < 100 ? "<td style=\"background-color: $clrempty;\" width=\"" . (100 - $p) . "%\"><span style=\"font-size: 4pt;\"> </span></td>":"") . "</tr></table>"; } diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 2597a2498..ba6a0250a 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -91,9 +91,10 @@ function poll_help() { <?php } -function poll_graph($val, $clrfill, $clrempty) { - $clrfill = $clrfill ? $clrfill : "#ffffff"; - $clrempty = $clrempty ? $clrempty : "#000000"; +function poll_graph($val) { + global $theme; + $clrfill = $theme->foreground ? $theme->foreground : "#000000"; + $clrempty = $theme->background ? $theme->background : "#ffffff"; $p = round($val * 100); return "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>" . ($p ? "<td width=\"" . $p . "%\" style=\"background-color: $clrfill;\"><span style=\"font-size: 4pt;\"> </span></td>" : "") . ($p < 100 ? "<td style=\"background-color: $clrempty;\" width=\"" . (100 - $p) . "%\"><span style=\"font-size: 4pt;\"> </span></td>":"") . "</tr></table>"; } diff --git a/themes/example/example.theme b/themes/example/example.theme index b09563474..20e567173 100644 --- a/themes/example/example.theme +++ b/themes/example/example.theme @@ -10,6 +10,9 @@ *********************************************************************/ class Theme { + // General colorset that can be used for this theme + var $foreground = "#000000"; + var $background = "#FFFFFF"; function header() { ?> diff --git a/themes/goofy/goofy.theme b/themes/goofy/goofy.theme index 9bb7d817a..2deb0bf52 100644 --- a/themes/goofy/goofy.theme +++ b/themes/goofy/goofy.theme @@ -12,6 +12,10 @@ *********************************************************************/ class Theme { + // General colorset that can be used for this theme + var $foreground = "#000000"; + var $background = "#FFFFFF"; + function header() { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> diff --git a/themes/jeroen/jeroen.theme b/themes/jeroen/jeroen.theme index f9b8a8c0d..4f879a766 100644 --- a/themes/jeroen/jeroen.theme +++ b/themes/jeroen/jeroen.theme @@ -10,7 +10,10 @@ *********************************************************************/ class Theme { - + // General colorset that can be used for this theme + var $foreground = "#000000"; + var $background = "#E7E7E7"; + /* I am going to use some colors throughout this theme: #000000 : black used for all links and the table in every box you'll see, I use it to create the thin black border around each. diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme index dbc438d65..67746ab24 100644 --- a/themes/marvin/marvin.theme +++ b/themes/marvin/marvin.theme @@ -13,6 +13,10 @@ class Theme { var $link = "#666699"; + // General colorset that can be used for this theme + var $foreground = "#000000"; + var $background = "#EAEAEA"; + function header() { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> diff --git a/themes/unconed/unconed.theme b/themes/unconed/unconed.theme index 137c05a36..08ea6fe3c 100644 --- a/themes/unconed/unconed.theme +++ b/themes/unconed/unconed.theme @@ -11,6 +11,9 @@ *********************************************************************/ class Theme { + var $foreground = "#000000"; + var $background = "#FFFFFF"; + var $link = "#000000"; var $themename = "unconed"; diff --git a/themes/yaroon/yaroon.theme b/themes/yaroon/yaroon.theme index 7c3f1e05d..61a015878 100644 --- a/themes/yaroon/yaroon.theme +++ b/themes/yaroon/yaroon.theme @@ -10,7 +10,9 @@ *********************************************************************/ class Theme { - + var $foreground = "#000000"; + var $background = "#F0F0F0"; + function header() { global $PHP_SELF, $REQUEST_URI, $cid, $id; |