Personal tools

Wiki

From MohidWiki

Revision as of 22:46, 6 February 2008 by 192.168.20.177 (talk) (LaTex troubles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This wiki was installed based on MediaWiki, an opensource project from the WikiMedia foundation, responsible for the WikiPedia wiki-engine.

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:

  1. A web-server daemon running such as apache or IIS.
  2. A PHP server installed (requires configuration of the web-server).
  3. The MySQL server installed (requires configuration of the PHP server).

Latex extension

To enable latex mathematical formula encapsulation you basically need to install

  1. Latex (Miktex for windows)
  2. GhostScript
  3. ImageMagick
  4. 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>
e^{i \pi}+1=0\,

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