Middlebury

MediaWiki Admin

Revision as of 15:43, 7 August 2009 by Adam Franco (talk | contribs) (New page: = Creating New Wikis = # SSH to the mediawiki server # cd to the mediawiki directory # Run the <code>createWiki</code> command to create a new wiki. # ''Optional:'' Edit the wiki's LocalSe...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Creating New Wikis

  1. SSH to the mediawiki server
  2. cd to the mediawiki directory
  3. Run the createWiki command to create a new wiki.
  4. Optional: Edit the wiki's LocalSettings file to add additional extensions or limit access.

The createWiki command

Running the createWiki command with no argument (or -h for help) will display the following usage message:

$ createWiki -h

Usage: createWiki -n <short name> -t <title> -a <admin id>

Example: createWiki -n TestWiki -t "A Wiki For Testing" -a 1003


Note: The admin user is the only one who will be able to go in and make
other users admins. This should likely be your id (internal to mediawiki).

The admin id is the 'user_id' field in the cas_users table in the mediawiki database.

Some ids you might wish to use:
1003    Adam Franco
1000    Joe Antonioli
1045    Ian McBride
1048    Jason Mittell

The createWiki command will create the new wiki directory in webroot/wikis/, create a default config, add an images directory, and install all the needed database tables.

By default the following extensions are enabled:

  • Cite
  • EmbedVideo
  • FCKeditor

Adding Extra Extensions

Most extensions should be included from the shared extension directory rather than from a per-wiki extension directory. Use the shared-directory constant for the path, e.g.:

require_once( MIDD_MEDIAWIKI_SHARED_DIR."/extensions/FCKeditor/FCKeditor.php" );

Restricting Access

Wikis can be restricted by setting the default read and edit permissions to false and then adding a list of groups and/or a list of authorized users who can view or edit to the LocalSettings.php for a wiki.

Example:

# Disable reading by anonymous users
$wgGroupPermissions['*']['read'] = false;

# But allow them to read e.g., these pages:
$wgWhitelistRead =  array ( "Main Page", "Special:Userlogin", "Wikipedia:Help");


###########################
# CAS Authentication
###########################
// Full Group Id
$wgCASAuthorizedGroups = array(
"CN=LIS Librarians,OU=General,OU=Groups,DC=middlebury,DC=edu",
"CN=LIS Liasons,OU=General,OU=Groups,DC=middlebury,DC=edu",
);

// Users' web-id
$wgCASAuthorizedUsers = array(
'A0F836FCD9DFDD8F7A27D02C62CDB225',
);