Extension:WikiToWordPress

Some people may have been using WordPress Comments, an extension that allows comments made in a Wordpress blog to be displayed in a Wiki page, and even allowing Wiki users to comment directly from the wiki, thus replacing the usual Talk Page system which is rather counter-intuitive for new users.

This extension allows wiki users to be able to add comments to WordPress, AND also wanted new pages created by wiki users to appear as new posts on the Word Press blog.

Usage
Can be used in combination with WordPress Comments, Semantic Forms or CreateBox and optionally DynamicPageList to produce a complete free post & comment collective blog, similar to the news system of EmuWiki.com. As of version 0.5 of the extension, it is compatible with MediaWiki 1.13 and does not need to be installed on the WordPress side anymore, it will actually break WordPress if included in the plugins panels.

Installation
1. Install Wordpress in any directory of your server. Wordpress and Mediawiki should share the same Database.

2. Copy the code in a file called WikiToWordPress.php and place that file in /extensions.

3. You will need to make 3 changes to the code:


 * Change $wordPressURL for your Word Press URL (You HAVE to leave the / there or it won't work). Ex : http://www.mydomain.com/wordpress/. Notice the / at the end.


 * Set $SearchString for whatever you want the extension to look for in an article to publish the article to the WordPress blog.


 * Set $PassFlag to 7 if you want only new articles to be published to WordPress, or to 8 if you want every edit of an article to republish another post to WordPress.

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

WikiToWordPress is now installed, and it will publish in your Wordpress blog any newly created MediaWiki article that contains a given string ($SearchString). But I strongly encourage you to install WordPress Comments, CreateBox or Semantic Forms, 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.

Related extensions

 * InputBox
 * DynamicPageList