Difference between revisions of "Wiki"
From MohidWiki
(→Dumping to an xml file) |
(→Images) |
||
Line 124: | Line 124: | ||
===Images=== | ===Images=== | ||
− | Simply make a backup from the /images folder. To rebuild the images in the new wiki, just move the old /images folder in place of the new one and then launch the following maintenance scripts: | + | Simply make a backup from the ''/images'' folder. To rebuild the images in the new wiki, just move the old ''/images'' folder in place of the new one and then launch the following maintenance scripts: |
> maintenance/rebuildimages.php --missing | > maintenance/rebuildimages.php --missing | ||
Revision as of 18:12, 3 December 2008
This wiki was installed based on MediaWiki, an opensource project from the WikiMedia foundation, responsible for the WikiPedia wiki-engine.
Contents
Video
Here's a short video explaining all about wikis: <youtube>-dnL00TdmLY</youtube>
Extensions
Here's the list of available extensions, exclusively developed for Mohid wiki.
List of
RSS feeds
This wiki allows rss feeds for new articles and recent changes!
Wiki installation & management
Wiki installation guide
Follow the instructions manual for installing the MediaWiki wiki-engine.
Pre-requisites
Basically you require:
- A web-server daemon running such as apache or IIS.
- A PHP server installed (requires configuration of the web-server).
- The MySQL server installed (requires configuration of the PHP server).
Latex extension
To enable latex mathematical formula encapsulation you basically need to install
- Latex (Miktex for windows)
- GhostScript
- ImageMagick
- Enable the Tex extension of your wiki.
Refer to Wiki#Troubleshootings for solving problems when using IIS as a web-server.
Biblio extension
This extension allows to cite. To install it use this manual.
Re-installation guide
In order to recreate a fresh new database, besides previous other wikis,
- simply copy your wiki directory.
- Rename the
LocalSettings.php
of./
and of./config
to some other name. - Run the ./config/index.php from a web-browser. While configuring the database, remember to define a prefix for your new wiki's dbtables so they don't conflict with older wikis dbtables.
- wikidb, wikiuser
That's it!
Troubleshooting
MySQL troubles
If you're using MySQL version 4 or later, chances are you get errors when running the wiki initialize script. Since version 4 of mySQL, passwords are encrypted in 16 bytes strings. Whereas before, they were encrypted in 8 bytes strings. The solution is proposed in the following page. Run the mysql command line and reset the root password with the OLD_PASSWORD command. Then, re-run the wiki initialize script and it should work fine.
LaTex troublesTemplate:Anchor
<math>e^{i \pi}+1=0\,</math>
Configuring Latex in this version is hell! Only with lots of hacking have we managed to make it work on windows with IIS. Here's the How-to:
- Grant read/write/execution to the webserver user in the wiki root.
- Get the texvc binary compiled to render with dvipng here. Rename it to texvc.exe inside the math directory of your wiki.
- Create the texvc.bat batch file and save it in c:/. Copy the following line inside.
@.\math\texvc %1 %2 %3 %4
- Change the LocalSettings.php as follows:
## If you have the appropriate support software installed ## you can enable inline LaTeX equations: $wgUseTeX = true; $wgMathPath = "{$wgScriptPath}/math"; $wgMathDirectory = "{$wgScriptPath}/math"; $wgTmpDirectory = "{$wgScriptPath}/math/tmp"; $wgTexvc = "c:/texvc.bat"; # Location of the texvc binary
- Hack accordingly the Math.php file in the includes directory. Here's the file we use. Make sure to create the directory math inside images. What went wrong was that, somehow, the wiki would erase the png. To avoid this, the hacked math.php copies the png before the function returns from call.
That's it. Here's also a sample test php to see if texvc is correctly working on your system:
<?php /*Basic Hello world test*/ echo "Hello World!"; /*Creates a .png */ $texvcd = "c:/texvc.bat"; $tmpdir = "./math/tmp"; $equation = "\int \frac{1}{2}y=x+1"; $cmde = "$texvcd \"$tmpdir\" \"$tmpdir\" \"$equation\" iso-8859-1"; echo "$cmde"; $result = `$cmde`; echo "$result"; /*Displaying the .png*/ $tough = substr ($result, 1, 32); $urls = htmlspecialchars( "$tmpdir/{$tough}.png" ); $alts = trim($equation); if( file_exists( "$urls" ) ) { echo "<img class='tex' src=\"$urls\" alt=\"$alts\" />"; } else { echo " It doesnt't finds it! "; } ?>
MySQL
Dumping database
To create a Mysql buckup issue the following comand from a DOS shell:
> mysqldump -u user_name -p wikidb -r backup-file.txt
Load database
To load a backup file, from a DOS shell:
> mysql -u user_name -p -e "source backup-file.txt" wikidb
Xml
Dumping to an xml file
This is interesting if you're looking for forward and backward compatibility between mediawiki versions. It's also interesting for character encoding that can get mangled between different database servers. Xml is more cross-platform (mysql, posgresql, sqlite).
- First method: create a list of all files and export them from the special:export page.
- Second method:
> maintenance/dumpBackup.php --full
Importing from an xml file
Go to the special:import page as wiki sysop and choose and upload the xml dump file. Voilá.
Images
Simply make a backup from the /images folder. To rebuild the images in the new wiki, just move the old /images folder in place of the new one and then launch the following maintenance scripts:
> maintenance/rebuildimages.php --missing
That should do the trick. Remember prior to change the AdminSettings.sample file with your new database access and save it as AdminSettings.php in your wiki root.