CS Mediawiki FAQ

See also the MediaWiki Documentation, particularly the User's guide and the Editor's guide

The front page for all CS wikis is at https://wiki.cs.umd.edu



User topics


Creating new accounts

Simply return to the login page without logging out, and create a new account. If you can't find it, you can always look in the Special Pages link of the Toolbox submenu on the left pane, or use this URL template:
https://wiki.cs.umd.edu/ < wikiname > /index.php?title=Special:Userlogin&type=signup
You must have been granted the privilege to create new accounts for this to work for you

Granting permissions to a user

If you have permission to grant rights to other users, click on the Special Pages link on the Toolbox submenu on the left panel. Scroll to the bottom and select User rights management from the Restricted Special pages section at the bottom.

You can also go directly to the URL using this template:

https://wiki.cs.umd.edu/gradwiki/index.php?title=Special:Userrights
Enter the username whose rights you wish to change, then use the interface to modify their group membership. If you need a group changed or added, you will need to contact an administrator with shell access to the wiki's configuration file.

Only Bureaucrats may change user permissions and groups


Modifying Groups and group rights

Only an administrator with shell access to the server may modify groups and their associated rights. These changes require editing the wiki configuration files.

Click here to go to the mediawiki documentation


Restricting the wiki to specific kerberos-authenticated users

Access to the wiki as a whole may be restricted to a certain subset of users with department kerberos passwords. Note that this is a separate authentication method from the wiki's internal user login. The kerberos authentication will allow you to prevent anyone except a specified list of local users from even seeing your wiki. Those users will also be subject to any local authentication or restrictions on the wiki once they are authenticated to view it.

To use kerberos authentication, you must have an administrator create an .htaccess file in the wiki directory. Let them know the CS usernames of the people who should have access to the wiki.

Note that it is not possible to use kerberos access control and also allow anonymous users to view the wiki.

If you use kerberos authentication, you may still want to create a login for yourself using the wiki's internal login system. This will allow you to set a variety of personal preferences that will likely improve your wiki-ing experience.


Editing the navigation bar

You must be a member of the Sysops group to modify the navigation bar.

See also the mediawiki documentation on the navigation bar.


Limiting access to parts of your wiki

Please follow the links and read the mediawiki documentation -- it includes guidelines for IDs to use and other valuable information.

First, Create a new custom namespace

Add a line like this to LocalSettings.php:

# Add custom namespaces
$wgExtraNamespaces = 
array(100 => "Outliers", 101 => "Outliers_Talk");

Second, modify includes/Title.php to handle a new user right. Change this:

if( $wgUser->isAllowed('read') ) { 
   return true;
 } else {
   global $wgWhitelistRead;

To this:

if( $this->getNamespace() == 100 ) {
         return $wgUser->isAllowed('read_outliers');
            }
if( $wgUser->isAllowed('read') ) { 
                return true;
   } else {
    global $wgWhitelistRead;
This new user right read_outliers will permit or deny users to access the new namespace. Note that the numerical IDs supplied in both sections match. This is the ID number of the namespace.

Finally, define a group with the read_outliers permission. Add a line like this to LocalSettings.php:

## Create group with outlier read permissions
$wgGroupPermissions['outliers' ]['read_outliers']   = true;
...now Bureaucrats can add users to the outliers group to allow them to access pages in the Outliers namespace. Pages in the Outliers namespace must all be prefixed with Outliers:. e.g., [Our Stuff] is in the Main namespace, but [Outliers:Our Stuff] is in the Outliers namespace and will be subject to the access controls we've just added.

Admin Topics


Creating a new wiki

Creating a new wiki requires privileged shell access on the web server

The instructions below describe creating a wiki manually. You should use the createwiki script, mcfeely:/export/home/bplecs/createwiki instead whenever possible.

ssh mcfeely
cd /export/data/www/wikiws
cp -pr protowiki < wikiname>
cd < wikiname > chmod 777 config
Now go to https://wiki.cs.umd.edu/ < wikiname > /config and fill out the form...
Database name: mediawikidb
database user: mediawikiuser
database password:
prefix:
cp -p LocalSettings.php ..
chmod 000 config
Mediawiki access restriction docs

Requiring email authentication before users may edit

Add these lines to the LocalSettings.php file:
$wgEmailAuthentication = true;
$wgEmailConfirmToEdit = true;

Restricting edits to registered users:

Add these lines to the LocalSettings.php file:
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
$wgShowIPinHeader = false; # For non-logged in users
Line 3 removes the link to the talk page (aka discussion page) in the header for non-logged in users.

Specifying a list of pages that anonymous users may see

Add these lines to the LocalSettings.php file:
$wgWhitelistRead = array( "Main Page", "Special:Userlogin", "-", "MediaWiki:Monobook.css" );
$wgGroupPermissions['*' ]['read'] = false;
Modify the contest of the array as necessary to grant access to the pages that you want to be visible.

This example only allows anonymous users to view the login page:

$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgWhitelistRead = array ("Special:Userlogin");
Mediawiki docs

Disallowing anonymous users create new accounts

Add this line to the LocalSettings.php file:
$wgGroupPermissions['*']['createaccount'] = false;
Mediawiki user rights docs

Allowing a registered user to create new accounts:

Either make the user a member of a group with the createaccount privilege (may be done by a Bureaucrat, or give that privilege to the user's group (may be done by an administrator)

Mediawiki user rights docs


Changing the site logo

Edit this line in the LocalSettings.php file:
$wgLogo = "$wgStylePath/common/images/umd.gif";
The file may be .png, .gif, or .jpg.

The path above defaults to < wikihome > /skins/common/images/umd.gif.

Mediawiki logo Doc


Enabling file uploads

Set this in the LocalSettings.php file:
$wgEnableUploads = true;
Also make sure that the wiki uploads directory (WIKIHOME/images) is writeable by the web server process. To enable file types other than images, add this line:
$wgFileExtensions = array( 'jar', 'java', 'zip', 'gzip', 'gz', 'doc', 'pdf' );
Note: This line replaces the list of accepted file extensions. Be sure to include the preexisting image file types if you want them as well.

Enabling inline TeX

First you need to enable uploads. (see above) This is NOT clearly documented.

Make sure you've built texvc. cd to WIKIHOME/math and run make.

Create the directory WIKIHOME/images/math and WIKIHOME/images/tmp and ensure that they are writeable by the web server.

Set this variable in the LocalSettings.php file:

$wgUseTeX = true;