phpBB module: WoW raid sign up

Ever since my guild in World of Warcraft first introduced a system for raid sign ups I wished that it was integrated into the forum so I wouldn’t have to login to the forum with one user and the raid sign up system with another (and into the dkp system with a third).

Anyway a little over a year ago I became responsible for the guild forum and looked for a mod for phpBB so raid sign ups would integrate well with the forum. I couldn’t find anything usable at the time so I decided to try write my own phpBB raid sign up mod.

Apart from being fun this little project kept my php skills from rusting totally and I also learned to use Bazaar (a version control system).

Just wanted to blog about it because I think it turned out quite good even though its small. Sure there is room for improvements but hey… the source is there for everybody - change it if you like :D

Converting from Sendipity to Wordpress

Alright… my blog is now officially migrated from Serendipity (s9y) to Wordpress. I created the new webdesign a while back and made a few small changes tonight just before the switch… let me know if you find any problems with it. The design was inspired by a Wordpress theme by

A while back I found a s9y importer on Michael Tysons weblog which worked pretty well. Since my last visit a german guy had made a few small changes to it to import extended posts. I had a few of those so I grabbed his script. I had to make a small change to the import script in order to get drafts imported as drafts (and not published). I also had to insert an extra newline before and after the more-tag () in order to get my markdown working as intended.

To get Markdown support in my posts I installed the plugin ‘text-control’ (even though its fairly old). I had to get the newest markdown.php and replace the one provided by the plugin to make it work (to get rid of php errors).

I had a few posts which have been pretty popular, so I made sure that old links would still work by using “Wordpress Permalinks - Custom Structure”:


I had to make a “last minute” change which affects my Wordpress installation in order to get it working. I will blog about that later in a “Hacking Wordpress MU 2.7 - Part 3”.

I hope you like the change :D

"Hacking" Wordpress 2.7 MU - Part 2

This is my part 2 of my pursuit on howto host multiple Wordpress blogs spreading over multiple different domains (not only sub-domains) on the same Wordpress MU installation. You can read the first part here. It seems to be possible without using the Domain Mapping plugin which also creates the extra table to provide the functionality (which seems unnecessary).

So far my research shows that it possible using what’s already inside the Wordpress MU 2.7 release. There is no web interface for some of these things but with a few manual inserts into the database it seems to work like a charm.

After my last post I was able to create multiple blogs spread over mulitple domains. But before the blog was moved to its own domain you had to attach the users for the blog because the blog would disappear from the admin webinterface as soon as the site id changed (as soon as the blog was bound to another domain).

It was possible to login on the new domain with the admin user but the user would only serve as a blog admin and not as a site admin on that domain.

With the following I was able to make the admin user site admin for the new domain as well:

INSERT INTO `wp_sitemeta`
    ( `site_id` , `meta_key` , `meta_value` )
    ('2', 'site_admins', 'a:1:{i:0;s:5:"admin";}');

The number two (2) refers to the site_id your domain got in the table wp_site. If you want another user than admin to be the site admin you’ll have to modify the strange string. Its not as hard as it might look. You can read about how to interpret the string on the Wordpress MU forum - capabilities explanation and the PHP function serialize

"Hacking" Wordpress 2.7 MU pre-release

Alright… one of my good friends wanted a Wordpress blog… I’ve been thinking of migrating this blog (Jacob’s Weblog - Time is always against me) along with another blog on my webserver to Wordpress… that’s 1 2… 3 Wordpress installations.

I went to the Wordpress website and finds they recently released a new version (version 2.7). After downloading it and falling in love my good friend points me to Wordpress MU Why maintain 3 Wordpress installations when you can maintain a single probably 10x times as complex one?… I like a challenge.

The first part of the challenge was that Wordpress MU hasn’t been released in a 2.7 version yet. Well I fetched it right from trunk (revision 1616) and installed. Then created two blogs on two different domains and created users for the blogs on the different domains. Second part of the challenge was that users attached to the second domain couldn’t login and was just redirected back to the login screen.

I described my problem in detail on the Wordpress forum in the hope of some mighty Wordpress MU guru would serve me the solution on a silver platter… that wasn’t the case.

I can get stubborn sometimes and the last 2 months we had a php development project on work so I figured: “How hard can it be?” After an a few hours (first spend googling for debugging Wordpress) I ended up using lots of echo, if and exit - there is no school like the old school :D

Now I think I found a solution and it wasn’t code changes. I needed som changes to the data in the database. You will find a table named wp_site where you will need to add your second domain (and third… etc.) Now browse the table wp_blogs and change the site_id so it matchs the site id for the domain in wp_site.

I still need to test this out but so far it looks good :D

The third challenge will be to make my domains work with www. prepended. But I’ll save that for another time.

Version control: From svn to git

Yesterday I played around with git-svn because git will be the future version control tool we will be using at work and we still have some projects stored in svn. I wanted to try out git but we are not about to convert the old projects just yet.

First I needed to check out the current code from svn and get it into git. I searched the net for how this was done and found something that cloned the entire svn repository to git… not quite what I needed but nice to know:

git svn clone svn:// git_htdocs

The above takes the project htdocs from my current svn repository and saves it locally into git repository in the folder git_htdocs.

I just wanted to start hacking so I found that the following fetched the code I wanted:

mkdir git_htdocs
cd git_htdocs
git svn init svn://

Now you are ready to actually fetch some code from svn with:

git svn fetch -r1519

I found the revision I needed (the newest) by issuing a svn info within my old svn checkout.

Make your changes and commit locally with:

git commit lib/class.csv_import.php

When ready to push changes back to the central svn repository use:

git svn dcommit

To keep your local git checkout in sync with the upstream svn repository you can run:

git svn rebase

This article was great reading for me: An introduction to git-svn for Subversion/SVK users and deserters

Happy hacking :D