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 |
#12
|
|||
|
|||
Session is useful only if it's for different forums from the same site. It will avoid double login and keep who's online synchronized.
In the example above, I remembered that I had to do those 2 changes also (version 3.60) since they appeared to be independent from class_core Quote:
|
#13
|
|||
|
|||
nice, thank you
|
#14
|
||||
|
||||
Quote:
|
#15
|
|||
|
|||
Quote:
[QUOTE] Quote:
Thanks Lionel! |
#16
|
|||
|
|||
I doubt if those tables are safe to be shared: "reputation","spamlog"
They point to postid, and probably they would only mess. What do you think about that? Should I take them out? |
#17
|
|||
|
|||
I never used "reputation" and "spamlog" in the other integration 3.07 => 3.60 from 2 years ago.
|
#18
|
|||
|
|||
This will just be duplicate content in search engines. If you think this is going to give you extra exposure your right, however at what cost? getting dropped from the search engines.
There is need for this tho, and only in some situations, eg. maybe you got a support board that is for registered users only and you have a few websites, then that would be useful. Thanks for sharing, I do look forward to seeing this progress, however I currently don't have that need for it like some sites do. Just for the other sites who think great I can now have several domains but with the same forums showing, this is a really bad idea. |
#19
|
|||
|
|||
Quote:
Code:
User-Agent: * Disallow: /forum/memberlist.php Disallow: /forum/member.php Greetings honstar1337! |
#20
|
|||
|
|||
Quote:
I might actually end up using this afterall. Thanks. |
#21
|
|||
|
|||
this is really interesting and something that I was thinking about since a while..
I'm gonna keep an eye on this, and maybe I'm gonna use it soon for some reason thanks for sharing man best regards |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|