View Full Version : Out of curiousity,,
Makaveli
Tue 8th Aug '00, 9:51am
If I wanted to link to vBulletin Boards that are on the same domain together how would I do it? (By linking I mean that the users wont have to register more than once)
phumphries
Tue 8th Aug '00, 10:33am
You could hack the code so that they all shared the same "user" table, or, if it does not have to be in real time, schedule a cron job to synchronize the "user" tables between forums periodically. Or, hack the code to on each board to update the "user" table on the other boards.
[Edited by phumphries on 08-08-2000 at 09:34 AM]
Makaveli
Tue 8th Aug '00, 10:40am
Would this be tough to do?
phumphries
Tue 8th Aug '00, 11:14am
The easiest would be to periodically synchronize the user tables, but it is not real time and could have duplicate user names, for instance. The toughest would be to update the other forums' table because you would have to hard code each forum into the script. Somewhere in the middle would be changing the code to use one user table in a separate database; others might chime in, but I think that you would have to change only a few routines (without looking at the code, just now).
Makaveli
Tue 8th Aug '00, 12:12pm
Ok, if you have time could you please document the code that I would have to use?
phumphries
Wed 9th Aug '00, 11:31am
The major portion of what you will need to hack is in the member.php file. Basically, anything that accesses the user table will need to be redirected to the common user table you create for all the boards.
For example, from line 86 of member.php:$getuser=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid");you can see that a table called user is being accessed from a mySQL database connection referenced by $DB_site.
What you will need to do is to create a new database with a new user table, then add the code to global.php to connect to, say, $DB_user_site, then update every query that hits on the user table in all the .php script files to use the $DB_user_site connection instead of the $DB_site connection.
Conceptually, it is pretty straightforward. You will probably already have users that you want to import, but do that with mySQL directly or with phpMyAdmin, I suggest. Happy coding. :p And stay legal, of course. http://www.vbulletin.com/forum/images/icons/icon4.gif
Another option that crosses my mind just as I am about to post this reply is this: If the boards do not have to be perfectly seamlessly integrated (ie. you do want people to know that they have changed boards), why not offer a link on the Registration page to import user data from one of the other boards. This would be much simpler to code.
doron
Wed 9th Aug '00, 2:04pm
another way could be to do this:
use one db, but duplicate most of the tables..ie table posts and posts2, thread and thread2, etc., but keep user the same. You would have to edit one of the vb's and replace all calls to tables with an 2 at the end.
phumphries
Wed 9th Aug '00, 5:51pm
There was some discussion in another thread (http://www.vbulletin.com/forum/showthread.php?threadid=2058) about duplicating tables, but it seems to me that hacking one table is much easier, quicker and safer from the point of view of keeping down the number of errors and incorporating future hacks and upgrades. If the next version of vB has sub categories, I think that all this sort of discussion goes away.
JohnM
Sat 12th Aug '00, 6:11pm
Makaveli = Slick Chicken from http://www.ubbcodehacking.com
(Makaveli = the username Slick Chicken was going to change to - http://www.ubbcodehacking.com)
Me2Be
Sun 13th Aug '00, 2:17am
Hi JohnM!
JohnM
Sun 13th Aug '00, 11:36pm
Hi... did you just now notice I'm here? ;) This is 45th post!
hehe
vBulletin® v3.8.0 Release Candidate 1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.