Out of curiousity,,

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Makaveli
    Member
    • Jul 2000
    • 31

    Out of curiousity,,

    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
    Senior Member
    • Jun 2000
    • 169

    #2
    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

    Comment

    • Makaveli
      Member
      • Jul 2000
      • 31

      #3
      Would this be tough to do?

      Comment

      • phumphries
        Senior Member
        • Jun 2000
        • 169

        #4
        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. Humphries

        Comment

        • Makaveli
          Member
          • Jul 2000
          • 31

          #5
          Ok, if you have time could you please document the code that I would have to use?

          Comment

          • phumphries
            Senior Member
            • Jun 2000
            • 169

            #6
            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. Humphries

            Comment

            • doron
              Senior Member
              • Apr 2000
              • 669

              #7
              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

              • phumphries
                Senior Member
                • Jun 2000
                • 169

                #8
                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. Humphries

                Comment

                • JohnM
                  Senior Member
                  • May 2000
                  • 622

                  #9
                  HMMMM

                  Makaveli = Slick Chicken from [url]http://www.ubbcodehacking.com[/url]

                  (Makaveli = the username Slick Chicken was going to change to - [url]http://www.ubbcodehacking.com[/url])

                  Comment

                  • Me2Be
                    Lady Moderator
                    • Jun 2000
                    • 2504

                    #10
                    Hi JohnM!

                    Comment

                    • JohnM
                      Senior Member
                      • May 2000
                      • 622

                      #11
                      Hi... did you just now notice I'm here? ;) This is 45th post!
                      hehe

                      Comment

                      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...