Extension talk:WikiToWordPress

=Description of changes for v0.5=

We had to change the whole system as some newly renamed variables in MediaWiki made it impossible to include the WordPress php files in LocalSettings.php. So now WikiToWordPress stays on the MediaWiki side and writes the posts to the shared Wordpress-mediawiki database using our own queries.

Here is the old version 0.1 which was valid before MediaWiki 1.13. The new version is recommended & less invasive on the WordPress side.

Installation
1. Install Wordpress in any directory of your server (I use /wordpress/ from the main MediaWiki directory).

2. Wordpress and Mediawiki should share the same Database

2. Copy the code in a file called WikiToWordPress.php and place that file in YOURWORDPRESSDIRECTORY/wp-content/plugins/.

3. I did not make it user-friendly because it's experimental. You will need to make 4 changes to the code:


 * First on Line 25 change YOURWORDPRESSDIRECTORY to the main directory where you have installed Wordpress.


 * Second, on Line 33, you can change to whatever you want the program to scan for. This is the string that the program will look for in new MediaWiki Articles to determine if it needs to be sent to the Wordpress blog. I used the News category because I only wanted articles from the News category to be included in the collective blog, but you can use any string of text.


 * Third, on Line 34, beside the 'flags', there is the number 7. This is a flag that indicates to only publish newly created articles, not articles that are just being edited. If you want any edited article to be republished in Wordpress everytime it is edited in MediaWiki, then change this number to 8.

4. You need to install the plugin in Wordpress. For this, log in as administrator in Wordpress and at the top right corner in your dashboard, you will see the Plugins option. Click on it and you should see WikiToWordPress listed as deactivated. Activate it.

5. Include the extension in MediaWiki by changing and adding this line to your LocalSettings.php:

6. WikiToWordPress is now installed, and it will publish in your Wordpress blog any newly created MediaWiki article that contains a given string. But I strongly encourage you to install WordPress Comments, and CreateBox and optionally DynamicPageList because WikiToWordPress was designed to be used with these extensions just like we did for the news system at EmuWiki.com. Sorry for crappy code, this is my first PHP program and I'm not a programmer.