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)
Out of curiousity,,
Collapse
X
-
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]Peter E. Humphries -
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).Peter E. HumphriesComment
-
The major portion of what you will need to hack is in the [i]member.php[/i] file. Basically, anything that accesses the [b]user[/b] table will need to be redirected to the common [b]user[/b] table you create for all the boards.
For example, from line 86 of [i]member.php[/i]:[code]$getuser=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid");[/code]you can see that a table called [b]user[/b] is being accessed from a mySQL database connection referenced by [b]$DB_site[/b].
What you will need to do is to create a new database with a new [b]user[/b] table, then add the code to [i]global.php[/i] to connect to, say, [b]$DB_user_site[/b], then update every query that hits on the [b]user[/b] table in all the [b][i].php[/i][/b] script files to use the [b]$DB_user_site[/b] connection instead of the [b]$DB_site[/b] 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. [img]http://www.vbulletin.com/forum/images/icons/icon4.gif[/img]
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.Peter E. HumphriesComment
-
another way...
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.Comment
-
Which tables to duplicate
There was some discussion in another [url="http://www.vbulletin.com/forum/showthread.php?threadid=2058"]thread[/url] 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.Peter E. HumphriesComment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment