This thread will detail how to have a single login for multiple forums. It makes the following assumptions:
A valid vbulletin license exists for each install
All forums will be on the same server
You already have one forum operational AND that forum uses a BLANK $tableprefix!
One database will contain all the tables
This thread is a follow-up from this discussion over at vbulletin.com. Thanks to Brains for some pointers!
Here are the steps:
Copy your forum directories to a parallel directory (for example copy /www/forums to /www/new_forums)
In /includes/config.php, change $tableprefix (line 91) to a new prefix [for example $tableprefix = 'new_';]
Run the vb install from the new directory (/www/new_forums/install/install.php)
During the install, be sure NOT to empty the tables. If you have any doubt about what this means, stop NOW! If you empty the tables, you will lose all of your existing data from a prior install!
Download the files from these directories to your PC: /new_forums, /new_forums/admincp, /new_forums/archive, /new_forums/includes, /new_forums/modcp, /new_forums/subscriptions
We are now going to make global changes to the files in the folders (and subfolders) above. I used Dreamweaver's "edit-find and replace" function with "find in" set to "Entire Current Local Site". We are basically going to remove the "TABLE_PREFIX" from any code dealing with the user. (Note - if you are comfortable with unix command, you could do these changes from the command line on the server.)
Run the following find and replace operations:
Find [" . TABLE_PREFIX . "user] (find what's inside the brackets). Replace with [?.?user] This should find 562 instances of user, usergroup, userfield, and usertextfield
Find [" . TABLE_PREFIX . "strikes] (find what's inside the brackets). Replace with [?.?strikes] This should find 5 instances of strikes
Find [" . TABLE_PREFIX . "pm] (find what's inside the brackets). Replace with [?.?pm] This should find 61 instances of pm, pmtext, pmtextid, and pmreceipt.
Upload these directories back to the server.
We now need to do a little fine tuning
In /includes/functions.php: on line 1171 remove the table_prefix before $idname.
In /includes/adminfunctions: modify print_choser_row (line 1161)to check for $tableid of user, usergroups
PHP Code:
if ($tableid == "user" OR $tableid == "usergroup") {
$result = $DB_site->query("SELECT title, $tableid FROM "."$tablename$wherecondition ORDER BY title");
} else {
$result = $DB_site->query("SELECT title, $tableid FROM " . TABLE_PREFIX . "$tablename$wherecondition ORDER BY title"); // existing code
}
In /includes/adminfunctions_user.php around line 116 (construct_style_chooser)
PHP Code:
$tableid = $tablename . "id";
if ($tablename == "user" OR $tablename == "usergroupid") {
$result = $DB_site->query("
SELECT title, $tableid FROM "."$tablename WHERE userselect = 1
ORDER BY title
");
} else {
// existing code
$result = $DB_site->query("
SELECT title, $tableid FROM " . TABLE_PREFIX . "$tablename WHERE userselect = 1
ORDER BY title
");
}
Done! Both forums are now accessed by the same user table! PM's are unified across forums as is the user count.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Yeah I asked a Moderator and that is what they told me. I am however still going to work on getting instructions setup to make this work. They led me to a compare program so I am going thru and comparing the files and seeing what all that I changed.
I promise I will get this up soon as possible. I know this was a huge thing for me to be able to get another site up and running. I did successfully take the code off the second site and install it to a now third site with very little work so once you get it done once I think the sky is the limit on creating new sites.
I will post links to the directions once I get them up
is it possible to run something like this across multiple servers?
I run a big board (90k members, 1.5 million posts and 1.3 million visits a month) and am wanting to expand into multiple other forums. Basically setting up about thirty other forums (when it is all done) and having each current user being automatically registered, and all new members being able to auto register across all forums no matter which one they sign up on. Since my site allows image uploads and is art heavy, I do not think a single server is possible when it is all said and done. I will need many servers eventually.
If anyone can assist me with this, please let me know at jmanley@massiveblack.com The site is called conceptart.org and you can find the forums link atop the page. We are making a photography forums, a fine art forums and some other areas.
Please advise...just talented artists here, not many programmers.
I'm experimenting with that right now with vb 3.6.8. I "think" that it's possible given all the right conditions. I'll post back here in a week or so with my results.
I'm experimenting with that right now with vb 3.6.8. I "think" that it's possible given all the right conditions. I'll post back here in a week or so with my results.
Great, let everyone know if it works. vB totally needs to implement this kind of feature into their software.
Those two forums are on the same server ... but if you really want to see the potential, go to www.brentandmary.net/vb36 (login is acg, 99acg99). Now that rocks! That's three databases on two different servers tied into the same vb user login.
Now ... I just gotta find the time to document how to do it. For those who can get a command line, I think I can do a unix script that would all the changes automagically in seconds!
Why vb doesn't support this is a mystery to me. The easily could.