[Home]WikiPatches/Login

UseModWiki | WikiPatches | RecentChanges | Preferences

On WikiSuggestions/Login 3 different possiblities for the Login / Preferences issue were proposed:

  1. Login and Prefs in the GotoBar
  2. Login only and link to Prefs from there
  3. Prefs only and link to Login from there

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:'), ' ',
...
}

--DavidAndel


UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 22, 2009 4:21 pm by GunnarH (diff)
Search: