The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Share users database among many forums Details »» | |||||||||||||||||||||||||
This is a feature requested many times, and we are still waiting, so I released a patch to be able to run many forums with the same user database.
This is an EXPERIMENTAL PATCH I'm running on my forums. Code:
--- ../../../private/upload/includes/class_core.php 2008-07-10 11:17:32.000000000 +0200 +++ class_core.php 2008-07-11 17:44:20.000000000 +0200 @@ -405,6 +405,33 @@ $this->connection_recent =& $link; $this->querycount++; + $shared_tables = Array("user","useractivation","userban","usertitle","userchangelog","usertextfield","userfield","usergroup","userlist","usernote","profilevisitor","reputation","reputationlevel","spamlog","strikes","pm","pmreceipt","pmtext","avatar","profilefield"); + + $main_prefix = "FP_"; + foreach ($shared_tables as $shared_table) + { + $orig = TABLE_PREFIX.$shared_table; + $dst = $main_prefix.$shared_table; + + $this->sql = str_replace($orig." ",$dst." " ,$this->sql); + $this->sql = str_replace($orig.".",$dst."." ,$this->sql); + $this->sql = str_replace($orig."\r",$dst."\r",$this->sql); + $this->sql = str_replace($orig."\n",$dst."\n",$this->sql); + $this->sql = str_replace($orig."\t",$dst."\t",$this->sql); + + } + if ($queryresult = $this->functions[$buffered ? 'query' : 'query_unbuffered']($this->sql, $link)) { This is only useful for new forums joining anothers one user database. Requirements:
FORUM A has table prefix FA_ in database, FORUM_B has FB_ and FORUM_C has FC_ FORUM A is the main, and older forum, where we have all our users. then we would install FORUM_B and FORUM_C normally, using the same database that FORUM_A uses, but setting up their own table prefixes. once FB_ and FC_ are installed then we go patching class_core.php from FORUM_B and FORUM_C setting up $main_prefix = "FA_"; so they use FORUM_A for shared tables. Possible problems:
Author: Optimizacion Web Show Your Support
|
Comments |
#112
|
|||
|
|||
Great to see some activity in this thread.
After reading what has been posted I might attempt vb 3.8 |
#113
|
|||
|
|||
still need to know how not to share the user signatures
|
#114
|
|||
|
|||
Can anyone tell me where i can find what the name of the main forum prefix is for forums A? I am unsure where to look.
|
#115
|
|||
|
|||
Quote:
look at your config.php file, where the DB info is, there you can see what prefix you are using. |
#116
|
|||
|
|||
Quote:
Thanks. |
#117
|
|||
|
|||
for this to work, you need to use 1 DB
That 1 DB will contatin the 2(or whatever) forums, each forum with a different table prefix So the DB will have a duplicate of each table, one for each forum. If neither of your forums use table prefix, you must set one before, you can use the install/tableprefix.php script to change your prefixes on the vB table. Just run it from the browser. Be sure to also make the appropriate change to config.php. Then you will have to merge your 2 DB's into 1 Then you apply this hack. |
#118
|
|||
|
|||
still waiting for an idea on how to avoid sharing the signatures.
thanks |
#119
|
||||
|
||||
Having one problem with this, if a user joins forum a, they are added to the total member list in forum b, but if a member joins forum b, they are not added to forum a.....
how can i fix this? |
#120
|
|||
|
|||
This is a godsend and would like to do some testing firstly on the "mySQL Views" option so does anyone have any idea what the source_db syntax would be in the following code for the user table located in a separate db with a different IP Address, db name, dba_username and password but both db's on the same server?
Code:
CREATE VIEW user as SELECT * FROM source_db.user; https://vborg.vbsupport.ru/showthread.php?t=211100 help so a user doesn't have to login at both domains? I can see a couple more vb license costs coming up if this works ok |
#121
|
||||
|
||||
I just want to ask a basic question to make sure that I understand this modification.
This modification will allow me to take multiple forums (all with separate vB licenses, of course ) and 'link' them with one single database which will allow for my members on Forum "A" to use their same username/password for Forum "B" and Forum "C" automatically? What are the drawbacks, if any, for using this setup? This is exactly what I'm looking for and would love for this to work properly for my network of forums that I'm setting up. :up: |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|