Tuesday, November 4, 2014

Wikipedia management

Wikipedia is a nice open source project. However it may incur a lot of hackers' interests if it is open for edit. Hackers may register large number of spam accounts, create new pages and modify existing pages. This is what's happening to a wikipedia I'm managing right now.

Although quite straightforward, I keep log of these management tips of wikipedia.

The default settings are in wiki/includes/DefaultSettings.php. But changes to settings can be made in wiki/LocalSettings.php, the changes here will override default settings.

1) To change logo, change this line:

$wgLogo = "$wgStylePath/common/images/wiki.png";


2) To disable anonymous user (not logged in) creating new page and editing, add this to the end of LocalSettings:

#
# See: http://www.mediawiki.org/wiki/Manual:User_rights
#

#
# not-logged-in user
#
$wgGroupPermissions['*']['createaccount'] = false; # no new user registration.
//$wgGroupPermissions['*']['read']          = true;      # default is true, so no need to add this statement.
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createpage'] = false;

#
# logged-in user. 
# Add this if you want to disable logged-in users from createpage/edit actions.
#
#$wgGroupPermissions['user']['edit'] = false;
#$wgGroupPermissions['user']['createpage'] = false; // true;

#
# sysop
# If you disabled logged-in users actions, you may want to enable sysop's permission here.
#
#$wgGroupPermissions['sysop']['edit'] = true;
#$wgGroupPermissions['sysop']['createpage'] = true;

After you disabled new user's createaccount ability, you will want to manually create new accounts. You can do this by logging in as sysop, and going to "Special pages -> Login / create account".

3) Email setting. Use $wgSMTP to change email setting: either use Pear Mail or PHP Mail.

Refer to the last post "Fix Bluehost wikipedia email problem".


No comments:

Blog Archive

Followers