Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Multiple Forums using a single user table Details »»
Multiple Forums using a single user table
Version: 1.00, by e2s e2s is offline
Developer Last Online: Mar 2009 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 06-12-2006 Last Update: Never Installs: 48
 
No support by the author.

This was originaly done in 3.0.9 by westpointer you can view that thread here

This Modification is for VB3.5.4 This is not supported but I will give as much help as I possible can.

I have this working now on 2 sites

The main site is http://forums.everything2stroke.com

Slave sites are
http://forums.everythingmx.com
and
http://forums.everythingduners.com

After a successfull install of this modification your sites will share User, PM, and sesson data.

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
  • One database will contain all the tables
A valid vbulletin license exists for each install


Follow these steps

1.) Download your new copy of VB that contains a seperate license key
2.) Go to /includes/config.php.new rename the file to config.php and make necessary changes to the file. See VB Directions. Make sure this code has a different setting than the master site for table prefix.

PHP Code:
 //          ****** TABLE PREFIX ******
 //          Prefix that your vBulletin tables have in the database.
$config['Database']['tableprefix'] = ''
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 all files and directories to your PC from the new install location.

6.) You will need a tool to do a mass Search and replace on all files. I use WildEdit. Here is what you will do using a tool like Wild Edit.
  • Search for [" . TABLE_PREFIX . "user] Replace with [" . "vb3_user] where "vb3_" is the prefix to your master site. 110 Files modified 599 Total changes made
  • Search for [" . TABLE_PREFIX . "strikes] Replace with [" . "vb3_strikes] where "vb3_" is the prefix to your master site 4 Files modified 8 Total changes made
  • Search for [" . TABLE_PREFIX . "pm] Replace with [" . "vb3_pm] where "vb3_" is the prefix to your master site 16 Files modified 77 Total changes made
  • Search for [" . TABLE_PREFIX . "session] Replace with [" . "vb3_session] where "vb3_" is the prefix to your master site 20 Files modified 31 Total changes made

Now to modify some of the code.

In /include/class_dm.php

