Help:Contents: Difference between revisions
| (11 intermediate revisions by 3 users not shown) | |||
| Line 2: | Line 2: | ||
Helpful links: | Helpful links: | ||
*[http://www.mediawiki.org/wiki/Documentation | *[http://www.mediawiki.org/wiki/Documentation WikiMedia Documentation] | ||
*[http://meta.wikimedia.org/wiki/Help:Editing | *[http://meta.wikimedia.org/wiki/Help:Contents WikiMedia Users Guide] | ||
*[http://meta.wikimedia.org/wiki/Help:Editing WikiMedia Editing Tips] | |||
===Text Editing=== | ===Text Editing=== | ||
| Line 35: | Line 35: | ||
::This was done by putting the word "here" inside double square brackets, <code><nowiki>[[here]]</nowiki></code>. | ::This was done by putting the word "here" inside double square brackets, <code><nowiki>[[here]]</nowiki></code>. | ||
*Select "Save page", then click "here", which is now in <b style="color:red">red</b>. Here I begin my new page. | *Select "Save page", then click "here", which is now in <b style="color:red">red</b>. Here I begin my new page. | ||
===Linking to an external page=== | ===Linking to an external page=== | ||
| Line 41: | Line 40: | ||
*Let's link to Steve Boyd's homepage here: http://www.enme.ucalgary.ca/~skboyd/. Nothing special, just the put the URL within the text. | *Let's link to Steve Boyd's homepage here: http://www.enme.ucalgary.ca/~skboyd/. Nothing special, just the put the URL within the text. | ||
::<code><nowiki>http://www.enme.ucalgary.ca/~skboyd/</nowiki></code> | ::<code><nowiki>http://www.enme.ucalgary.ca/~skboyd/</nowiki></code> | ||
*In order to have a more convenient name appear as the link, use single square brackets and type the desired name of the link, seperated by a space, within the brackets. [http://www.enme.ucalgary.ca/~skboyd/ Steve's | *In order to have a more convenient name appear as the link, use single square brackets and type the desired name of the link, seperated by a space, within the brackets. [http://www.enme.ucalgary.ca/~skboyd/ Steve's Homepage] | ||
::<code><nowiki>[http://www.enme.ucalgary.ca/~skboyd/ Steve's Homepage]</nowiki></code> | ::<code><nowiki>[http://www.enme.ucalgary.ca/~skboyd/ Steve's Homepage]</nowiki></code> | ||
| Line 284: | Line 283: | ||
*NB. Note how a link is automatically created to the picture's actual location within the image section - click on the image itself to see. | *NB. Note how a link is automatically created to the picture's actual location within the image section - click on the image itself to see. | ||
==Site Administration== | ==Site Administration== | ||
| Line 338: | Line 336: | ||
*Navigation bar - For a detailed explanation on editing the Navigation bar, see [http://meta.wikimedia.org/wiki/MediaWiki_FAQ#How_do_I_change_the_contents_of_the_navigation_toolbar.3F MediaWiki Navigation Help] | *Navigation bar - For a detailed explanation on editing the Navigation bar, see [http://meta.wikimedia.org/wiki/MediaWiki_FAQ#How_do_I_change_the_contents_of_the_navigation_toolbar.3F MediaWiki Navigation Help] | ||
:Summary: | :Summary: | ||
:*The following array should be moved to LocalSettings, from <code>includes/DefaultSettings.php </code>. It specifies the | :*The following array should be moved to LocalSettings, from <code>includes/DefaultSettings.php </code>. It specifies the pages which hold the text to be displayed in the navigation bar and the pages which hold the link of where each navigation bar tab points to. In other words, what appears here, in this array is not necessarily what will appear in the navigation bar; they are pages on the wiki site (or pointers within the database) to where this information is stored. | ||
$wgNavigationLinks = array ( | $wgNavigationLinks = array ( | ||
| Line 352: | Line 350: | ||
For example, one line in the navigation array for this site is: | For example, one line in the navigation array for this site is: | ||
::<code>array( 'text'=>'howto', 'href'=>'howto-url' ) </code> | ::<code>array( 'text'=>'howto', 'href'=>'howto-url' ) </code> | ||
If this was a new page you wanted to add, you'd have to log in as a SYSOP and then in the | |||
browser URL type <code>bonewiki.ucalgary.ca/~skboyd/wiki/index.php/MediaWiki:howto</code> | |||
*On the wiki site, there is a page <code>..../index.php/MediaWiki:howto</code> which holds the text to be displayed on the navigation bar. The text on this page is: | *On the wiki site, there is a page <code>..../index.php/MediaWiki:howto</code> which holds the text to be displayed on the navigation bar. The text on this page is: | ||
| Line 373: | Line 374: | ||
===Adding Users=== | ===Adding Users=== | ||
Depending on the access restrictions specified in the 'LocalSettings.php', the site can be designed such that anybody can access and edit any of | Depending on the access restrictions specified in the 'LocalSettings.php', the site can be designed such that anybody can access and edit any of the pages, or only registered users may log on to the site. Furthermore, the site can be configured such that only the 'sysop' of the site can create new accounts. These restrictions are set within the LocalSettings file. (See above for details). | ||
the pages, or only registered users may log on to the site. Furthermore, the site can be configured such that only the 'sysop' of the site can create | |||
new accounts. These restrictions are set within the LocalSettings file. (See above for details). | |||
:Note: This site has been configured so that only 'sysop' can create new accounts. | :Note: This site has been configured so that only 'sysop' can create new accounts. | ||
*Once logged in, the 'sysop' can select "Create an account or log in" from the "Special Pages" link of the toolbox, along the left margin. Here, the sysop creates a username and can then automatically email the new user a temporary password for the site. (This email will have the return address of the site administrator, as specified in LocalSettings.php. | |||
*Unfortunately, there is no easy way of deleting a user account. A user can be manually removed from the mySQL database, however this will most likely cause problems with other tables referring to this user or deleted row. This should only be done if you really understand mySQL. | |||
*Unfortunately, there is no easy way of deleting a user account. A user can be manually removed from the mySQL database, however this will most likely | |||
cause problems with other tables referring to this user or deleted row. This should only be done if you really understand mySQL. | |||
:*The best way to remove a user, is for the sysop to either block them, or rename their account/ change their password. | :*The best way to remove a user, is for the sysop to either block them, or rename their account/ change their password. | ||
*A user can be given 'sysop' and 'bureaucrat' priveleges by an existing sysop, from a link on the sysop's "Special Pages". (The original sysop is created | *A user can be given 'sysop' and 'bureaucrat' priveleges by an existing sysop, from a link on the sysop's "Special Pages". (The original sysop is created during site initialization). | ||
during site initialization). | |||
---- | ---- | ||
Latest revision as of 17:44, 23 July 2008
Basic Editing
[edit]Helpful links:
Text Editing
[edit]The simplest page modifications for this site are editing the text of a page. The text of a page can be edited all at once, or more practically section by section.
Editing a section:
[edit]- Click the adjacent edit tab at the top of the desired section.
- The browser now displays a large text box in the center of the page. Inside this box contains all of the text of the section.
- Note: There are several formatting conventions to be considered when adding text. These affect the margins, layout, bullets,
section organisation, etc. See the below section about Text Formatting for details.
- Once the text has been modified, select 'Save Page' below the text window.
- The change are now saved and the new, modified version of this page will appear.
Be careful whenever making any changes, because once the changes are saved, this becomes the new page. Therefore it is possible to delete entire sections. (For recovery of old page versions, see the Recent Changes page).
Editing an entire page
[edit]- Similar to above, but select the 'edit' tab at the top of the page. Now, the text for the entire page appears in the text editing
window.
- This is useful for changing the arrangement and ordering of sections but is not recommended for specific text editing.
Especially here, be careful when editing because the entire page could be deleted.
Creating a new page
[edit]Creating a new page is very simple. You just have to make a link to this new page from an existing page, and click the link. This will bring you to the editing window of this page, to which you can now add content.
- For example, let's make a new page here.
- This was done by putting the word "here" inside double square brackets,
[[here]].
- This was done by putting the word "here" inside double square brackets,
- Select "Save page", then click "here", which is now in red. Here I begin my new page.
Linking to an external page
[edit]The only difference here is that we use single square brackets, or none at all.
- Let's link to Steve Boyd's homepage here: http://www.enme.ucalgary.ca/~skboyd/. Nothing special, just the put the URL within the text.
http://www.enme.ucalgary.ca/~skboyd/
- In order to have a more convenient name appear as the link, use single square brackets and type the desired name of the link, seperated by a space, within the brackets. Steve's Homepage
[http://www.enme.ucalgary.ca/~skboyd/ Steve's Homepage]
Text Formatting
[edit]If you're familiar with HTML conventions, you can apply most of these on a wiki page, however wiki has many of its own conventions. The following table lists the text formatting operations applicable to this site.
| What appears on the Page | What you type |
|---|---|
|
Section Headers: This can't really be demonstrated within a table, but click the edit tab for various sections to see examples of sections. |
= Major Section= ==Section== ===Sub-Section=== ====Sub-Sub-Section==== |
| Newline:
Typing on the next line will not make a new line. But leaving one line empty does start a new line.
To start a new line without making a new paragraph |
Typing on the next line will not make a new line. But leaving one line empty does start a new line. To start a new line without making a new paragraph <br> Now we have a new line here. |
|
Lists
Starting a regular line like this ends the list.
|
*Lists are started like this. **They can also have sub lists ***and sub-sub lists. Starting a regular line like this ends the list. *But you can break <BR> lines <br> within a list <br> like this. *Then start a new line. |
|
Numbered Lists:
The end of the list.
|
#Numbered lists can be created automatically. #New number here ##I'm a number within a number. ##Me too. #Back to the original list. The end of the list. #Now here's a new list. |
|
Indenting
No indent here!
|
:Starting a line with a colon ::or several colons, you can indent the line. No indent here! :::::I'm super indented. :*Indenting, as well as bullets, and numbered lists can ::be combined. :#I'm number one :#*I'm almost one :#I'm only number two :( |
Starting every line with a space means that the text won't be formatted and should appear as typed. But be careful, lines no longer wrap automatically. *This can be useful for preformatted text but also, is nice for code because it makes this nice box. Another way to make text within this box is to use <pre> and </pre> We're inside a box. *Ya, isn't this cool. |
Starting every line with a
space means that the text won't be formatted
and should appear as typed. But be careful, lines no
longer wrap automatically.
*This can be useful for preformatted text
but also, is nice for code because it makes this nice box.
Another way to make text within this box is to use <pre> and </pre> <nowiki> <pre> We're inside a box. *Ya, isn't this cool.</nowiki> |
Tables
[edit]Tables, like the one above are very useful for organising information, or for specifying the layout of a page - placing text and images in certain locations.
- (Click edit of the table above as an example)
- A table begins and ends with <table> Table code </table>.
- A row begins and ends with <tr> Row code </tr>.
- A column begins and ends with <td> Column code </td>.
These are nested within each other: begin a table, row, column; end the column, row, table. These are nested within each other: begin a table, row, column; end the column, row, table.
- There are several options that may be set when starting a table, row, or column. The following is a list of the most useful.
- border - Sets the thickness of the border for the entire table, or can be invisible.
- ex:
border="n", (n = {0,1,2,3,etc.})
- align - sets the alignment of the table with respect to the page margins, or the text and objects within a cell.
- ex:
align="center", (or right, left).
- valign - sets the vertical alignment of the text and objects within a cell.
- ex:
valign="top", (bottom, middle).
- width, height - sets the width, height of the table and/or a column, row.
- ex:
width="90%" height="450', (size can be in number of pixels, or as a percentage).
- background - sets the background of a cell or table. This can be either a picture or a solid color.
- ex:
bgcolor="yellow"orbackground="mypicture.jpg".
Upload Help
[edit]- Once logged-on to the site, select the 'Upload file' link within the toolbox on the left side-bar.
- 'Browse' your system for the desired file, confirm its copyright compliance, and select Upload File.
- By default, a page will be created for this file with the filename as its address and, regardless of its type, will be classified as an image.
- The file is now stored in the image section of the site and can be linked to from any other page within the site, as follows.
- a) If the file is an image, then place the following code on a wiki page at the desired location of the image:
[[Image:my_favorite_image.jpg|picture_position,ie_right,left,center]]
- (The picture location is not necessary and could be left blank. See the example below.)
- b) If the file is not an image, then insert the following code where the file is to be downloaded:
- (This code should most likely be inserted into the Documents page)
[[Media:my_favorite_document.pdf| Document Link Name Displayed on Page]]
- NB. For a list of all the files available for download from the wiki site, both images and none images, go to the Special Pages link in the toolbox and then select Image list. This page lists all the uploaded files on the site and they can all be downloaded from here.
Examples
[edit]- click the adjacent 'edit' tabs to view the code for the examples.
Documents
[edit]Now let's provide a pdf document: I'm a pdf document
Images
[edit]Let's put an image of Steve here: File:Steve Boyd money.jpg
- NB. Note how a link is automatically created to the picture's actual location within the image section - click on the image itself to see.
Site Administration
[edit]Site Creation
[edit]The following explains how this wiki site was created. The intention is that in the event the site is lost, so long as the text from this page is backed-up somewhere, the site could be recreated. Also, just to complete the documentation, I have tried to outline all the steps that I took and explanations of parts that I had problems with while developing this site.
- The "wiki" interface of this site was developed by MediaWiki and this software runs in the background, on the server at all times. It
is this interface that allows users to edit pages, upload documents, and change a variety of settings, which is all stored in a database on the server.
- The database that is compatible with MediaWiki is mySQL. This is a standard database that is one of the packages included with the latest
Fedora Core for linux. This database caused several problems during the development of the first versions of the wiki site, however the version mySQL 4.1 has so far not caused any similar problems.
- It is useful to know that all the data from the site is stored on a mySQL database on the server, however there should be no need to ever
directly access this database, or try to edit or modify it directly.
- The one exception to this is for setting up the system operator (sysop) or bureaucrat privileges. (more on this later)
Install Instructions
[edit]Check out MediaWiki Installation
- Download the latest, stable version of mediawiki from wikipedia.sourcforge.
- The MediaWiki FAQs are excellent, and should provide clear and thorough instructions for downloading and installing the program.
(However here is a quick summary)
- Read the 'Install.txt' file for installation instructions and system requirements.
- The system requirements for the server (which could really be any computer set up appropriately, although preferably linux) are:
- Apache web server
- mySQL database
- PHP-mySQL package
- (If running a new version of Fedora Core, all of these can be installed as packages from the original boot disks).
- Uncompress and untar the mediawiki folder. It is advised to rename this folder something convenient, like wiki or mediawiki.
- Change the read/write access of the config directory to be readable by all. This folder contains the php script for the initial configuration.
chmod a+w config
- The next step is to browse into this folder from an internet browser. If this is run off of your linux box, you will need to find the folder open to the world
via http and move the entire mediawiki folder here. When I did it, it was:
- /var/www/html/
- Once the folder is there, browse
http://my_ip_address/mediawiki. The installation script should start and you can now fill in the boxes,
initializing the site and the database which will store all the site data.
- The on-screen instructions are rather self-explanatory and after filling in and confirming the necessary information, the site should be created.
- On the new page, the instructions will say to move the 'LocalSettings.php' file into your main mediawik folder and then delete the config directory.
- Once this is done, the 'LocalSettings.php' file now becomes the default script that loads the mainpage of the wiki site.
LocalSettings.php
[edit]This becomes the most important and useful file to change the apperance and customize the wiki site. Everything else can be done through the interface of the wiki site itself. Within this file, one can change the navigation bar on the left margin, the logo appearing in the upper left corner, the login restrictions, the name of the site, the ability to upload files, the name of the site, the contact information and address of the site administrator, among others.
- Navigation bar - For a detailed explanation on editing the Navigation bar, see MediaWiki Navigation Help
- Summary:
- The following array should be moved to LocalSettings, from
includes/DefaultSettings.php. It specifies the pages which hold the text to be displayed in the navigation bar and the pages which hold the link of where each navigation bar tab points to. In other words, what appears here, in this array is not necessarily what will appear in the navigation bar; they are pages on the wiki site (or pointers within the database) to where this information is stored.
- The following array should be moved to LocalSettings, from
$wgNavigationLinks = array ( array( 'text'=>'mainpage', 'href'=>'mainpage' ), array( 'text'=>'portal', 'href'=>'portal-url' ), array( 'text'=>'currentevents', 'href'=>'currentevents-url' ), array( 'text'=>'recentchanges', 'href'=>'recentchanges-url' ), array( 'text'=>'randompage', 'href'=>'randompage-url' ), array( 'text'=>'help', 'href'=>'helppage' ), array( 'text'=>'sitesupport', 'href'=>'sitesupport-url' ), );
For example, one line in the navigation array for this site is:
array( 'text'=>'howto', 'href'=>'howto-url' )
If this was a new page you wanted to add, you'd have to log in as a SYSOP and then in the
browser URL type bonewiki.ucalgary.ca/~skboyd/wiki/index.php/MediaWiki:howto
- On the wiki site, there is a page
..../index.php/MediaWiki:howtowhich holds the text to be displayed on the navigation bar. The text on this page is:
How To's
- There's another page on this wiki site,
..../index.php/MediaWiki:howto-urlwhich holds the page address of this navigation link's target.
How To
- The next step is to add the desired text and target to the pages on the wiki site, that are mentioned in the navigation array. These will initially be empty pages and must be edited for the navigations to work.
- Logo - This is the picture which appears in the top left corner throughout the site. At all times, this acts as a link returning to the mainpage. To customize this logo, replace the location of the logo picture in the following line of LocalSettings:
$wgLogo = "$wgScriptPath/myfavoritepicture.gif";
- (Could use another file type for the image, such as .png).
- Enable File Uploading - To enable file uploading, uncomment the following line, in LocalSettings.
$wgDisableUploads = false;
- - Then change the permissions on the image directory so that it is writable.
$chmod a+w images
Adding Users
[edit]Depending on the access restrictions specified in the 'LocalSettings.php', the site can be designed such that anybody can access and edit any of the pages, or only registered users may log on to the site. Furthermore, the site can be configured such that only the 'sysop' of the site can create new accounts. These restrictions are set within the LocalSettings file. (See above for details).
- Note: This site has been configured so that only 'sysop' can create new accounts.
- Once logged in, the 'sysop' can select "Create an account or log in" from the "Special Pages" link of the toolbox, along the left margin. Here, the sysop creates a username and can then automatically email the new user a temporary password for the site. (This email will have the return address of the site administrator, as specified in LocalSettings.php.
- Unfortunately, there is no easy way of deleting a user account. A user can be manually removed from the mySQL database, however this will most likely cause problems with other tables referring to this user or deleted row. This should only be done if you really understand mySQL.
- The best way to remove a user, is for the sysop to either block them, or rename their account/ change their password.
- A user can be given 'sysop' and 'bureaucrat' priveleges by an existing sysop, from a link on the sysop's "Special Pages". (The original sysop is created during site initialization).
Wiki software successfully installed.
Please see documentation on customizing the interface
and the User's Guide for usage and configuration help.