summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/poll.module7
-rw-r--r--modules/poll/poll.module7
-rw-r--r--themes/example/example.theme3
-rw-r--r--themes/goofy/goofy.theme4
-rw-r--r--themes/jeroen/jeroen.theme5
-rw-r--r--themes/marvin/marvin.theme4
-rw-r--r--themes/unconed/unconed.theme3
-rw-r--r--themes/yaroon/yaroon.theme4
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;\">&nbsp;</span></td>" : "") . ($p < 100 ? "<td style=\"background-color: $clrempty;\" width=\"" . (100 - $p) . "%\"><span style=\"font-size: 4pt;\">&nbsp;</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;\">&nbsp;</span></td>" : "") . ($p < 100 ? "<td style=\"background-color: $clrempty;\" width=\"" . (100 - $p) . "%\"><span style=\"font-size: 4pt;\">&nbsp;</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;