Media Wiki Quick Cookbook

Wikis.MediaWiki History

Hide minor edits - Show changes to output

Added line 37:
Changed lines 34-35 from:
* Most of the configuration is done with $wgOPTIONS appended/inserted into
'LocalSettings.php'
to:
* Most of the configuration is done with $wgOPTIONS appended/inserted into LocalSettings.php
Changed lines 35-38 from:
'LocalSettings.php
to:
'LocalSettings.php'
Changed line 58 from:
to:
Changed lines 62-71 from:
to:
!! Setting uploads
*In LocalSettings.php, add:
[=
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'doc', 'xls', 'pdf' );
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;

=]
Changed line 93 from:
** http://grouplab.cpsc.ucalgary.ca/sketchbook|Sketching UX
to:
** http://grouplab.cpsc.ucalgary.ca/sketchbook|Sketching UX
Changed line 86 from:
** http://grouplab.cpsc.ucalgary.ca/sketchbook|Sketching UX
to:
** http://grouplab.cpsc.ucalgary.ca/sketchbook|Sketching UX
Changed lines 72-75 from:
[=
$wgLogo
= "$wgScriptPath/images/logos/mylogo.png";
=]
to:
** $wgLogo = "$wgScriptPath/images/logos/mylogo.png";

!! Removing the discussion tab
Since I don't have discussions on my site, I did the following
* Navigate to: http://yourname.cpsc.ucalgary.ca/index.php?title
=MediaWiki:Common.css
* this lets you edit a CSS page common to all pages
* Add the line:
** #ca-talk { display:none!important; }

!!Editing the Sidebar
* Go to http://yourname.cpsc.ucalgary.ca/index.php?title=MediaWiki:Sidebar
* The syntax for links on this page is somewhat different. For example,
* Title
** Main Page|Home
** http://grouplab.cpsc.ucalgary.ca/sketchbook|Sketching UX
Changed lines 62-75 from:
=]
to:
=]


!!Changing some default looks
!!!Changing the main logo in the sidebar on all pages
While you could just specify a URL, I
* ftped into the site,
* under images I created a folder called 'logos'.
* I then copied my logo image to it (e.g., mylogo.png).
* edited LocalSettings.php to change the existing myLogo variable as follows:
[=
$wgLogo = "$wgScriptPath/images/logos/mylogo.png";
=]
Changed lines 27-30 from:
When installed, mediawiki lets anyone read and edit your site. You obviously want to start by turning off edit capabilities as follows.

[=
# Disable for everyone
.
to:
When installed, mediawiki lets anyone read and edit your site. You obviously want to start by turning off edit capabilities. To do so, you have to log onto your account via a terminal emulator, than change into the www folder (or wherever your wiki is located) and edit the file LocalSettings.php as follows. I don't know what everything does, but its a starting point. YOu can find documentation as follows
* Everything is configured via the 'LocalSettings.php' configuration file which resides in the root of the installation (typically something like:
web2:/home/<yourname>/www/LocalSettings.php)
* A list of the configuration settings can be found here:
http://www.mediawiki.org/wiki/Manual:Configuration_settings
* A few examples of 'Group permissions' are given here:
http://www.mediawiki.org/wiki/Manual:User_rights
* Most of the configuration is done with $wgOPTIONS appended/inserted into
'LocalSettings.php



[=
################################################
## Group Permissions

# Make this false if you want the site only to be readable by someone who must log in
$wgGroupPermissions['*']['read'] = true;

# Disable editing for everyone.
Changed lines 48-50 from:
# Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.
$wgGroupPermissions['user']['edit'] = false;
# Make it so users with confirmed e-mail addresses are in the
group.
to:
# Disable editing for users, too: by default 'user' is allowed to edit, even if '*' is not.
#$wgGroupPermissions['user']['edit'] = false;

# Make it so users with confirmed e-mail addresses are in the
group.
Changed lines 54-55 from:
# Hide group from user list.
to:
# Hide group from user list.
Changed lines 57-58 from:
# Finally, set it to true for the desired group.
to:
# Finally, set it to true for the desired group.
Added lines 60-61:

#############################################
Changed lines 24-40 from:
** for secure ftp, use the SFTP protocol and Port 22
to:
** for secure ftp, use the SFTP protocol and Port 22

!! Setting basic permissions
When installed, mediawiki lets anyone read and edit your site. You obviously want to start by turning off edit capabilities as follows.

[=
# Disable for everyone.
$wgGroupPermissions['*']['edit'] = false;
# Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.
$wgGroupPermissions['user']['edit'] = false;
# Make it so users with confirmed e-mail addresses are in the group.
$wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED;
# Hide group from user list.
$wgImplicitGroups[] = 'emailconfirmed';
# Finally, set it to true for the desired group.
$wgGroupPermissions['emailconfirmed']['edit'] = true;
=]
Changed lines 19-21 from:
* Accessing your site: http://yourname.cpsc.ucalgary.ca
* Accessing CPanel: http://yourname.cpsc.ucalgary.ca/cpanel
* Accessing via ssh:
to:
* your root mediawiki site: http://yourname.cpsc.ucalgary.ca
* CPanel: http://yourname.cpsc.ucalgary.ca/cpanel
* ftp/ssh or equivalent:
** host is yourname.cpsc.ucalgary.ca,
** passwrod is same as CPanel
** for secure ftp, use the SFTP protocol and Port 22
Added lines 1-22:
(:title Media Wiki Quick Cookbook :)

We've been testing mediawiki as a possible replacement for PMWiki. According to Darcy, it is more secure and easily maintainable. This page contains a hodgepodge of notes that may help other people install and test it.

!!Installing MediaWiki
MediaWiki uses a database to store things. So if you want to install it on our CPSC machine, you will have to go to the system's folks for now; they will set it up for you.
* they will create a new website for you (eg., yourname.cpsc.ucalgary.ca/ ) that can contain your web content (although your old stuff won't be touched),
* you can ssh into that account to see files, etc. via Unix
* they will install and give you access to a new tool called CPanel that will help you manage all aspects of your web site (e.g., such as the ability to install wikis via a single button press).

Other handy things... instead of using SSH, you may want to consider filezilla which has a better interface:
* http://filezilla-project.org/download.php
* Specify port 22 for SFTP

Gotchas:
* the password protection for Cpanel (and thus your site) is different from the password protection for logging into your wiki, so you will have to change both. I've found changing the password for mediawiki surprisingly painful (or cryptic), while Cpanel is very restrictive of what passwords it will allow (it checks them strongly where it doesn't allow passwords that are easily cracked).

!! Accessing your various accounts
* Accessing your site: http://yourname.cpsc.ucalgary.ca
* Accessing CPanel: http://yourname.cpsc.ucalgary.ca/cpanel
* Accessing via ssh: