UseModWiki | WikiPatches | RecentChanges | Preferences

For 1.0 I have made the background color an option, defaulting to 'white' (for compatability with existing wikis). If set to '', no bgcolor will be set. --CliffordAdams
The following patch adds foreground, link, and visited-link colors to match the default white that is specified in the code.

This page WikiPatches/BodyColors describes a (diff -u) patch that would set the default text an link colors to match the Wiki default of white. By only setting the background color, default Wiki can be useless to people whose browsers are setup for a dark background and light text. As it stands, Wiki will override the background and leave the light text.

-- Dave Forrest mailto:drf5n@virginia.edu

If one specifies only the background color, browsers with incompatible defaults (Linux's Konqueror for example) will set only the unspecified ones and you can end up with light teal on white. If you are going to take control of one, you really should set the others too.

--- cgi-bin/wiki.cgi    Tue Apr 16 19:49:51 2002
+++ wiki.cgi    Wed Apr 17 23:28:06 2002
@@ -994,11 +994,12 @@
 sub GetHtmlHeader {
   my ($title) = @_;
-  my ($dtd, $bgcolor, $html, $bodyExtra);
+  my ($dtd, $bgcolor, $fgcolor, $linkcolor, $vlinkcolor, $html, $bodyExtra);
   $html = '';
   $dtd = '-//IETF//DTD HTML//EN';
   $bgcolor = 'white';  # Later make an option
+  $fgcolor = 'black'; $linkcolor='blue'; $vlinkcolor='purple'; # all or none
   $html = qq(<!DOCTYPE HTML PUBLIC "$dtd">\n);
   $title = $q->escapeHTML($title);
   $html .= "<HTML><HEAD><TITLE>$title</TITLE>\n";
@@ -1011,7 +1012,8 @@
   # Insert other header stuff here (like inline style sheets?)
   $bodyExtra = '';
   if ($bgcolor ne '') {
-    $bodyExtra = qq( BGCOLOR="$bgcolor");
+    $bodyExtra = qq( BGCOLOR="$bgcolor" TEXT="$fgcolor" LINK="$linkcolor"
+VLINK="$vlinkcolor" );
   # Insert any other body stuff (like scripts) into $bodyExtra here
   # (remember to add a space at the beginning to separate from prior text)

Another friendly option would be to set the default $bgcolor to '' and let the browsers take care of it.

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited December 8, 2006 4:41 pm by MarkusLude (diff)