Search for:
PHP Code:
 function fetch_insert_sql($tableprefix$table)

            { 
Add below change vb3_ to your master site prefix:
PHP Code:
if ($table == "vb3_pmtext")

            {

                        
$sql "INSERT INTO {$table}\r\n\t(" implode(', 'array_keys($this->$table)) . 


")\r\nVALUES\r\n\t(";

            

            }

            else 

Go to /include/class_dm_pm.php

Search for:
PHP Code:
var $table 'pmtext'
Replace with making vb3_ the prefix to your master site:
PHP Code:
var $table 'vb3_pmtext'

Search for:
PHP Code:
$pmtextid = ($this->existing['pmtextid'] ? $this->existing['pmtextid'] : $this->pmtext['pmtextid']); 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
$pmtextid = ($this->existing['pmtextid'] ? $this->existing['pmtextid'] : $this->vb3_pmtext['pmtextid']); 
Search for:
PHP Code:
$this->dbobject->query_write("INSERT INTO " TABLE_PREFIX "pm (pmtextid, userid) VALUES ($pmtextid$user[userid])"); 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
$this->dbobject->query_write("INSERT INTO " "vb3_pm (pmtextid, userid) VALUES ($pmtextid$user[userid])"); 
Search for:
PHP Code:
" . $this->dbobject->escape_string($user['username']) . "', '" . $this->dbobject->escape_string($this->pmtext['title']) . 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
" . $this->dbobject->escape_string($user['username']) . "', '" . $this->dbobject->escape_string($this->vb3_pmtext['title']) . 

Go to /include/class_dm_user.php

Search for:
PHP Code:
$return $this->db_update(TABLE_PREFIX'user'$this->condition$doquery$delayed); 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
$return $this->db_update('vb3_''user'$this->condition$doquery$delayed); 
Search for:
PHP Code:
$this->db_update(TABLE_PREFIX'userfield',     $this->condition$doquery$delayed); 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
$this->db_update('vb3_''userfield',     $this->condition$doquery$delayed); 
Search for:
PHP Code:
$this->db_update(TABLE_PREFIX'usertextfield'$this->condition$doquery$delayed); 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
$this->db_update('vb3_''usertextfield'$this->condition$doquery$delayed); 
Search for:
PHP Code:
if ($return $this->db_insert(TABLE_PREFIX'user'$doquery)) 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
if ($return $this->db_insert('vb3_''user'$doquery)) 
Search for:
PHP Code:
$this->db_insert(TABLE_PREFIX'userfield',     $doquery); 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
$this->db_insert('vb3_''userfield',     $doquery); 
Search for:
PHP Code:
$this->db_insert(TABLE_PREFIX'usertextfield'$doquery); 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
$this->db_insert('vb3_''usertextfield'$doquery); 
Search for:
PHP Code:
DELETE FROM " . TABLE_PREFIX . "session 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
DELETE FROM ?.?vb3_session 
Search for:
PHP Code:
INSERT INTO " . TABLE_PREFIX . "passwordhistory (useridpasswordpassworddate
Replace with where vb3_ is the prefix to your master site:
PHP Code:
INSERT INTO " . "vb3_passwordhistory (useridpasswordpassworddate
Search for:
PHP Code:
 UPDATE " . TABLE_PREFIX . "session SET 
Replace with where vb3_ is the prefix to your master site:
PHP Code:
   UPDATE ?.?vb3_session SET 

That is all the code modification.


The only other item I did is remove a couple cron jobs.

Go into Scheduled tasks then to Scheduled Task Manager

Delete the following CRON jobs from the Slave Site

User Promotions*
Birthdays
Activation Reminder Email

This will eliminate members getting emails from the primary and secondary sites
*not sure if this will duplicate efforts between primary and secondary sites I have it running on both sites still waiting to see if it causes any issues.


Please post here if you have any problems and questions I will try my best to keep up with everyone to help you through this. Once you get the code done the first time you can just do a mass search and replace on your license code and you can be up and running in minutes with a new site.

This is my first major modification so I hope I posted this all correct, again Thanks to Westpointer for his original work without his post this would not have been possible.

Thanks

UPDATE:

Please make this changes it will allow you to make changes to usergroups in the subscription section and when editing a user.

admincp/adminfunctions.php
Search for
PHP Code:
                $result $vbulletin->db->query_read("SELECT title, $tableid FROM " TABLE_PREFIX "$tablename $wherecondition ORDER BY title"); 
Replace with
PHP Code:
if ($tablename == "usergroup")
                {
                
$result $vbulletin->db->query_read("SELECT title, $tableid FROM " "vb3_$tablename $wherecondition ORDER BY title");
                }
                else
                {
                
$result $vbulletin->db->query_read("SELECT title, $tableid FROM " TABLE_PREFIX "$tablename $wherecondition ORDER BY title");
                } 

Show Your Support

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

Comments
  #112  
Old 09-24-2007, 07:15 PM
pspcrazy pspcrazy is offline
 
Join Date: Apr 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm so hoping this works on 3.6.8 I've been looking for something like this for a year or so but never found it. Please reply thanks@!
Reply With Quote
  #113  
Old 09-24-2007, 09:44 PM
Fenriz Fenriz is offline
 
Join Date: Aug 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, this modification is not working on 3.6.x
Reply With Quote
  #114  
Old 09-28-2007, 02:00 PM
JohnBee JohnBee is offline
 
Join Date: Oct 2004
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance it could get ported to 3.6x? - This MOD is of great interest to me
Reply With Quote
  #115  
Old 10-24-2007, 07:30 AM
massiveblack massiveblack is offline
 
Join Date: Apr 2005
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 (we are a non-profit organization). 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. I am hoping for assistance and input on this and have some budget to hire someone with appropriate skills.

If anyone can assist me with this, please let me know at jmanley@massiveblack.com The site is called www.conceptart.org/forums. We are making a photography forums, a fine art forums and some other areas.

Please advise...just talented artists here, not many programmers.


Jason
jmanley@massiveblack.com
Reply With Quote
  #116  
Old 11-28-2007, 08:47 PM
TundraSoul TundraSoul is offline
 
Join Date: Mar 2002
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's definitely a demand for this type of networking. I also would like the ability to run multiple forums with just one user database. Sign me up!
Reply With Quote
  #117  
Old 11-29-2007, 06:08 PM
geckofrog geckofrog is offline
 
Join Date: Aug 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am interested also...
Reply With Quote
  #118  
Old 11-30-2007, 01:37 PM
regitbull regitbull is offline
 
Join Date: Jan 2007
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i want to ask something.

Im looking a few months for a mod that can give discount on paid subscriptions or a coupon mod and its requested many times but nobody could make it.

So i was thinking what if i put a second forum on my site that run a 3.5 serie.
If they buy a paid subscription on that forum does that subscription also work on the main forum then?

Because then i can use the other forum so they can buy a subsripion with discount and it will work on the main forum.

Do you guys think thats posseble or is that a other table?
And if its a other table it it posseble to do did with that other table then?
Reply With Quote
  #119  
Old 11-30-2007, 01:51 PM
kafi kafi is offline
 
Join Date: Apr 2004
Posts: 379
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If there is somebody that will take this mutlipleforum under the wings, I am also interested in paid modification with updates...
Reply With Quote
  #120  
Old 12-28-2007, 07:19 PM
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Location: Booneville, AR, USA
Posts: 1,428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone updated this yet? The way vB has things setup now confuses me to death and I can't seem to figure out where insert queries are for users, etc. So if anyone has updated this, please PM me.
Reply With Quote
  #121  
Old 01-09-2008, 05:26 AM
azn_romeo_4u azn_romeo_4u is offline
 
Join Date: Feb 2006
Posts: 227
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm willing to pay for a working but enhance version of this mod. Someone send me a PM please =D
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 09:20 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.05405 seconds
  • Memory Usage 2,386KB
  • 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
  • (31)bbcode_php
  • (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
  • (1)pagenav_pagelinkrel
  • (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