Commit 959b77c3 authored by Steven Wittens's avatar Steven Wittens

- Added $theme->foreground and $theme->background vars to provide some general...

- 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
parent 0e2fc70e
......@@ -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>";
}
......
......@@ -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>";
}
......
......@@ -10,6 +10,9 @@
*********************************************************************/
class Theme {
// General colorset that can be used for this theme
var $foreground = "#000000";
var $background = "#FFFFFF";
function header() {
?>
......
......@@ -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">
......
......@@ -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.
......
......@@ -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">
......
......@@ -11,6 +11,9 @@
*********************************************************************/
class Theme {
var $foreground = "#000000";
var $background = "#FFFFFF";
var $link = "#000000";
var $themename = "unconed";
......
......@@ -10,7 +10,9 @@
*********************************************************************/
class Theme {
var $foreground = "#000000";
var $background = "#F0F0F0";
function header() {
global $PHP_SELF, $REQUEST_URI, $cid, $id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment