In the config file you may write:
$UserGotoBar = sub {
my ($id) = @_;
return "text...$id";
}
instead of
$UserGotoBar = "text...";
The patch is quite simple:
sub GetGotoBar {
my ($id) = @_;
my ($main, $bartext);
$bartext = &GetPageLink($HomePage);
if ($id =~ m|/|) {
$main = $id;
$main =~ s|/.*||; # Only the main page name (remove subpage)
$bartext .= " | " . &GetPageLink($main);
}
$bartext .= " | " . &GetPageLink($RCName);
$bartext .= " | " . &GetPrefsLink();
if ($UseUpload && &UserCanUpload()) {
$bartext .= " | " . &GetUploadLink();
}
if (&GetParam("linkrandom", 0)) {
$bartext .= " | " . &GetRandomLink();
}
if ($UserGotoBar ne '') {
- $bartext .= " | " . $UserGotoBar;
+ $bartext .= " | ";
+ $bartext .= (ref $UserGotoBar eq 'CODE') ? $UserGotoBar->($id) : $UserGotoBar;
}
$bartext .= "<br>\n";
return $bartext;
}