Hacking Wordpress MU - Part 3

I found the first problem with running this Wordpress installation on multiple domains. The installation generates a .htaccess filen in the installation directory. This won’t work when the blogs are in differet directory levels.

What I did was adding the rewite rules to the virtual host instead… that way all my domains could have different rewrite settings.

I also tried to move the upload directory away from the central Wordpress installation and into the document roots for the different domains. But this seems to be impossible due to a bug in Wordpress MU.

The last issue I found with my solution to the multiple domains with Wordpress MU is that the site admin might not be able to see the blogs on the other domains but if you know the id of the blog you can just change that in the URL and gain edit access to the blog anyway.


The user domain1_admin is site admin for domain1.com. On the domain domain2.com the a blog with the id 3 is attached. So admin logs in on domain1.com and uses this url:


The last few issues I can live with… so I wont be experimenting with Wordpress for a while I guess. Hope someone can use this.

converting video to flv with gst-launch

I had quite some trouble finding a way to convert an avi video file to flv. I really wanted to use gstreamer since it had worked very well for me for other conversions in the past. The reason for this conversion was that I had a video on my digital Canon camera (in avi format) and I wanted to publish it on the web using the defacto standard… flash video (flv).

After lots of googling I found FLV Conversion Tips by Brendan Howell so I’m not to take credit for this.

I didn’t want the sound so I removed it from Brendans original example:

gst-launch -v filesrc location=canon.avi ! decodebin name=d  ffmux_flv name=mux ! filesink location=output.flv d. ! queue ! videoscale !  video/x-raw-yuv,width=320,height=256 ! ffenc_flv ! mux.

I my search for a solution I found another link with some gst-launch examples you might find interesting.

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 webdemar.com.

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