Setting up your own MediaWiki?

From InterSciWiki
Jump to: navigation, search

Wikimedia

https://wikimediafoundation.org/wiki/Thank_You/en

The unix server setup for this wiki

This from our wiki administrator (Setting_up_your_own_MediaWiki?#The_unix_server_setup_for_this_wiki: We start out setting up a wiki similar to that of http://intersci.ss.uci.edu/wiki. We have not started setting up the EduMod wiki but it will be on the same server and the process is the same.

Professor White's wiki server is running on Fedora linux distribution for its operating system, http://fedoraproject.org. You need to install Apache web server with support for php. If you are a beginner with setting up a linux machine, I suggest you look at this website, http://www.linuxhomenetworking.com.

Here's the info about MediaWiki Installation, and a brief overview of the configuration we did for the wiki setup.

  1. Download mediawiki from www.mediawiki.org
  2. Review the Installation Requirements: http://www.mediawiki.org/wiki/Installation
  3. Configure Apache to make some folder (e.g. /var/www/html ) accessible to the web. Extract Mediawiki to a "wiki" subfolder - Apache Configuration: http://www.mediawiki.org/wiki/Apache_configuration
  4. Configure a MySQL database for the MediaWiki installation: http://dev.mysql.com/downloads/
  5. Follow the installation instructions here: http://www.mediawiki.org/wiki/Manual:Installation_guide

Customizations for MediaWiki:

  1. Enable LaTeX syntax: http://www.mediawiki.org/wiki/Mediawiki_and_LaTeX_on_a_host_with_shell_access#Install_LaTeX
  2. Install the Cite Extension: http://www.mediawiki.org/wiki/Extension:Cite/Cite.php#Installation
  3. Follow recommendations about Security here: http://www.mediawiki.org/wiki/Manual:Security

Anti-Spammer configurations:

$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
$wgNeedConfirmedEmailForEditing = true;
Download recaptcha from: http://recaptcha.net/plugins/mediawiki/

Good luck with your installation.

On wikis

  • www.mediawiki.org Wikis by nature are a collection of "pages" - where a page can be structured independently of other pages. This makes it very easy for many users to create or modify content. But it can make organizing all of the content a difficult task. www.mediawiki.org is the homepage which shows a default template - you can browse around there to get a feel for how they organize their content and the general layout. If you use mediawiki, your pages would have a similar "look and feel" unless you do heavy modifications to the template. --Jon Nilsson, who helped set up our site.
  • MediaWiki is a downloadable software package that was first intended for use by the free encyclopedia, Wikipedia. Today, the software is available for free to the general public to build and publish their own wiki pages. Businesses across the world are using MediaWiki. Function Design of the United Kingdom uses MediaWiki as an internal knowledge base. There are many possibilities for Media Wiki to be used in secondary education. Many academic students are referring wiki for completing their assignment.
Jon: I gave some structure to our links through hierarchies for types of authors and subject areas. Doug 11:44, 20 June 2007 (PDT)

Getting started (as MediaWiki Developer)

Captcha (Did this! It was easy)

Web sites that accept postings from the public, like this wiki, are often abused by spammers who use automated tools to post their links to many sites. While these spam links can be removed, they are a significant nuisance.

Sometimes, especially when adding new web links to a page, the wiki may show you an image of colored or distorted text and ask you to type the words shown. Since this is a task that's hard to automate, it will allow most real humans to make their posts while stopping most spammers and other robotic attackers.

Unfortunately this may inconvenience users with limited vision or using text-based or speech-based browsers. At the moment we do not have an audio alternative available. Please contact the site administrators for assistance if this is unexpectedly preventing you from making legitimate posts.

See http://en.wikipedia.org/wiki/Captcha

For email: http://www.google.com/recaptcha/mailhide/

If ever you set up your own media site

Here is an idea: http://www.playingwithwire.com/2007/03/a-more-comprehensive-mediawiki-guide/

Perhaps easier than MediaWiki proper


This was easy to do and free because they use keystroke recognition to help digitize books. I edited localSettings to activate the keys. It asked for the keys, which I had on paper only. Asked for new keys. Entered them. There was no need to do that but when testing, Captcha is only activated when you add a new external link. So you might not think it works if you only edit as a test.


Getting svg graphics to work

Try this? http://forum.dreamhosters.com/3rdparty/65634-Installing-librsvg.htm

Getting LATEX math symbols to work

http://scripts.mit.edu/faq/55/how-do-i-enable-math-support-in-my-mediawiki-wiki

I asked Remi who runs Wikiversity:

What did you follow to implement Latex characters for math symbols. Seems to be quite alot of perplexity about this on google-search sites.Douglas R. White 23:17, 5 July 2007 (UTC)
http://en.wikipedia.org/wiki/Help:Formula ← I think that is the page you are looking for. I found it on http://en.wikipedia.org/wiki/Help:Contents/Editing_Wikipedia. Wikipedia is a sister project of Wikiversity (which could probably be considered a much younger less mature sibling); both projects are run by the Wikimedia foundation. I hope that helps. --Remi 23:31, 5 July 2007 (UTC)

Retrieved from "http://en.wikiversity.org/wiki/User_talk:Douglas_R._White"

see below on installing texvc http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/math/README?view=markup

this is referenced at http://en.wikipedia.org/wiki/Texvc

and this at http://en.wikipedia.org/wiki/Help:Formula

which was found by Remi at http://en.wikipedia.org/wiki/Help:Contents/Editing_Wikipedia

Dao Vuong set up our system so it works... e.g., testing <math> commands:

<math>\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n} {3^m\left(m\,3^n+n\,3^m\right)}</math>

