How to combine the links for logging in and creating accounts in MediaWiki

By default, when an unregistered user opens a page on your MediaWiki site, at the top of the page there is a link for creating a user account and another link for logging into an existing account. The exact location of the links depends on the particular skin. With the default Vector skin that comes prepackaged with MediaWiki they are in the top right corner. Of course, the link for creating an account will be available only if visitors/anonymous users are allowed to create accounts; by default, they have the right to create accounts.

There's an option with which, if you want to, you can combine these two separate links into one link labeled Log in/create account. When the user clicks on it the login form will open; under the fields for the username and password there's a link to the form for creating an account.

To combine these two links you have to insert the following on a new line at the bottom of the LocalSettings.php file of your MediaWiki:

$wgUseCombinedLoginLink = true;

To disable this option again and have the links as two separate ones, either delete the line or comment it by putting the symbol # in front (in this way later, if you want to enable the option again, you only have to delete the symbol).

The LocalSettings.php file is in the root MediaWiki folder on your MediaWiki hosting account. For instance, if your MediaWiki is installed directly in the public_html directory on the account, the path to the file in relation to that directory will be public_html/LocalSettings.php. HostKnox customers can use the File manager of the Pixie control panel to edit files directly on the account. Another way is to download the file on your local computer, edit it with a text editor (e.g. Notepad ++) and then upload it back.

Was this answer helpful?

 Print this Article

Also Read