The first is fairly easy to implement:
sub GetPrefsLink { return &ScriptLink("action=editprefs", T('Preferences')); } ## Patch: Login on GotoBar sub GetLoginLink { return &ScriptLink("action=login", T('Login')); } ## End Patch sub GetRandomLink { return &ScriptLink("action=random", T('Random Page')); } ... sub GetGotoBar { ... $bartext .= " | " . &GetPrefsLink(); $bartext .= " | " . &GetLoginLink(); ## Patch: Login in GotoBar if (&GetParam("linkrandom", 0)) { $bartext .= " | " . &GetRandomLink(); } ... }
To have the Login link ready in the DoEdit as well, you can use:
sub DoEdit { ... } else { # print ' (', Ts('Visit %s to set your user name.', &GetPrefsLink()), ') '; print ' (', Ts('Visit %s to set a user name ', &GetPrefsLink()), Ts('or %s with an existing one.', &GetLoginLink()), ') '; ## Patch: Login link provided } print $q->submit(-name=>'Preview', -value=>T('Preview')), "\n"; ... }
On the login page it can be said for newbies that they have to use Prefs first by:
sub DoEnterLogin { ... print &GetHiddenValue('enter_login', 1), "\n"; print Ts("If you don't have a User ID yet, go to %s and get one.", &GetPrefsLink()), "<br>\n"; ## Patch: link to Prefs print '<br>', T('User ID number:'), ' ', ... }