kderentz |
12-03-2008 12:13 AM |
Quote:
Originally Posted by merk_aus
(Post 1671741)
Wow,
I got it to work within like ten minutes by reading all five pages and getting everyones input.
Thanks for a great hack this is what I have been looking for and it works perfectly.
|
+1
Also guys my main DB does NOT have prefixes .... I just used this:
Code:
$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 = "";
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);
}
and it worked fine. My avatars are not showing up but Im guessing its because they are probably set to store in files not the DB :D
|