====== Mediawiki ====== ====== Upgrade Mediawiki ====== #cd /home/mediawiki/ #tar -cf mediawiki.tar public_html #cp mediawiki.tar /root #mysqldump wikidb > mediawiki.sql #cd /root #wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.0.tar.gz #tar xvfz mediawiki-1.14.0.tar.gz #Copy across files, overwriting files!! #cp -R mediawiki-1.14.0/* /home/mediawiki/public_html #Run Update Script #cd /home/mediawiki/public_html/maintenance #php update.php --aconf ../AdminSettings.php #Troubleshooting "No superuser credentials" error #cd /home/mediawiki/public_html #cp AdminSettings.sample AdminSettings.php #vi AdminSettings.php #### Edit below lines to match your DB user and password #### $wgDBadminuser = 'wiki'; $wgDBadminpassword = 'wikipassword';[[/code]] #After edit the AdminSettings.php. You need to reapply update #cd /home/mediawiki/public_html/maintenance #php update.php --aconf ../AdminSettings.php Reference: http://wowtutorial.org/tutorial/174.html ====== Disallow Anonymous Editing and Accounts ====== vi LocalSettings.php //add in at the bottom: // No anonymous editing allowed - $wgGroupPermissions[['*']]['edit'] = false; $wgGroupPermissions[['*']]['createaccount'] = false; ====== Install mediawiki from SVN ====== mkdir ~/public_wiki cd public_wiki svn co http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_16/phase3 . Refs: http://www.mediawiki.org/wiki/Download_from_SVN ====== Install Message Box Templates for Mediawiki (mbox) ====== ===== Install Mediawiki Parser Extension ===== Read: http://www.mediawiki.org/wiki/Extension:ParserFunctions Download and extract into /extensions/ParserFunctions/ vi LocalSettings.php //add in the following at the end: require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" ); ===== Add new Common.css Mediawiki Styles for message boxes ===== We are going to be copying and pasting the CSS styles for this. (i.e. CTRL+C and CTRL+V) 1. Option 1: Take all of mediawiki's Common.css Style sheet and copy it. URL: http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.css&action=edit Option 2: Copy the cut down version I created here: http://wiki.kartbuilding.net/Mediawiki:Common.css.txt 2. Login and browse to: http://yourwiki.com/index.php/MediaWiki:Common.css This will give you a special page you can create and save. Paste (CTRL+V) the above Common.css styles into this new page. ===== Export and Import Template Files ===== Browse to: http://en.wikipedia.org/wiki/Special:Export
Export the following page, ticking all three boxes ( Include only the current revision, not the full history, Include templates and Save as file ) Template:mbox Save the xml file to your computer Browse to: http://yourwiki.com/index.php/Special:Import and upload the xml file.
This imports and creates around 34 template pages. ===== Create/Edit/Add Message Box ===== Refs http://www.mwusers.com/forums/showthread.php?10179-How-to-impliment-ambox http://glynor.com/blog/2010/05/the-trouble-with-ambox-and-mbox/#more-9 http://www.mediawiki.org/wiki/Template:Mbox http://en.wikipedia.org/wiki/Template:Ambox/doc http://en.wikipedia.org/wiki/Template:Ambox http://docs.kunena.org/index.php/Template:Ombox