[Home]WikiPatches/FaviconSupport

UseModWiki | WikiPatches | RecentChanges | Preferences

Feature added for 1.0. --CliffordAdams
A patch to allow those little pictures in bookmarks or in tabs.

It adds a new variable $Favicon that a user can configure and if it's present adds an extra line in the header in the GetHtmlHeader subroutine.

after

 $html .= "<HTML><HEAD><TITLE>$title</TITLE>\n";'''
add
  if ($Favicon ne "") {
    $html .= '<LINK REL="SHORTCUT ICON" HREF="' . $Favicon . '">'
  }


 diff -u wiki.orig.pl wiki.pl
--- wiki.orig.pl        Thu May  2 15:01:06 2002
+++ wiki.pl     Thu May  2 14:54:01 2002
@@ -34,7 +34,7 @@
 use vars qw(@RcDays @HtmlPairs @HtmlSingle
   $TempDir $LockDir $DataDir $HtmlDir $UserDir $KeepDir $PageDir
   $InterFile $RcFile $RcOldFile $IndexFile $FullUrl $SiteName $HomePage
-  $LogoUrl $RcDefault $IndentLimit $RecentTop $EditAllowed $UseDiff
+  $LogoUrl $Favicon $RcDefault $IndentLimit $RecentTop $EditAllowed $UseDiff
   $UseSubpage $UseCache $RawHtml $SimpleLinks $NonEnglish $LogoLeft
   $KeepDays $HtmlTags $HtmlLinks $UseDiffLog $KeepMajor $KeepAuthor
   $FreeUpper $EmailNotify $SendMail $EmailFrom $FastGlob $EmbedWiki
@@ -64,6 +64,7 @@
 $HomePage    = "HomePage";      # Home page (change space to _)
 $RCName      = "RecentChanges"; # Name of changes page (change space to _)
 $LogoUrl     = "/wiki.gif";     # URL for site logo ("" for no logo)
+$Favicon     = "";              # where to find a favicon
 $ENV{PATH}   = "/usr/bin/";     # Path used to find "diff"
 $ScriptTZ    = "";              # Local time zone ("" means do not print)
 $RcDefault   = 30;              # Default number of RecentChanges days
@@ -1001,6 +1002,9 @@
   $html = qq(<!DOCTYPE HTML PUBLIC "$dtd">\n);
   $title = $q->escapeHTML($title);
   $html .= "<HTML><HEAD><TITLE>$title</TITLE>\n";
+  if ($Favicon ne "") {
+    $html .= '<LINK REL="SHORTCUT ICON" HREF="' . $Favicon . '">' 
+  }
   if ($SiteBase ne "") {
     $html .= qq(<BASE HREF="$SiteBase">\n);
   }

PaulRubel?: perl -e "print join ('@', ('rubel', (join ('.', ('crhc', 'uiuc', 'edu')))));"


UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited August 13, 2003 11:10 pm by CliffordAdams (diff)
Search: