Hello,
I'm studying the possibility of implementing b2 (WordPress or b2evolution) for multiple final users in a single server and a single database.
I'm the administrator of a forum with thousands of users and I want to give them the possibility of having a blog. I may have 10 or 20 very active people and 50 or 100 people who will sign up to try it but won't really use it (Pareto's rule).
The users won't have any access to the server other than the blog's web interface (no phpMyAdmin, no config / application file uploads etc).
I have 3 days of flying experience with b2, so bear with me. I'm asking for opinions here about the following discussion.
I have discarded the option of having a ID that identifies the blog ("$BID") passed as another parameter in just one b2 file tree, as I'll always have a few guys who will want to change the CSS etc and I'd upload their changes manually in a case by case fashion. So I wan to reproduce the whole tree structure in a new directory that represents each user ( /blogs --> /blogs/usernick ). By the way, to have PHP create the files is a permission nightmare, but that's another story (I'm already scared of the chmod 777 to upload pictures).
Then in each function that uses a SQL query, I'd add $BID in the list of globals, and then I'd insert in the WHERE clauses: WHERE BID = $BID AND ...(original WHERE condition). This gives flexibility; the $BID can be assigned from a passed parameter or it can be taken from the current path using __FILE__. This second option is the tricky part I'm not so sure about (not how to implement it, but its soundness and security issues).
In the database I'm adding a field BID to each table, so that I only need 1 database and the same tables. The other option (that doesn't scale so well) is having a set of tables with different names per blog, that may good for a few blogs.
The rest:
I'd need to create a sign-up form, rewrite the installation script and add some maintenance code to delete inactive blogs.
lazyant.