Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Shared user database for multiple forums, same server Details »»
Shared user database for multiple forums, same server
Version: 1.00, by CyberRanger CyberRanger is offline
Developer Last Online: Jan 2015 Show Printable Version Email this Page

Version: 3.0.9 Rating:
Released: 10-11-2005 Last Update: Never Installs: 15
Code Changes  
No support by the author.

For version 3.5x+, please see https://vborg.vbsupport.ru/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

      PHP Code:
      if ($tableid == "user" OR $tableid == "usergroup") {
                      
      $result $DB_site->query("SELECT title, $tableid FROM "."$tablename $wherecondition ORDER BY title");
              } else {
                      
      $result $DB_site->query("SELECT title, $tableid FROM " TABLE_PREFIX "$tablename $wherecondition ORDER BY title"); // existing code
              

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

      PHP Code:
          $tableid $tablename "id";

          if (
      $tablename == "user" OR $tablename == "usergroupid") {
              
      $result $DB_site->query("
                  SELECT title, 
      $tableid
                  FROM "
      ."$tablename
                  WHERE userselect = 1
                  ORDER BY title
              "
      );

          } else {
                      
      // existing code
                              
      $result $DB_site->query("
                  SELECT title, 
      $tableid
                  FROM " 
      TABLE_PREFIX "$tablename
                  WHERE userselect = 1
                  ORDER BY title
              "
      );
          } 

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 03-23-2006, 06:05 PM
dicb dicb is offline
 
Join Date: Mar 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found more details, but it doesnt' seem like anyone cares... Anyway, if you register in the forum that doesn't use the prefix, everything is find. If you register in any of the other forums, things get very squirrly.
Reply With Quote
  #93  
Old 04-12-2006, 08:16 PM
Fenriz Fenriz is offline
 
Join Date: Aug 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dicb, is it work properly in 3.5.4 now?
Reply With Quote
  #94  
Old 04-16-2006, 09:55 AM
tyfoon tyfoon is offline
 
Join Date: Feb 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I 've managed it working in 3.54 now trying to make it work whith the users in a special user database.
Reply With Quote
  #95  
Old 05-21-2006, 11:58 PM
e2s e2s is offline
 
Join Date: Nov 2004
Location: NH
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have everything working as well except when registering a new user from the new forums. It is still adding it to the new database user table instead of the old existing. Does anyone have any helpfull tips on where to find the insert statement that adds in a new user.

Any help is appreciated

Thanks
Reply With Quote
  #96  
Old 06-09-2006, 07:23 PM
e2s e2s is offline
 
Join Date: Nov 2004
Location: NH
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok got past the previous post problem. The current issue is in the Private Messaging. Whe I send a PM from the new site I get no error message and the message shows in my sent items however does not show in my inbox. I looked in the database and in table pmtext I can see the PM inside of table PM I see one entry which would be what shows in my PM box. What I don't see is the second entry that would allow it to show in my inbox.

I have been over the code way to many times and I think I am just missing it somewhere any help would be appreciated. It is really hard to find problems when there is no errors.

Thanks
Reply With Quote
  #97  
Old 06-10-2006, 09:30 PM
e2s e2s is offline
 
Join Date: Nov 2004
Location: NH
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok not sure if anyone is interested or how I could distribute this but I have the entire program working just I didn't keep track of the changes needed to make it work. Can I just remove my license key from all files and zip all the files together? I don't know what the rules are and how to go about this. I have it working on V3.5.

Any help would be great, Thanks
Reply With Quote
  #98  
Old 06-11-2006, 01:27 AM
lovevn lovevn is offline
 
Join Date: May 2004
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you please show me the demo?
Thanks
Reply With Quote
  #99  
Old 06-12-2006, 09:42 AM
e2s e2s is offline
 
Join Date: Nov 2004
Location: NH
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The demo would be

forums.everything2stroke.com
and
forums.everythingmx.com

I am still looking into how I can package this to make it easy to distribute
Reply With Quote
  #100  
Old 06-12-2006, 01:06 PM
Steve F's Avatar
Steve F Steve F is offline
 
Join Date: Mar 2003
Location: UK
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great, just signed up on both *well, just on 1 *

I hope you'll find your way around re-packaging the mod, really looking forward to test it on my board(s)
Reply With Quote
  #101  
Old 06-12-2006, 02:01 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by e2s
Ok not sure if anyone is interested or how I could distribute this but I have the entire program working just I didn't keep track of the changes needed to make it work. Can I just remove my license key from all files and zip all the files together? I don't know what the rules are and how to go about this. I have it working on V3.5.

Any help would be great, Thanks
First, great work! Thanks for keeping this concept alive. I've simply not had the appropriate amount of time to devote to it. How to package it is the tough thing. I'm fairly certain that you are NOT allowed to distribute entire vb replacement files here. You have to just show the hacks. I'm not positive about that but I think that's true.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06910 seconds
  • Memory Usage 2,318KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete