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.
  #46  
Old 26 Nov 2005, 20:58
FamilyCorner FamilyCorner is offline
 
Join Date: Jun 2005
Could it be??

I just posted this in a different forum before finding this thread. PLEASE first of all, reading my post below, am I understanding it correctly, that this hack will do what I am requesting below?

AND ALSO

will this work with 3.5.1?

I own a website that is "sister sites" with another. We intertwine quite a bit of content and our design is the same, other than the logos and colors. Before I ask this question it is important to note that I have NO PROBLEM and already PLAN to purchase a completely separate license for the second website.

What I would like to do is twofold:

1) I'd like to import my users into the forums that I install on the second site

2) I'd like to be able to have one sign in for both sites.

Does that make sense? So if MemberJoe signs in to "Site A" and browses around, posts a few times, then visits "Site B" he would automatically be signed in and wouldn't have to do it again.

Is there a way to do this??

Again, I'm going to purchase the second license, that is definitely not a problem
Reply With Quote
  #47  
Old 26 Nov 2005, 21:04
FamilyCorner FamilyCorner is offline
 
Join Date: Jun 2005
I should probably make sure that I point this out, the two different sites are on the same server but are completely different domains.
Reply With Quote
  #48  
Old 27 Nov 2005, 12:53
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Originally Posted by FamilyCorner
I should probably make sure that I point this out, the two different sites are on the same server but are completely different domains.
I haven't tried this with ver 3.5.1 but the concept would be the same. It would take some slight tweaking (ie DB_site) is no longer the correct syntax, but you could probably figure it out.

This does look like what you'd want. You don't "import" the users into the second db, it simply reads the users from the same db.
Reply With Quote
  #49  
Old 27 Nov 2005, 12:59
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Originally Posted by hugojr
OK I have done everthing but I am getting an error in the admincp now everytime I go to search for users I get this error

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

what does this mean? here is what line 1156 looks like

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

please someone please help me..
Hmm, that looks fine to me. The only function you are callind is $DB_site so I'm not sure why line 1156 would not work while 1154 does. What happens if you make the two the same? Does the query run then? (Obviously, don't leave it that way! Just for testing the code.)
Reply With Quote
  #50  
Old 27 Nov 2005, 13:00
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Originally Posted by FamilyCorner
will this work with 3.5.1?
A number of folks have ask me to do this. I'll tried to do a 3.5.1 example this week.
Reply With Quote
  #51  
Old 27 Nov 2005, 15:03
FamilyCorner FamilyCorner is offline
 
Join Date: Jun 2005
Originally Posted by westpointer
A number of folks have ask me to do this. I'll tried to do a 3.5.1 example this week.
Thank you so much!!
Reply With Quote
  #52  
Old 28 Nov 2005, 16:32
lazyseller lazyseller is offline
 
Join Date: Oct 2003
Looking forward for this......
Reply With Quote
  #53  
Old 08 Dec 2005, 06:03
Revpolar Revpolar is offline
 
Join Date: Feb 2004
A nice utility to do this with

I found a nice utility to do the string replacements with. Its called FSRU
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Example of how well it worked for me.

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

Reply With Quote
  #54  
Old 08 Dec 2005, 06:13
minzhong minzhong is offline
 
Join Date: Jul 2005
Do i need an individual license for each 'board' ?
Reply With Quote
  #55  
Old 08 Dec 2005, 09:40
Fenriz Fenriz is offline
 
Join Date: Aug 2002
Originally Posted by westpointer
A number of folks have ask me to do this. I'll tried to do a 3.5.1 example this week.
I have 2 forums (3.5.2) on the same server and want to share user database from one forum to another. Is it the right hack for that? Could you make it for vbulletin 3.5.2?

Thank you!
Reply With Quote
  #56  
Old 08 Dec 2005, 13:27
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Originally Posted by minzhong
Do i need an individual license for each 'board' ?
Yes. Each install requires a separate license if you use this method.
Reply With Quote
  #57  
Old 08 Dec 2005, 13:28
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Originally Posted by Fenriz
I have 2 forums (3.5.2) on the same server and want to share user database from one forum to another. Is it the right hack for that? Could you make it for vbulletin 3.5.2?

Thank you!
I keep meaning to to that. Time is the enemy. (Yes, this is the right hack.)
Reply With Quote
  #58  
Old 13 Dec 2005, 09:54
b65ran b65ran is offline
 
Join Date: Apr 2005
waiting for 3.5.2 release!
Reply With Quote
  #59  
Old 22 Dec 2005, 21:21
boostedsti boostedsti is offline
 
Join Date: Nov 2003
Westpointer any update on VB3.5.2?
Reply With Quote
  #60  
Old 23 Dec 2005, 02:28
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Originally Posted by boostedsti
Westpointer any update on VB3.5.2?
Sorry, I just haven't had the time to do this. Not forgotten. Maybe next week. :nervous:
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 10:40.

Layout Options | Width: Wide Color: