The 1.0 code also uses the CSS classes TABLE.wikidiffold and TABLE.wikidiffnew to allow the colors to be set in a stylesheet. If you use the CSS method then you can set $DiffColor1? and $DiffColor2? to ''. --CliffordAdams
*** usemod092/wiki.pl Sat Apr 21 17:44:10 2001 --- wiki.pl Fri Jan 18 11:42:42 2002 *************** *** 45,51 **** $UrlProtocols $UrlPattern $ImageExtensions $RFCPattern $ISBNPattern $FS $FS1 $FS2 $FS3 $CookieName $SiteBase $StyleSheet $NotFoundPg $FooterNote $EditNote $MaxPost $NewText $NotifyDefault $HttpCharset ! $UserGotoBar); # Note: $NotifyDefault is kept because it was a config variable in 0.90 # Other global variables: use vars qw(%Page %Section %Text %InterSite %SaveUrl %SaveNumUrl --- 45,51 ---- $UrlProtocols $UrlPattern $ImageExtensions $RFCPattern $ISBNPattern $FS $FS1 $FS2 $FS3 $CookieName $SiteBase $StyleSheet $NotFoundPg $FooterNote $EditNote $MaxPost $NewText $NotifyDefault $HttpCharset ! $UserGotoBar $DiffBgFrom $DiffBgTo); # Note: $NotifyDefault is kept because it was a config variable in 0.90 # Other global variables: use vars qw(%Page %Section %Text %InterSite %SaveUrl %SaveNumUrl *************** *** 84,89 **** --- 84,91 ---- $NewText = ""; # New page text ("" for default message) $HttpCharset = ""; # Charset for pages, like "iso-8859-2" $UserGotoBar = ""; # HTML added to end of goto bar + $DiffBgFrom = ""; # Background color for diff from field + $DiffBgTo = ""; # Background color for diff to field # Major options: $UseSubpage = 1; # 1 = use subpages, 0 = do not use subpages *************** *** 1663,1670 **** $html =~ s/(^|\n)(\d+.*c.*)/$1 <br><strong>$tChanged $2<\/strong><br>/g; $html =~ s/(^|\n)(\d+.*d.*)/$1 <br><strong>$tRemoved $2<\/strong><br>/g; $html =~ s/(^|\n)(\d+.*a.*)/$1 <br><strong>$tAdded $2<\/strong><br>/g; ! $html =~ s/\n((<.*\n)+)/&ColorDiff($1,"ffffaf")/ge; ! $html =~ s/\n((>.*\n)+)/&ColorDiff($1,"cfffcf")/ge; return $html; } --- 1665,1672 ---- $html =~ s/(^|\n)(\d+.*c.*)/$1 <br><strong>$tChanged $2<\/strong><br>/g; $html =~ s/(^|\n)(\d+.*d.*)/$1 <br><strong>$tRemoved $2<\/strong><br>/g; $html =~ s/(^|\n)(\d+.*a.*)/$1 <br><strong>$tAdded $2<\/strong><br>/g; ! $html =~ s/\n((<.*\n)+)/&ColorDiff($1,$DiffBgFrom || "#ffffaf")/ge; ! $html =~ s/\n((>.*\n)+)/&ColorDiff($1,$DiffBgTo || "#cfffcf")/ge; return $html; } *************** *** 1683,1689 **** $diff =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge; # Restore saved text $diff =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge; # Restore nested saved text $diff =~ s/\r?\n/<br>/g; ! return "<table width=\"95\%\" bgcolor=#$color><tr><td>\n" . $diff . "</td></tr></table>\n"; } --- 1685,1691 ---- $diff =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge; # Restore saved text $diff =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge; # Restore nested saved text $diff =~ s/\r?\n/<br>/g; ! return "<table width=\"95\%\" bgcolor=\"$color\"><tr><td>\n" . $diff . "</td></tr></table>\n"; }