Free Web Hosting is Powered by HOST1PLUS

Posts Tagged ‘mediawiki’

How to customize the MediaWiki sidebar?

As an administrator, edit the wiki page “MediaWiki:Sidebar”. (The editinterface permission needs to be enabled and is enabled for administrators by default; for information on assigning it to other groups, see Manual:User rights.) You may need to use the syntax //yourdomain/yourwiki/index.php?title=MediaWiki:Sidebar&action=edit if you use long URLs.

If you are sure you are logged in with the relevant rights but do not see the edit link, click on the create tab at the top of the page – this will take you to the edit page.

Example sidebar code:
Sidebar example

* navigation
** mainpage|mainpage
** Special:Recentchanges|Recent changes
* new heading
** portal-url|portal
** http://www.mediawiki.org|MediaWiki home

How to clear the page cache in MediaWiki?

To clear the cache of a page in MediaWiki, you should add &action=purge to the end of the page’s URL in your browser’s address bar, e.g. :

http://www.yourdomain.com/wiki/index.php?title=Main_Page&action=purge

If you are not logged in the wiki, a message will come up asking you to confirm that you want to clear the cache of the page.

How to create an user in MediaWiki?

Click Special Pages at the bottom left of the screen. Now click Log in / create an account. When creating an account, please use the person’s directory id as an easy-to-remember convention. The access rights for users can be modified by going to Special Pages, and clicking User rights management under Restricted special pages.

How to change the user privileges in MediaWiki?

The privileges for existing users can be modified by logging in to your MediaWiki as administrator and going to Special Pages.
Then, under Restricted special pages, click User rights management.
Enter the username which you wish to modify and click the Edit User Groups button. Next, select the desired rights listed under Available groups and click the Save User Groups button.

How to change the language in MediaWiki?

To change the language in MediaWiki just locate localsettings.php using FTP client.
Find the line in this file: $wgLanguageCode = “en”;
Then change the “en” to the appropriate language code for your language.

How to upgrade my MediaWiki site?

In order to backup your MediaWiki you need to:

1. Backup the gra_wiki database in PhpMyAdmin.
2. Backup the wiki directory on the server (by FTP).
3. Go to [the Meadiwiki download page] and download the latest version of MediaWiki to your hard drive.
4. Extract it on your hard drive to a clean folder named wiki_new.
5. Upload this folder on the server (by FTP).
6. Copy the file skins/common/images/logo.gif from the wiki folder to the wiki_new folder,
7. Copy the folders extensions and images from the wiki folder to the wiki_new folder.
8. Copy the file LocalSettings.php from the wiki folder to the wiki_new folder.

Also if you have installed MediaWiki using Softaculous application installer in DirectAdmin server control panel, just go again to it and click on update, so that MediaWiki could be updated. Remember to backup your files and databases before proceed with update.

How to add GoogleAdsense to my MediaWiki pages?

Once you have the AdSense code you can add it to Mediawiki following these steps:

1) Open skins/Monobook.php and get acquainted with the syntax for the different sections. This is the place to add your AdSense code.
For example, to add the google adsense code at the bottom of the pages, add the code right after:

// Generate additional footer links
?>

After you make the modifications you need to open and resave your LocalSettings.php file. This will clear MediaWiki’s parsercache and your changes will show correctly.

How to reset my MediaWiki admin password?

Modify the database directly. Assuming that $wgPasswordSalt is set to true (the default), you can use the following SQL query for MySQL:

UPDATE user SET user_password = MD5(CONCAT(user_id, ‘-’,
MD5(‘somepass’))) WHERE user_name = ‘someuser’;

Where obviously “somepass” is changed to the password you want to set and “someuser” is changed to the user name as it is listed in the table “user”.

How to disable registration for MediaWiki?

You can disable the option for your MediaWiki visitors to register accounts at your MediaWiki website you will have to add the following line in the LocalSettings.php file:

$wgGroupPermissions['*']['createaccount'] = false;

You can find below detailed instructions on how to do this on your web hosting account using cPanel:

1. Login to cPanel for your hosting account

2. Click on the File Manager icon

3. Click on the folder icon next public_html folder name

4. Click on the folder icon next to the folder in which your MediaWiki is installed

5. Click on the LocalSettings.php file

6. In the upper right corner you will see several management options for LocalSettings.php file. Click on Edit File

7. Look for a line that starts with $wgGroupPermissions. If there is no such line you should add it yourself and if there already is such a line you should edit it to look this way

$wgGroupPermissions['*']['createaccount'] = false;

8. Save the edited LocalSettings.php file and the new users account creation will be disabled.

How to protect MediaWiki so only registered members can post?

By default anyone can post and edit articles in MediaWiki. If you want to set up MediaWiki in a way so that only registered members can post, you will have to make the necessary changes in the LocalSettings.php file. The following line:

$wgGroupPermissions['*']['edit'] = true;

should be changed to:

$wgGroupPermissions['*']['edit'] = false;