Multisite 0.1b
I’ve made a while ago a quick hack for adding multisite capabilities to Wordpress 1.2.
I’ts just a zip file with the files I modified. It works but needs the corresponding UI to make it as user friendly and cool as the rest of WP.
The general idea is to make a directory named sites under the current wp install and then making both a multi-conf.ini file and the corresponding directories under it. This approach uses the host part of the HTTP request to figure out which sites/dir to use and parse the wp-config.php inside it. After it has parsed it, it silently include()s the main wp-config.php which will define the variables (host, db etc) only if they have not been defined already.
What if I want one weblog at http://example.com/blog1/ and another at http://example.com/blog2/?
$_SERVER['HTTP_HOST']doesn’t contain detailed path information (whether we’re at blog1/ or blog2/), just the hostname (which is example.com in both instances). I think that needs to be$_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_FILENAME']);.Comment by David House
— 3/8/2004 @ 3:07 am
You’re right, I just tought about separating the blogs by hostname. something along the lines of http://blog1.example.com and http://blog2.example.com.
At least in linux you can configure Apache to configure mod_rewrite to “catch” any request in the form of /blog?/ end redirect it to / but it looks convoluted. In that cas i suppose then $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_FILENAME']); could work.
Comment by ruben — 3/8/2004 @ 10:21 am
Hi! I’ve been trying to get this to work all morning, and obviously I’m missing information (or not understanding correctly how it’s supposed to work). Any help welcome!
Comment by Steph
— 10/8/2004 @ 5:11 am
I think that it would be more convenient to use a independent installation, or maybe the fake-folders plugin, you can even use a another template… or maybe with different index.php you could make also the same effect
Por cierto, hola ruben, me gusto el contenido de tu sitio
quizas solo un rediseño por que siento algo simple…
Comment by Cicloid
— 25/10/2004 @ 10:48 pm
Hi, I’m an experienced web programmer and now I need to help some student organization set up a free blog hosting site for their members. It needs a registration page after which the blog will be automatically set up for the user.
I’m currently considering extending wordpress. I think we have lots of goals in common and since your code hasn’t reached production level yet, I’m willing to help out. Just drop me an email at liuchan1 at comp dot nus dot edu dot sg
Also, multisite is more than just tricking wordpress into using the correct configuration. Right out of my head i have the following:
1. To support file uploading, we can no longer just let the user decide the directory themselves, cos they all have write access to the _same_ directories (it’s just one install of wordpress afterall). We have to lock this up some how.
2. We’d like to make users registered to the site (i.e. those who have a blog on the site) automatically registered to all blogs, and subsequently we want to remove user registration at each blog all together.
3. Of course we need some administration interface. And for that to be effective, i’d like all the user information to be stored in a database rather than in a ini file.
4. We’d like to have some way to show the _sitewise_ latest posts and hottest blogs on the _site_ homepage.
There’re many other possibilities/difficulties and I think it’ll be hugely useful for many people.
Comment by Liu Chang
— 22/11/2004 @ 12:46 pm
Hi, i would like to help. Drop me an email at liuchan1 at comp dot nus dot edu dot sg if you like.
Comment by Liu Chang
— 22/11/2004 @ 12:52 pm
[...] http://bitacoreando.com/archives/2004/08/02/multisite-01b [...]
Pingback by Fraugr » Blog Archive » stuff — 16/2/2006 @ 12:36 am