2005.04.20
at around evening time

Plugin: Vhost 56

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 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!

Comments so far:

spacer

rob

# 2005.04.22, at around evening time

Wow, this looks very neat. I'll definitely have a play on my home server.

spacer

Vix

# 2005.04.22, at around evening time

I've been looking for something like this for ages! I'll let you know how it goes

spacer

Vix

# 2005.04.22, late at night

What I've found so far is:

When editing User Info at www.mydomain.com/wp-admin/profile.php
I get this 174". [the 174 line number may be wrong since i was adding echo commands to figure out what was going on in the code].

From what I can see, this is probably correct, since the add_action used in vhost is hooked to admin_head for the redirect. I am assuming the above error is generated because of the html header information added by admin_head before the header(location:…) of vhost's redirect occurs and this error comes up.

Have you seen this issue? Is there a different hook? Do I have something set up wrong?

Thanks for any help or insight.

spacer

Mark

# 2006.03.05, mid-afternoon

Skippy, this looks like a great plugin - if only it would work on WordPress 2.0.1!

I've also installed it for a WP 2.0.1 blog, and while the category filters seem to work in so far as they filter out the posts correctly, there are a few remaining problems:

1) Themes don't work
2) The wp-admin stuff doesn't seem to work
3) The category names don't update correctly when using the description field + newline markup.

Anyway, this plugin has great potential and thanks for your work so far skippy!

Hopefully you will find the time to re-write it to work with WP 2.x :-)

spacer

skippy

# 2006.03.05, mid-afternoon

Mark, vhost 1.5 works with WordPress 2+.

spacer

Mark

# 2006.03.05, mid-afternoon

Doh - sorry! Just discovered that…

Am having problems at the moment (blank screen), but will investigate further.

spacer

Yukko

# 2006.03.07, around lunchtime

Should I activate PHP on all subdomains or only the main one?

spacer

Franky

# 2006.04.24, mid-afternoon

Hi, Skippy,

I really like this one, installed at my wordpress 2.0.2 and works fine. One question: could my default wordpress blog still display all users posts? right now it seems they are all independent for the posts.

thanks,Franky

spacer

kuslahne

# 2006.05.09, in the wee hours

Wow, awesome plugin..

spacer

Aventuras de un Webmaster

# 2006.06.15, terribly early in the morning

Thanks for a great plugin!!!!!!!

spacer

John Praca

# 2006.06.19, terribly early in the morning

hi there!

Yes it's good, really good plugin very useful, i m trying sth similiar in my mu version

spacer

Jonathan

# 2006.06.30, in the early morning

Whoa! This is exactly what I've been looking for. I didn't even think to search for a plugin. Thank you for releasing this!

RSS feed for comments on this post.
TrackBack URI

Share your thoughts

Line and paragraph breaks automatic, e-mail address never displayed , HTML allowed:

<a class="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.


gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.