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 |
#122
|
|||
|
|||
That is the only problem I myself have also.
|
#123
|
|||
|
|||
|
#124
|
|||
|
|||
Can't get this to work with vb 4.0.
There's a lot of extra lines in the class_core.php in the new VB. |
#125
|
|||
|
|||
Quote:
will this addon be upgrade to v4?? :erm::erm: |
#126
|
|||
|
|||
I have a problem where on my 2nd / slave board when you click on on a members user name it should take you to the member list page for that user. But instead im getting a "Can not find user" error, Does anyone know what I can do to resolve this??
Master board www.pspmod.com Slave Board www.console-mods.com Thanks |
#127
|
||||
|
||||
I've started to get this to work on 4.0.3 PL1 suite. So far only a few of the connections work. I'm still trying to figure out a work around for the avatars.
|
#128
|
|||
|
|||
I haven't had any luck with it on vB4 so I have stay with 3.8.
If you have any success please let us know. lcp03o: here is a copy of what I add to classcore & have no problems with sharing the stuff I need, that being the users info only, so the threads & posts etc are unique. Code:
$shared_tables = Array("user","useractivation","userban","usertitle","userchangelog","usertextfield","userfield","usergroup","userlist","usernote","profilevisitor","reputation","reputationlevel","spamlog","strikes","pm","pmreceipt","pmtext","avatar","customavatar","profilefield"); $main_prefix = ""; 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); } |
#129
|
||||
|
||||
If you add "customavatar","customprofilepic","sigpic","sigpar sed" all uploaded images will work between sites. Also "visitormessage" for those who want to share more profile information.
Now it works perfectly on 4.0.3 PL1. I only took out "userban" for my own usage, but it still works in vB4. Code:
$shared_tables = Array("user","useractivation","usertitle","userchangelog","usertextfield","userfield","usergroup","userlist","usernote","profilevisitor","reputation","reputationlevel","spamlog","strikes","pm","pmreceipt","pmtext","avatar","customavatar","profilefield","customprofilepic","visitormessage","sigpic","sigparsed"); $main_prefix = "FA"; 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); } |
#130
|
|||
|
|||
That's amazing.
It did not work for me at all, it completely ignored the added lines in classcore. I'm a bit scared to try it again as it represents a lot of work creating temp forums. May try at the weekend |
#131
|
|||
|
|||
Has anyone tried a common cookie domain yet?
I mean so the users can float between without any logging in at all, on any of the sites. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|