There are a few people out on the web who have tried to get the WordPress blogging application and MediaWiki to play nicely together. Some have gone so far as to build authentication mechanisms that force one system into depending on the other for user account details. It all gets a little shaky when you try to take two systems designed for different purposes and reshape them into a new purpose. I think I’ve discovered that its much easier to get two sites to authenticate against facebook than it is to get them to work with each other directly
If you’ve taken a look around this site, you’ll notice I’ve integrated the two visually, and that I’ve also added facebook connect functionality using plug-ins available for wordpress and mediawiki. I’m not sure how much further I’m willing to take it, but I’m reasonably happy with the results and think I could launch a new blog/wiki integration pretty quickly now. Here’s some of the steps I took:
- Install mediawiki and wordpress to {SITE_ROOT}/w and {SITE_ROOT}/b using their defaults. Duplicate the default wordpress theme (default) and mediawiki skin (monobook). Call them whatever you want (jose is a good name i guess).
- Create a unified include directory at {SITE_ROOT}/inc/ – this is a good place to keep includes that will be used by both applications and/or by static pages.
- Create a CSS directory and generate the following: default.css, wordpress.css, mediawiki.css, iphone.css. Grab the css from the wordpress theme and the mediawiki skin (main.css) and migrate them here. With all the CSS in 3 files, you should be able to manage css rule dependencies and choose the rules that make sense for the whole site, moving them into default.css. You can use iphone.css later to specify rules that only apply to safari on the iphone.
- Install the facebook connect plugins for wordpress and mediawiki. Follow the instructions to create a new app on facebook only once – use the SAME API KEY for both plugin configurations. If a user logs into one, they will automatically be logged into the other (neato).
- You may also need to hack both plugins directly. The first thing I did was strip out all of the CSS code being injected by the FB plugins and move it to default.css. There is also some template logic buried in the plugin, which I simplified somewhat for consistency.
- Start hacking the template/skin files on WordPress and MediaWiki. There are a lot of loose ends that’ll need to be cleaned up and to get a fairly clean and consistent UI, you will need to work well outside of the themes/skins directories. Each system has slightly different implementations of the FB-connect and lean on both the PHP and JS libs in different ways. Here are some tasks that might take a while:
- moving the search box to the header.
- consistent display of the “logged-in” box.
- Move some of the sidebar content to the footer.
- Get rid of some sidebar content (don’t just hide it with CSS).
This is about as far as I am right now, maybe not enough to write about but at least a decent work in progress. If there is any interest, let me know and I can post the source code.



