Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Shared user database for multiple forums, same server Details »
Shared user database for multiple forums, same server
Mod Version: 1.00, by CyberRanger (Member) CyberRanger is offline
Developer Last Online: Jan 2015 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.9 Rating: (0 vote - 0 average) Installs: 15
Released: 12 Oct 2005 Last Update: Never Downloads: 1
Not Supported Code Changes  

For version 3.5x+, please see http://www.vbulletin.org/forum/showthread.php?t=118473

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:
  1. Copy your forum directories to a parallel directory (for example copy /www/forums to /www/new_forums)
  2. In /includes/config.php, change $tableprefix (line 91) to a new prefix [for example $tableprefix = 'new_';]
  3. Run the vb install from the new directory (/www/new_forums/install/install.php)
  4. 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!
  5. 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
  6. 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.)
  7. 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.
  8. 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


      Block Disabled:      (Update License Status)  
      Suspended or Unlicensed Members Cannot View Code.

    • In /includes/adminfunctions_user.php around line 116 (construct_style_chooser)


      Block Disabled:      (Update License Status)  
      Suspended or Unlicensed Members Cannot View Code.


Done! Both forums are now accessed by the same user table! PM's are unified across forums as is the user count.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #106  
Old 19 Sep 2007, 18:57
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Originally Posted by Ahsin1 View Post
im using 3.6.x can some do this for me? pm me please.. THANKS
Sorry, I just don't have the time for any additional projects now.
Reply With Quote
  #107  
Old 24 Oct 2007, 08:07
massiveblack massiveblack is offline
 
Join Date: Apr 2005
is it possible

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.


Jason
Reply With Quote
  #108  
Old 24 Oct 2007, 11:57
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
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.
Reply With Quote
  #109  
Old 28 Nov 2007, 23:22
TundraSoul TundraSoul is offline
 
Join Date: Mar 2002
Originally Posted by CyberRanger View Post
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.
Reply With Quote
  #110  
Old 28 Nov 2007, 23:30
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Originally Posted by TundraSoul View Post
Great, let everyone know if it works. vB totally needs to implement this kind of feature into their software.
oh man, I forgot I posted this! I've done it and it works great. Create an account at www.armchairgeneral.com/forums then go over to http://www.armchairhq.com/forums/ (nothing really in that forum, it's a test area.)

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.

Last edited by CyberRanger; 29 Nov 2007 at 01:15.
Reply With Quote
  #111  
Old 28 Nov 2007, 23:46
TundraSoul TundraSoul is offline
 
Join Date: Mar 2002
I don't mind doing the edits, I just need to know what to do. (drool)...
Reply With Quote
  #112  
Old 29 Nov 2007, 20:20
geckofrog geckofrog is offline
 
Join Date: Aug 2006
me too, I need this!
Reply With Quote
  #113  
Old 30 Nov 2007, 23:44
massiveblack massiveblack is offline
 
Join Date: Apr 2005
Is there any more information on this?

Much appreciated...truly.


JM
Reply With Quote
  #114  
Old 27 Dec 2007, 21:39
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
I would really like this as well.
Reply With Quote
  #115  
Old 26 Feb 2008, 05:46
glaird glaird is offline
 
Join Date: Nov 2007
Cross-server is just what I'm looking for! Have you had a chance to document it yet?

thanks!
Reply With Quote
  #116  
Old 27 Feb 2008, 02:59
superthang superthang is offline
 
Join Date: Aug 2007
any up for this on 3.6.8 or 3.7 ?


cyberranger your my hero! please share!
Reply With Quote
  #117  
Old 21 Jun 2008, 05:58
Sean James's Avatar
Sean James Sean James is offline
 
Join Date: Apr 2004
Location: Sydney, Australia
Real name: Sean James
Is this available?
__________________
www.bluepearl-skins.com - Twitter
Professional Forum Skins
Reply With Quote
  #118  
Old 18 Feb 2009, 08:21
sv1cec sv1cec is offline
 
Join Date: May 2004
Real name: John
I know this is a very old thread, but I am still running 3.0.xx and I need to build a second site which will use the user tables of my first one, so here I am.

I would like to know how the "sessions" are handled. I have some questions here and I would appreciate if someone can answer them for me.

Let's assume two sites, A and B. With this hack, all user information is kept in the "user" table in database A.

A member of site A logs in Site B. Obviously, since the last login time is stored in the shared user table, the last login time entered in the table, will be common for both sites, correct? So if the member comes back after two days and logs in site A, the last login time will be the last login time from his visit in site B. That means that if the user asks to see the new posts since his last visit (for example), the posts shown to him will not be correct, he will miss the posts between the last time he visited site A and the time he visited site B. Am I correct on this? It is of course possible to alter the user table to have separate columns for these time parameters for site A and site B.

Another question: again, let's suppose that a member logs in site B, does some work there and then follows a link to site A. Will he still be logged in in site A or will he need to re-log in in the other site? In other words, how are cookies handled? And what difference will it make if someone uses the "Remember me" checkbox in one site?

Finally a code question: the author suggests that we use a new table prefix for the new database "new_". The changes suggested show an empty table prefix though, for the old database. Shall I assume that wherever it is suggested to replace " . TABLE_PREFIX . " with ".", if one uses a prefix in the old database, he should replace " . TABLE_PREFIX . " with whatever his old table prefix is? I guess one could define something like "USER_TABLE_PREFIX" with the value of the table prefix used in the first site, and do the find and replace operations you suggest?

Again, I am aware this is an old hack, which has already been ported to later vB releases, but since I do not plan to use later releases, and this thing is pressing me, I would certainly appreciate any help you can give me.
__________________

John
SV1CEC
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 21:46.

Layout Options | Width: Wide Color: