[Home]WikiPatches/GoToBarLabels

UseModWiki | WikiPatches | RecentChanges | Preferences

This is a small enhancement that adds labels in front of the links on the GotoBar, so WikiNewbies? get a little more information about what to do. It looks like this:
home: KaminskiWiki | up: CoolStuff | scan: RecentChanges | login: Preferences | Random Page
I'm using them currently on [KaminskiWiki] if you'd like to see it in action.
--- usemod092/wiki.pl   Sat Apr 21 17:44:10 2001
+++ wiki.pl     Thu Aug  9 07:54:51 2001
@@ -1087,14 +1087,14 @@
   my ($id) = @_;
   my ($main, $bartext);
-  $bartext  = &GetPageLink($HomePage);
+  $bartext  = T('home') . ': ' . &GetPageLink($HomePage);
   if ($id =~ m|/|) {
     $main = $id;
     $main =~ s|/.*||;  # Only the main page name (remove subpage)
-    $bartext .= " | " . &GetPageLink($main);
+    $bartext .= " | " . T('up') . ': ' . &GetPageLink($main);
   }
-  $bartext .= " | " . &GetPageLink($RCName);
-  $bartext .= " | " . &GetPrefsLink();
+  $bartext .= " | " . T('scan') . ': ' . &GetPageLink($RCName);
+  $bartext .= " | " . T('login') . ': ' . &GetPrefsLink();
   if (&GetParam("linkrandom", 0)) {
     $bartext .= " | " . &GetRandomLink();
   }
-- PeterKaminski
When the HTML template functionality is complete, this will be obsolete... I imagine something like this in the HTML template: '<wiki object="GetPageLink"/> | <wiki object="GetPrefsLink?"/>' -- timeless

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited October 15, 2007 3:46 pm by MarkusLude (diff)
Search: