Plugin: Vhost

published

As part of the Weblog Tools Collection Plugin Contest, I created a plugin that binds a virtual host to a single WordPress category.

The vhost plugin binds a WordPress category to a virtual host on your webserver, either a sub-domain or a seperate fully-qualified domain. You can have as many such bindings as you have vhosts: just make a new category for each one. Each vhost+category pair can use its own template.

You can see this in action at tangential.info, which is the main blog. The demo has been taken offline.

Additionally, blog administrators can edit a registered user’s profile, and set the URL in that user’s profile to the fully-qualified domain name of a valid vhost. That user may then login to http://vhost/wp-admin/ and post only in that vhost’s category. If that user attempts to access the /wp-admin/ directory on the main blog, they will be redirected to their vhost.

NOTICE: This is a beta release. This plugin has not yet received extensive testing. Only download this plugin if you’re willing to accept that it may break your blog. It is released with no guarantee of usability, and I will not accept any responsibility if it does bad things. I will accept bug reports and patches.

ALSO: This plugin will not work well with a default WordPress 1.5 installation. In order for post navigation to work well, you’ll want to edit get_previous_post() and get_next_post() so that you can use the “in_same_category” flag. Then edit your template(s) to use previous_post_link() and next_post_link(), instead of previous_post() and next_post().
See bug 1252 and changeset 2542 for additional information.

Download vhost 1.3 now!

Mad props to Owen for his limit categories plugin, which provided an excellent foundation for me!


home / about / archive / RSS