Difference between revisions of "MediaWiki/Presentation"

From Freephile Wiki
Jump to navigation Jump to search
(revert edits to fix search where character encoding was a problem)
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Draft}}
+
<!--
  
 +
== Preface ==
 +
This article is the basis for a presentation on MediaWiki that will be given at the January 14th 2009 meeting of the BostonPHP group.  [http://www.bostonphp.org/component/option,com_gigcal/task,details/gigcal_gigs_id,65/Itemid,42/ Please RSVP to the calendar item at the BostonPHP website] if you plan to attend.
 +
 +
 +
internal notes
  
 
http://en.wikipedia.org/wiki/Special:Preferences
 
http://en.wikipedia.org/wiki/Special:Preferences
<!--
+
 
 
# DONE Do slides on s5 so I can play and distribute the slides
 
# DONE Do slides on s5 so I can play and distribute the slides
 
# DONE write an extension that creates an s5 slideshow from mw article(s)
 
# DONE write an extension that creates an s5 slideshow from mw article(s)
# DONE Ask Andy Oram for the O'Reilly MediaWiki book
+
# DONE Contact Andy Oram about getting a copy of the O'Reilly MediaWiki book; invite
# 80% Write outline for Mark
+
# 85% Write outline, get more detail out at BostonPHP website
# 25% Publicize
+
# 100% Publicize // sent notice to local groups, O'Reilly, facebook, Meetup etc.
 
# 50% Complete presentation
 
# 50% Complete presentation
 
## 10% Images
 
## 10% Images
Line 17: Line 22:
  
 
== Intro ==
 
== Intro ==
MediaWiki is the free software (GPL) that runs Wikipedia under the auspices of the Wikimedia Foundation.
+
<!--
 +
 
 +
Cue POTY slideshow and play in loop 30 minutes prior to presentation
 +
Cue MediaWiki slideshow 5 minutes prior to presentation
 +
There is video, but so far I haven't been able to slice it and keep the audio track intact.
 +
-->
 +
These screenshots of [[:Category:MediaWiki Sites|sites running MediaWiki]] illustrate the breadth of usage in the software world, and also some compelling theming examples.
  
I'm Greg Rundlett, a free software advocate who lives in Newburyport, MA with my wife and two sons. I'm here to show you a lot of things about the wiki system called MediaWiki and hope that you'll take away a lot from this presentation. The great thing about sharing knowledge; like sharing free software; is that you can take away as much as you possibly can and I may take away an even greater knowledge than I started with just from our sharing.
+
Audio of my presentation is at http://www.archive.org/details/collaboration.at.wiki.speed-audio-part1 <!-- and locally at http://freephile.com/mediawiki-greg.mp3 (45 minutes long) -->
  
Oh, and I do have some tangible free and cool stuff too. Freebies (books, commons)
+
== What's a Wiki? ==
 +
Wiki is the Hawaiian word for quick, and Ward Cunningham - the inventor of the wiki - named his project after the wiki wiki shuttle. A backcronym that is probably equally apropos is WIKI stands for "What I Know Is..." MediaWiki is the free software (GPL) that runs Wikipedia under the auspices of the [http://www.wikimedia.org/ Wikimedia Foundation].
  
== Using it ==
+
== Meet the speaker ==
I'm not going into a detailed comparison of various wikis, trying to argue which is best.  But I'll point out a few reasons why you should care about MediaWiki in case you don't know.
+
[[Image:Thomas Jefferson rev.jpg|thumb|right|He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me.]]
  
It's the most popular wiki in the world.  In practical terms that means people you hire will know mediawiki.
+
I'm Greg Rundlett [http://iic.harvard.edu/people] [http://freephile.com] [http://rundlett.com], a free software advocate who lives in Newburyport, MA with my wife and two sons.
The growth is exponential.  The quality is excellent.
+
 
 +
 
 +
<!--
 +
What do I know about wikis in production?  Well, back in 1999 when I was a web developer at RagingBull, we used a wiki system as a content creation and management backend to our website front-end.  Starting in 2005, I used MediaWiki as the platform to organize operations, development and technology services at OASIS.  Most recently, I've been deploying MediaWiki in my new role at the IIC at Harvard.  I'm here to share some of that experience with you.  The great thing about sharing knowledge; like sharing free software; is... [http://en.wikiquote.org/wiki/Thomas_Jefferson quoting Thomas Jefferson] ''He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me.''<ref>[http://press-pubs.uchicago.edu/founders/documents/a1_8_8s12.html Thomas Jefferson to Isaac McPherson], 13 Aug. 1813. ME 13:333</ref>
 +
 
 +
Plus our organizer Mark Withington has arranged through the BostonPHP association with O'Reilly Media for some free books to be given away as well.
 +
-->
 +
== Using it - Why? ==
 +
Wikis are immensely popular and come in many flavors.  It was late 2006 to early 2007 when 'wiki' reached it's zenith as a buzzword in the news.<ref>[http://www.google.com/trends?q=wiki Google Trends for keyword wiki]</ref>  But wikis have not faded into the sunset like last years fashion.  I'll point out a few reasons why you should choose MediaWiki as your wiki platform.
 +
 
 +
It's the most popular wiki software in the world; both in terms of hosting the largest single wiki [http://en.wikipedia.org/wiki/Main_Page WikiPedia] as well as deployments by all sort of individuals, groups and corporations.  In practical terms that means people you hire will know MediaWiki.
 +
The growth curve of MediaWiki is exponential.  The quality of the software is excellent.
 
Does your wiki have [http://wikimania2006.wikimedia.org/wiki/Main_Page conferences]?
 
Does your wiki have [http://wikimania2006.wikimedia.org/wiki/Main_Page conferences]?
[[Image:Logo Buenos Aires.jpg|thumb|300px|WikiMania]]
+
[[Image:Logo Wikimania Buenos Aires.jpg|thumb|300px|WikiMania]]
 +
 
 +
WikiPedia now has over ten million articles across 250 languages!
 +
 
 +
Does your wiki have [http://wikimediafoundation.org/wiki/Home a foundation] to keep it going?
  
Does your wiki have a foundation to keep it going?
+
Does your wiki have a [http://commons.wikimedia.org/ multimedia repository] which hosts over 3,400,000 multimedia files? Wikimedia Commons does.
  
I do want to point out that MediaWiki does not use <ref>CamelCase</ref> words in order to make a link.  This means a lot to all the Irish people of the world, and also the marketers who seem pretty convinced of the coolness of McWords like ThinkPad, etc.
+
=== Syntax ===
 +
I do want to point out that MediaWiki does not use CamelCase words in order to make a link.  This means a lot to all the Irish people of the world, and also the marketers who seem pretty convinced of the coolness of McWords like ThinkPad, etc.
  
 
MediaWiki syntax is easy to learn, and easy to use.  In fact, you might already be using it without even knowing it.
 
MediaWiki syntax is easy to learn, and easy to use.  In fact, you might already be using it without even knowing it.
Line 48: Line 76:
 
is an ordered list.
 
is an ordered list.
  
http://example.com links are automatic and by using a simple bracket notation, you can make them prettier and more meaningful <nowki>[http://www.vimeo.com/2142196 See the kids in their Halloween costumes]</nowiki> [http://www.vimeo.com/2142196 See the kids in their Halloween costumes]
+
http://example.com links are automatic and by using a simple bracket notation, you can make them prettier and more meaningful e.g. <pre>[http://www.vimeo.com/2142196 See the kids in their Halloween costumes]</pre> yields
 +
[http://www.vimeo.com/2142196 See the kids in their Halloween costumes]
  
* External editor
+
=== Editor Options ===
* Wysiwyg editor
+
; WYSIWYG editor :Weird Yucky Sucky Interference With Your Goodness
[http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd WikEd] is a full wysiwyg editor with special features for MediaWiki.  You can install it for yourself in a single browser as a user script http://userscripts.org/scripts/show/12529 or you can install it into your mediawiki installation.
+
 
* Style sheets and
+
<ol>
* Use this http://userscripts.org/scripts/show/6372 greasemonkey script to show any mediawiki page as a presentation
+
<li> [http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd WikEd] is a full wysiwyg editor with special features for MediaWiki.  You can install it for yourself in a single browser as a user script http://userscripts.org/scripts/show/12529 or you can install it into your MediaWiki installation.
 +
{{Messagebox |
 +
|type=normal
 +
|text=wikEd is enabled sitewide on this wiki.  Turn it on in your [[Special:Preferences|Preferences]] settings}}
 +
<li> FCK Editor is a full wysiwyg editor that includes page link searching as you type
 +
<li> Java project called Textile-J is now an Eclipse plugin called the "Mylyn WikiText component" that does wiki markup http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-1098.html
 +
<li> Kaltura does a collaborative video editing solution http://corp.kaltura.com/wiki/index.php/MediaWiki_Extension
 +
</ol>
  
=== WikEd ===
+
==== WikEd ====
 
* Wikicode syntax highlighting
 
* Wikicode syntax highlighting
 
* Pasting, import, and conversion of formatted text, e.g. from Microsoft-Word and web pages
 
* Pasting, import, and conversion of formatted text, e.g. from Microsoft-Word and web pages
Line 69: Line 105:
 
* Improved diff display
 
* Improved diff display
 
* Follow links and wiki-links (ctrl-click)
 
* Follow links and wiki-links (ctrl-click)
* Runs automatically on every MediaWiki installation when installed as a local Greasemonkey user script
+
* Runs automatically on every MediaWiki installation when installed as a local [https://addons.mozilla.org/en-US/firefox/addon/748 Greasemonkey] user script
 
For more details, see the [http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd WikEd] homepage
 
For more details, see the [http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd WikEd] homepage
 +
 +
==== FCK Editor ====
 +
* http://www.MediaWiki.org/wiki/Extension:FCKeditor_(by_FCKeditor_and_Wikia)
 +
In 2007 it was announced that a WYSIWYG editor would be built for MediaWiki.  Wikia (Jimmy Wales' for-profit venture) started work on it.  It still isn't ready for prime time.  Note that I had to patch a minor bug to get it to work and even then, it did funny things with my article (wanted to collapse a line-break between template tag and next line resulting in a space being inserted prior to the next line, resulting in preformatted text rendering for that line.
 +
 +
==== OpenOffice ====
 +
OpenOffice (since v. 2.3) has had a built-in "Export to MediaWiki" menu option.  So, you can write an article in OpenOffice Writer (or StarOffice Writer) and export the file to wiki markup.  This could be useful particularly if you want to convert large collections of Word documents.  One drawback to "export" is that you would still have to copy and paste that output into the wiki.  http://extensions.services.openoffice.org/project/wikipublisher is the extra hook that allows you to save your page in the wiki (essentially registering your user data in the instance of OpenOffice
 +
 +
Other points about using MediaWiki
 +
* Style sheets and
 +
* Use this http://userscripts.org/scripts/show/6372 Greasemonkey script to show any MediaWiki page as a presentation
 +
 +
  
 
== Features ==
 
== Features ==
Line 79: Line 128:
 
# Section editing
 
# Section editing
 
# Magic words
 
# Magic words
##
+
##<pre>__NOTOC__, __TOC__ #REDIRECT __HIDDENCAT__</pre>
 
+
##<pre>{{NUMBEROFARTICLES}} {{NUMBEROFEDITS}} {{NUMBEROFUSERS}}</pre>
 
 
<nowiki>__NOTOC__, __TOC__ #REDIRECT __HIDDENCAT__</nowiki>  
 
##
 
 
 
 
 
<nowiki>{{NUMBEROFARTICLES}} {{NUMBEROFEDITS}} {{NUMBEROFUSERS}}</nowiki>  
 
 
# Search - OpenSearch
 
# Search - OpenSearch
 
# Interwiki links
 
# Interwiki links
# Import/Export
+
# Import/Export (TODO talk about exporting to text)
 
# Special pages
 
# Special pages
##
+
##<pre>[[Special:ListGroupRights]]</pre>
 
+
# Image Galleries like [[Special:NewImages]]
 
+
# SVG support
<nowiki>[[Special:ListGroupRights]]</nowiki> Image searching
+
# Protection (lock a page) Not to be confused with 'versions' that helps with things like versioned documentation for software products.
# Protection
+
# Microformats  Wikipedia implements microformats easily because through the power of templates, an author can fill out a template and not even know that he is using microformats in the final product.  Firefox, through the tails extension, can [http://vimeo.com/192962/ export microformats via bluetooth], so that an employee directory on your intranet can talk to your mobile phone.  @TODO: write up a contact template, a contact page and test the export
  
 
== Creating Structure ==
 
== Creating Structure ==
 
# Wikifarm
 
# Wikifarm
# Namespaces <dl>
+
# [[Namespaces]] or go directly to [[Special:PrefixIndex]]<dl>
 
## <dt> Main <dd> What is sounds like, there is no need to specify this namespace when making links
 
## <dt> Main <dd> What is sounds like, there is no need to specify this namespace when making links
 
## <dt> Image <dd> Used for all file uploads, whether image, video, sound, doc or whatever.  Each upload creates it's own article within this namespace
 
## <dt> Image <dd> Used for all file uploads, whether image, video, sound, doc or whatever.  Each upload creates it's own article within this namespace
 
## <dt> Project <dd> Used as a "About Us" namespace -- not used for the main content of your wiki, but normally reserved for pages about the project which created the wiki.  If you need to do a substantial edit to a template and want to try it out, one method of doing that would be to copy the article into the project namespace, use the new template, and your article wouldn't be normally included in search results.
 
## <dt> Project <dd> Used as a "About Us" namespace -- not used for the main content of your wiki, but normally reserved for pages about the project which created the wiki.  If you need to do a substantial edit to a template and want to try it out, one method of doing that would be to copy the article into the project namespace, use the new template, and your article wouldn't be normally included in search results.
## <dt> Help <dd> What it sounds like, this namespace is
+
## <dt> Help <dd> What it sounds like, this namespace is unfortunately empty with a new installation. See [[MediaWiki/Help]]
 
## <dt> Template <dd>
 
## <dt> Template <dd>
 
## <dt> Category <dd>
 
## <dt> Category <dd>
Line 110: Line 153:
 
</dl>
 
</dl>
 
# Subpages
 
# Subpages
# Templates "transclusion"
+
# [[Templates]] "[[transclusion]]"
##
+
## <pre><noinclude> </noinclude> <includeonly></includeonly></pre> [[Template:Messagebox]] example.
 
 
 
 
<nowiki><noinclude> </noinclude> <includeonly></includeonly></nowiki> show example.
 
 
## arguments
 
## arguments
 
## Templates used on this page
 
## Templates used on this page
## copying from mediawiki [[Special:ExpandTemplates]]
+
## copying from MediaWiki [[Special:ExpandTemplates]]
 
# Categories
 
# Categories
 
# Navigation (talk about in Administration)
 
# Navigation (talk about in Administration)
  
 +
== Administering it ==
 +
The LocalSettings.php file is the main point of configuration for the wiki administrator.  It overrides all the defaults set in includes/DefaultSettings.php
 +
{{Messagebox
 +
| type = restricted
 +
| text = You can remove the database configuration lines into it's own file and then include that file from LocalSettings so that you now can commit LocalSettings to your version control repository without revealing the db credentials.}}
 +
<source lang="php">
 +
## Database settings
 +
## moved to a separate file so that we can track changes to the general config in version control, without checking in our db credentials
 +
require_once( "$IP/DatabaseSettings.php" );
 +
</source>
  
== Administering it ==
+
One good practice is to have some sort of text version or other backup of your wiki in case the machine, webserver, or database that the system depends on is down.  As an administrator, you can use the dumpBackup.php script found in the <code>maintenance</code> directory of you MediaWiki installation.  Something like the following in a system [[cron]] would be good:
* Custom menu
+
<source lang="bash">
 +
/usr/bin/php /var/www/phase3/maintenance/dumpBackup.php --current --output=file:/var/backups/example.com/`date +%F`-wiki.text.export.txt
 +
</source>
 +
 
 +
As a user, one tool that can come in handy is [[Special:Wiki2XML]] <ref>http://tools.wikimedia.de/~magnus/wiki2xml/README, see also [[Format_conversion]]</ref>
 +
 
 +
Another useful tool to the Administrator is the bulk image importer.  To import all the screenshots that I used at the start of this presentation, I did the following:
 +
<source lang="bash">
 +
php importImages.php --user=Freephile --comment='Set of screenshots of sites using MediaWiki ' ~/Desktop/mediawiki/snaps/
 +
</source>
 +
Note how using a Category tag in the comment will automatically place the images in the Category specified.
  
 
== Developing it ==
 
== Developing it ==
Line 129: Line 189:
 
# Extensions
 
# Extensions
 
# Conversion of existing wikis and documents [[Format conversion]]
 
# Conversion of existing wikis and documents [[Format conversion]]
 +
# [[API]]s are very useful to developers.  [[mw:Developers|MediaWiki Developers]] can use the [[mw:API|Application Programming Interface for MediaWiki]] which gets exposed at /api.php, as well as the http://meta.wikimedia.org/wiki/Pywikipediabot framework which helps to automate manipulation of the wiki.
 +
# Database
  
 
=== Theming ===
 
=== Theming ===
 
The quickest thing you do is change the menu and the logo
 
The quickest thing you do is change the menu and the logo
 +
see [[MediaWiki/Theming]]
  
 
=== Extensions ===
 
=== Extensions ===
# [http://www.mediawiki.org/wiki/Manual:Extensions The Manual]
+
# [http://www.MediaWiki.org/wiki/Manual:Extensions The Manual]
# [http://www.mediawiki.org/wiki/Extension_Matrix An incomplete list of extensions]
+
# [http://www.MediaWiki.org/wiki/Extension_Matrix An incomplete list of extensions]
  
 
So many examples, which ones to highlight?
 
So many examples, which ones to highlight?
Line 142: Line 205:
 
Any wiki site you visit, you can see the installed extensions by viewing the Special:Version page
 
Any wiki site you visit, you can see the installed extensions by viewing the Special:Version page
 
* http://wiki.case.edu/Special:Version
 
* http://wiki.case.edu/Special:Version
 +
* http://help.wikia.com/wiki/Special:Version
 +
* http://wiki.eclipse.org/index.php/Special:Version
 +
 +
See more at [[MediaWiki/Extensions]]
  
 
==== Timelines  ====
 
==== Timelines  ====
# http://www.mediawiki.org/wiki/Extension:EasyTimeline
+
# http://www.MediaWiki.org/wiki/Extension:EasyTimeline
 
# http://www.ehartwell.com/InfoDabble/MediaWiki_extension:_Timeline
 
# http://www.ehartwell.com/InfoDabble/MediaWiki_extension:_Timeline
 
MIT's SIMILE project Timeline is integrated into Semantic MediaWiki
 
MIT's SIMILE project Timeline is integrated into Semantic MediaWiki
 
* e.g. http://semanticweb.org/wiki/Events
 
* e.g. http://semanticweb.org/wiki/Events
 +
 +
=== Database ===
 +
The MediaWiki software uses a MySQL database backend to store content and other data.  The [[MediaWiki/Sql]] article offers a couple helpful queries; whereas [[mw:Manual:Database_access]] covers this area more completely including info on API functions and wrappers.
  
 
== Getting it, Installing it ==
 
== Getting it, Installing it ==
MediaWiki is developed using a Continuous Integration approach meaning that their trunk is tested and running in production http://www.mediawiki.org/wiki/Version_lifecycle
+
MediaWiki is developed using a Continuous Integration approach meaning that their trunk is tested and running in production http://www.MediaWiki.org/wiki/Version_lifecycle
  
 
{| class="datatable"
 
{| class="datatable"
Line 171: Line 241:
 
| bgcolor="#FF1000" | September 2008
 
| bgcolor="#FF1000" | September 2008
 
|}
 
|}
[http://www.mediawiki.org/wiki/Download_from_SVN use svn] to get it, and that way updating your installation is as simple as <code>svn up</code>
+
[http://www.MediaWiki.org/wiki/Download_from_SVN use svn] to get it, and that way updating your installation is as simple as <code>svn up</code>
  
  
Line 177: Line 247:
 
=== Creating Slideshows ===
 
=== Creating Slideshows ===
 
[[MediaWiki/Slideshow]]
 
[[MediaWiki/Slideshow]]
 
+
<pre><slide>pixel</slide></pre> will create a nice slideshow
 
+
<slide>pixel</slide>
 
 
 
 
<nowiki><slide>flower</slide></nowiki> will create a nice slideshow
 
 
from http://meta.wikimedia.org/wiki/User:BR/S5_slide_for_mediawiki_documentation/en
 
from http://meta.wikimedia.org/wiki/User:BR/S5_slide_for_mediawiki_documentation/en
  
 
=== Integration with Software Development ===
 
=== Integration with Software Development ===
# CodeReview http://www.mediawiki.org/wiki/Extension:CodeReview
+
# CodeReview http://www.MediaWiki.org/wiki/Extension:CodeReview e.g. http://www.MediaWiki.org/wiki/Special:Code/MediaWiki/44245#c829
e.g. http://www.mediawiki.org/wiki/Special:Code/MediaWiki/44245#c829
+
# [http://www.MediaWiki.org/wiki/Extension:ExtensionDistributor ExtensionDistributor] ([https://wikitech.leuksman.com/view/ExtensionDistributor info]) is a tool that automatically packages code from subversion and sends the user a tarball.  There is a lot of interesting information at wikitech that describes how the WikiMedia Foundation is operated technically
 
 
  
 
=== Setup for an intranet and/or KB ===
 
=== Setup for an intranet and/or KB ===
Line 195: Line 261:
 
=== Publishing ===
 
=== Publishing ===
 
Wiki is quick markup.
 
Wiki is quick markup.
Feed recent changes into publishing system that moves those out into front-end -- even static.
+
Feed recent changes into publishing system that moves those out into front-end -- even static. In this sense, you can have editors feeding content into your website.  We did this at Raging Bull - a company that I worked at back in 1999 (already several years after [http://en.wikipedia.org/wiki/Ward_Cunningham Ward Cunningham] first developed the wiki concept).
 +
 
 +
Another example that is clearly "publishing"-centric is the way that wikis are used to put books online:
 +
* http://cyber.law.harvard.edu/wealth_of_networks/Main_Page (@TODO add thumbnails) [http://www.ted.org/index.php/talks/yochai_benkler_on_the_new_open_source_economics.html Watch Yochai Benkler's presentation] over at TED.org
 +
* http://en.wikibooks.org/wiki/Main_Page
 +
 
 +
 
  
 
== One Hack ==
 
== One Hack ==
Line 201: Line 273:
 
* http://commons.wikimedia.org/wiki/MediaWiki:UploadForm.js/Documentation
 
* http://commons.wikimedia.org/wiki/MediaWiki:UploadForm.js/Documentation
 
* http://commons.wikimedia.org/wiki/Commons:Redesigning_the_upload_form
 
* http://commons.wikimedia.org/wiki/Commons:Redesigning_the_upload_form
* http://www.mediawiki.org/wiki/User:Pfctdayelise/Manual:Uselang_hack
+
* http://www.MediaWiki.org/wiki/User:Pfctdayelise/Manual:Uselang_hack
  
 
== Resources ==
 
== Resources ==
* Book
+
* Daniel J. Barrett wrote the [http://oreilly.com/catalog/9780596519797/toc.html MediaWiki Book] published by O'Reilly  ISBN 978-0596519797 (no need for any special markup, ISBN numbers are automatically recognized by the parser.  You can also visit [[Special:BookSources]])
 
* IRC
 
* IRC
* Manual
+
* Documentation (remember [[mw:Help:Contents|user at Help:Contents]] and [[mw:Manual:Contents|admin at Manual:Contents]])
 
* Source
 
* Source
 
* [http://userscripts.org/tags/wikipedia More user scripts]
 
* [http://userscripts.org/tags/wikipedia More user scripts]
 +
* WikiMania videos, audio and transcripts
 +
 +
== Notes ==
 +
<references />
  
 +
[[Category:MediaWiki Sites]]
 +
[[Category:MediaWiki Sites|sites running MediaWiki]]
 +
[[Category:Book references]]
 
[[Category:Wiki]]
 
[[Category:Wiki]]
 
[[Category:Presentations]]
 
[[Category:Presentations]]
 
[[Category:Howto]]
 
[[Category:Howto]]

Latest revision as of 08:50, 31 December 2018


Intro[edit | edit source]

These screenshots of sites running MediaWiki illustrate the breadth of usage in the software world, and also some compelling theming examples.

Audio of my presentation is at http://www.archive.org/details/collaboration.at.wiki.speed-audio-part1

What's a Wiki?[edit | edit source]

Wiki is the Hawaiian word for quick, and Ward Cunningham - the inventor of the wiki - named his project after the wiki wiki shuttle. A backcronym that is probably equally apropos is WIKI stands for "What I Know Is..." MediaWiki is the free software (GPL) that runs Wikipedia under the auspices of the Wikimedia Foundation.

Meet the speaker[edit | edit source]

He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me.

I'm Greg Rundlett [1] [2] [3], a free software advocate who lives in Newburyport, MA with my wife and two sons.


Using it - Why?[edit | edit source]

Wikis are immensely popular and come in many flavors. It was late 2006 to early 2007 when 'wiki' reached it's zenith as a buzzword in the news.[1] But wikis have not faded into the sunset like last years fashion. I'll point out a few reasons why you should choose MediaWiki as your wiki platform.

It's the most popular wiki software in the world; both in terms of hosting the largest single wiki WikiPedia as well as deployments by all sort of individuals, groups and corporations. In practical terms that means people you hire will know MediaWiki. The growth curve of MediaWiki is exponential. The quality of the software is excellent. Does your wiki have conferences?

WikiPedia now has over ten million articles across 250 languages!

Does your wiki have a foundation to keep it going?

Does your wiki have a multimedia repository which hosts over 3,400,000 multimedia files? Wikimedia Commons does.

Syntax[edit | edit source]

I do want to point out that MediaWiki does not use CamelCase words in order to make a link. This means a lot to all the Irish people of the world, and also the marketers who seem pretty convinced of the coolness of McWords like ThinkPad, etc.

MediaWiki syntax is easy to learn, and easy to use. In fact, you might already be using it without even knowing it.

  • this
  • is
  • a list

and

  1. Family
  2. Community
  3. Work
  4. Country

is an ordered list.

http://example.com links are automatic and by using a simple bracket notation, you can make them prettier and more meaningful e.g.

[http://www.vimeo.com/2142196 See the kids in their Halloween costumes]

yields

See the kids in their Halloween costumes

Editor Options[edit | edit source]

WYSIWYG editor
Weird Yucky Sucky Interference With Your Goodness
  1. WikEd is a full wysiwyg editor with special features for MediaWiki. You can install it for yourself in a single browser as a user script http://userscripts.org/scripts/show/12529 or you can install it into your MediaWiki installation.

    wikEd is enabled sitewide on this wiki. Turn it on in your Preferences settings

  2. FCK Editor is a full wysiwyg editor that includes page link searching as you type
  3. Java project called Textile-J is now an Eclipse plugin called the "Mylyn WikiText component" that does wiki markup http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-1098.html
  4. Kaltura does a collaborative video editing solution http://corp.kaltura.com/wiki/index.php/MediaWiki_Extension

WikEd[edit | edit source]

  • Wikicode syntax highlighting
  • Pasting, import, and conversion of formatted text, e.g. from Microsoft-Word and web pages
  • Regular expression search and replace
  • Edit preview and show changes on the same page without reloading
  • Fullscreen editing mode
  • Single-click fixing of common mistakes
  • History for summary, search, and replace fields
  • Jump to selected heading
  • Type-ahead find
  • Support for many languages
  • Improved diff display
  • Follow links and wiki-links (ctrl-click)
  • Runs automatically on every MediaWiki installation when installed as a local Greasemonkey user script

For more details, see the WikEd homepage

FCK Editor[edit | edit source]

In 2007 it was announced that a WYSIWYG editor would be built for MediaWiki. Wikia (Jimmy Wales' for-profit venture) started work on it. It still isn't ready for prime time. Note that I had to patch a minor bug to get it to work and even then, it did funny things with my article (wanted to collapse a line-break between template tag and next line resulting in a space being inserted prior to the next line, resulting in preformatted text rendering for that line.

OpenOffice[edit | edit source]

OpenOffice (since v. 2.3) has had a built-in "Export to MediaWiki" menu option. So, you can write an article in OpenOffice Writer (or StarOffice Writer) and export the file to wiki markup. This could be useful particularly if you want to convert large collections of Word documents. One drawback to "export" is that you would still have to copy and paste that output into the wiki. http://extensions.services.openoffice.org/project/wikipublisher is the extra hook that allows you to save your page in the wiki (essentially registering your user data in the instance of OpenOffice

Other points about using MediaWiki


Features[edit | edit source]

  1. Recent Changes
  2. Watchlist
  3. Preferences
  4. Automatic TOC
  5. Section editing
  6. Magic words
    1. __NOTOC__, __TOC__ #REDIRECT __HIDDENCAT__
    2. {{NUMBEROFARTICLES}} {{NUMBEROFEDITS}} {{NUMBEROFUSERS}}
  7. Search - OpenSearch
  8. Interwiki links
  9. Import/Export (TODO talk about exporting to text)
  10. Special pages
    1. [[Special:ListGroupRights]]
  11. Image Galleries like Special:NewImages
  12. SVG support
  13. Protection (lock a page) Not to be confused with 'versions' that helps with things like versioned documentation for software products.
  14. Microformats Wikipedia implements microformats easily because through the power of templates, an author can fill out a template and not even know that he is using microformats in the final product. Firefox, through the tails extension, can export microformats via bluetooth, so that an employee directory on your intranet can talk to your mobile phone. @TODO: write up a contact template, a contact page and test the export

Creating Structure[edit | edit source]

  1. Wikifarm
  2. Namespaces or go directly to Special:PrefixIndex
    1. Main
      What is sounds like, there is no need to specify this namespace when making links
    2. Image
      Used for all file uploads, whether image, video, sound, doc or whatever. Each upload creates it's own article within this namespace
    3. Project
      Used as a "About Us" namespace -- not used for the main content of your wiki, but normally reserved for pages about the project which created the wiki. If you need to do a substantial edit to a template and want to try it out, one method of doing that would be to copy the article into the project namespace, use the new template, and your article wouldn't be normally included in search results.
    4. Help
      What it sounds like, this namespace is unfortunately empty with a new installation. See MediaWiki/Help
    5. Template
    6. Category
    7. Special
    8. MediaWiki
      MediaWiki:Sidebar
  1. Subpages
  2. Templates "transclusion"
    1. <noinclude> </noinclude> <includeonly></includeonly>
      Template:Messagebox example.
    2. arguments
    3. Templates used on this page
    4. copying from MediaWiki Special:ExpandTemplates
  3. Categories
  4. Navigation (talk about in Administration)

Administering it[edit | edit source]

The LocalSettings.php file is the main point of configuration for the wiki administrator. It overrides all the defaults set in includes/DefaultSettings.php

You can remove the database configuration lines into it's own file and then include that file from LocalSettings so that you now can commit LocalSettings to your version control repository without revealing the db credentials.

## Database settings
## moved to a separate file so that we can track changes to the general config in version control, without checking in our db credentials
require_once( "$IP/DatabaseSettings.php" );

One good practice is to have some sort of text version or other backup of your wiki in case the machine, webserver, or database that the system depends on is down. As an administrator, you can use the dumpBackup.php script found in the maintenance directory of you MediaWiki installation. Something like the following in a system cron would be good:

/usr/bin/php /var/www/phase3/maintenance/dumpBackup.php --current --output=file:/var/backups/example.com/`date +%F`-wiki.text.export.txt

As a user, one tool that can come in handy is Special:Wiki2XML [2]

Another useful tool to the Administrator is the bulk image importer. To import all the screenshots that I used at the start of this presentation, I did the following:

php importImages.php --user=Freephile --comment='Set of screenshots of sites using MediaWiki ' ~/Desktop/mediawiki/snaps/

Note how using a Category tag in the comment will automatically place the images in the Category specified.

Developing it[edit | edit source]

  1. Theming
  2. Extensions
  3. Conversion of existing wikis and documents Format conversion
  4. APIs are very useful to developers. MediaWiki Developers can use the Application Programming Interface for MediaWiki which gets exposed at /api.php, as well as the http://meta.wikimedia.org/wiki/Pywikipediabot framework which helps to automate manipulation of the wiki.
  5. Database

Theming[edit | edit source]

The quickest thing you do is change the menu and the logo see MediaWiki/Theming

Extensions[edit | edit source]

  1. The Manual
  2. An incomplete list of extensions

So many examples, which ones to highlight?

  1. Case Western University's Google Map Extension

Any wiki site you visit, you can see the installed extensions by viewing the Special:Version page

See more at MediaWiki/Extensions

Timelines[edit | edit source]

  1. http://www.MediaWiki.org/wiki/Extension:EasyTimeline
  2. http://www.ehartwell.com/InfoDabble/MediaWiki_extension:_Timeline

MIT's SIMILE project Timeline is integrated into Semantic MediaWiki

Database[edit | edit source]

The MediaWiki software uses a MySQL database backend to store content and other data. The MediaWiki/Sql article offers a couple helpful queries; whereas mw:Manual:Database_access covers this area more completely including info on API functions and wrappers.

Getting it, Installing it[edit | edit source]

MediaWiki is developed using a Continuous Integration approach meaning that their trunk is tested and running in production http://www.MediaWiki.org/wiki/Version_lifecycle

Version Release date End-of-life
1.14.x Not released
1.13.x August 14, 2008 August 2009
1.12.x March 20, 2008 March 2009
1.11.x September 10, 2007 September 2008

use svn to get it, and that way updating your installation is as simple as svn up


In Production[edit | edit source]

Creating Slideshows[edit | edit source]

MediaWiki/Slideshow

<slide>pixel</slide>

will create a nice slideshow

<slide>pixel</slide> from http://meta.wikimedia.org/wiki/User:BR/S5_slide_for_mediawiki_documentation/en

Integration with Software Development[edit | edit source]

  1. CodeReview http://www.MediaWiki.org/wiki/Extension:CodeReview e.g. http://www.MediaWiki.org/wiki/Special:Code/MediaWiki/44245#c829
  2. ExtensionDistributor (info) is a tool that automatically packages code from subversion and sends the user a tarball. There is a lot of interesting information at wikitech that describes how the WikiMedia Foundation is operated technically

Setup for an intranet and/or KB[edit | edit source]

  • Namespaces
  • Wiki farm ala Drupal multisite

Publishing[edit | edit source]

Wiki is quick markup. Feed recent changes into publishing system that moves those out into front-end -- even static. In this sense, you can have editors feeding content into your website. We did this at Raging Bull - a company that I worked at back in 1999 (already several years after Ward Cunningham first developed the wiki concept).

Another example that is clearly "publishing"-centric is the way that wikis are used to put books online:


One Hack[edit | edit source]

Uselang (show image) MediaWiki_SpecialUpload_interface_labelled.png

Resources[edit | edit source]

Notes[edit | edit source]