\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n}
 {3^m\left(m\,3^n+n\,3^m\right)}

more sample math commands at: http://meta.wikimedia.org/wiki/Help:Formula

Ways we can make changes in our MediaWiki

  • Set $wgLogo to the URL path to your own logo image (the current image is $wgLogo = "$wgStylePath/common/images/wiki.png"
  • (you do this in LocalSettings.php which you can edit in ascii format)
  • No help here: http://lifehacker.com/software/wikipedia/geek-to-live-set-up-your-personal-wikipedia-163707.php
  • The easy way: Backup-Skins-Common-Images-wiki.png
  • rename your preferred image wiki.png, then copy it over
  • Tip: The logo image should be 135 pixels square.
  • If uploads are enabled in the wiki, files will be put in subdirectories under here (images).
  • Note to upgraders: as of MediaWiki 1.5, the images used in the user interface have been moved to skins/common/images.

Correcting the local time setting

The clock was off by four hours. I tried but these didnt work
$wgLocalTZoffset = date("Z") / 60;
$wgLocalTZoffset = date("Z") / -240;
This worked (in the LocalSettings.php:
$wgLocaltimezone = 'PST';
$wgLocalTZoffset = date("Z") / 60;
This changed all the times, now and in the past


RSS and WordPress

  • RSS in Plain English http://blip.tv/file/205570/
  • (What is RSS? Rich Site Summary?) alt:RSS (Really Simple Syndicate) is a dynamical content that can be issued by various sources (scientific journals, new papers, etc.) and can be displayed on this website pages. You can thus customize your pages so that all the relevant informations for you appear within the page. To learn more about RSS and how it works : read this, look on the right bar to read about Popular Feed Readers and let --Doug know if you think we want to go there -- provide RSS updates for our wiki.
  • Word Press is a more structured format, but allows for easy template changes. It is actually a blogging application intended to provide one page which consists of sequential update entries, and any number of auxiliary pages organized into a hierarchy. The auxiliary pages are like normal website pages - they are pretty much static content pages. And this differs from the main page which will show the most recent "entries" by any contributors - in your case this could be news updates, published articles, research findings, or whatever. You mentioned that you want RSS feeds of the content. Wordpress is equipped for Rss by default, since it's content is a list of successive entries. To familiarize yourself with Wordpress, go to www.wordpress.org - their "home page" is actually a static page with sub-pages on the left side (you should especially read the section that contains pages for those "new to Wordpress"). The "Blog" page is the dynamic content page which shows a list of successive entries: you can see the title of the entry, the date, which user posted it, etc.

Allowing or blocking search engines in Wikis

http://en.wikipedia.org/wiki/Robots.txt

The information specifying the parts that should not be accessed is specified in a file called robots.txt in the top-level directory of the website, above or under wiki, the url server name, i.e., at InterSci. I chose

User-agent: *
Disallow: /cgi-bin/
Disallow: /images/
Disallow: /tmp/
Disallow: /private/

Math images setup (FOLLOWING REMI ABOVE)

When done: see *Quik math for wiki

in LocalSettings.php $wgUseTeX = true;

http://intersci.ss.uci.edu/wiki/README-fromMATHsubdirectory

says:

Requirements

OCaml 3.06 or later is required to compile texvc; this can be acquired from http://caml.inria.fr/ if your system doesn't have it available.

(but for the novice this is pretty difficult to figure out)


http://www.megashear.org/wiki/index.php?title=Help:Running_MediaWiki_on_Windows#Another_way_to_use_math_under_windows says: Another way to use math under windows Maybe you will find that compile texvc is so complicated. (I am the one.) Here is another solution (Using LatexRender, thanks to Benjamin Zeiss).

You must replace the content of math.php file with this at first. I found that the last link is broken. you can find this page here

Append follow content at the end of LocalSettings.php: $wgUseTeX = true;

Where is your ImageMagick -- ON THE WIKI SERVER $wgImageMagickConvertCommand = 'D:\WebServer\ImageMagick\convert.exe'; $wgImageMagickIdentifyCommand = 'D:\WebServer\ImageMagick\identify.exe';

Where is your Tex $wgLaTexCommand = 'latex.exe'; $wgDvipsCommand = 'dvips.exe';Create folder "math" and "tmp" in the "images" folder if not exist. MATH DOES EXIST temp file created Make sure you have a working ImageMagick and Latex. Now you can try in the sandbox to see whether it works.



LocalSettings.php has a switch I could change to true:

  1. If you have the appropriate support software installed
  2. you can enable inline LaTeX equations:

$wgUseTeX = false;

http://www.mediawiki.org/wiki/Manual:Configuration_settings says

$wgMathDirectory - The file system path of the directory containing LaTeX math images. ("{$wgUploadDirectory}/math") $wgMathPath - The URL base of the directory containing LaTeX math images. ("{$wgUploadPath}/math")

Footnotes

Our wikiguru Jonathan Nilsson did this for us see Mediawiki footnotes.

Help pages

These were downloaded from Mediawiki. Not difficult but an extensive download operation that places all the needed pages.

SVG

This was done by adding two lines to our Mediawiki commands in localSettings.

If ever you set up your own wiki site

Some modification of WikiChart could count hits on your site: http://meta.wikimedia.org/wiki/WikiCharts wherein you can visualize the link structure of wiki visits between different pages http://www.firstmonday.org/issues/issue12_4/spoerri/. See also See also Special:Specialpages and Special:Statistics


Here is an idea: http://www.playingwithwire.com/2007/03/a-more-comprehensive-mediawiki-guide/ Perhaps easier than MediaWiki proper

Manuals

http://meta.wikimedia.org/wiki/MediaWiki_User's_Guide#For_administrators

/MediaWiki-Administrators-Tutorial-Guide

Mozilla wiki: http://wiki.mozilla.org/Documentation:_Administrator's_Guide

Security

Mediawiki administrators: Nowhere is it documented that the three commands that govern secure edits (by those logged in), which are

####################
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
$wgNeedConfirmedEmailForEditing = true;

Should follow this command which is 2/3s the way down in the Local*.php Or somewhere in this area, but not at the top of the file

$wgEnableUploads       = true;