vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Major Additions - Share users database among many forums (https://vborg.vbsupport.ru/showthread.php?t=185021)

mayanks 09-04-2008 10:42 AM

thanks for it...could you please provide a small tutorial on how to do it?

Amenadiel 09-05-2008 02:45 AM

a little question: I believe the password's salt is based on the forum's license string. ¿Why doesn't this affect this mod?

Amenadiel 09-05-2008 02:51 AM

Quote:

Originally Posted by z4media (Post 1612798)
Hello

I?am very intersted in this modification, but there is no howto.

Please explain the implementation of this mod.

Where do i put the code in the class_core.php, btw. in which line ?

thx

Flo

Quote:

Originally Posted by mayanks (Post 1614291)
thanks for it...could you please provide a small tutorial on how to do it?



1.- open includes/class_core.php

2.- find
Code:

$this->querycount++;
(should be line 406)

3.- after that, add
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 = "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);

              }

4.- save and close file, upload if you need to

Quarterbore 09-16-2008 07:12 PM

Now that was a nice short tutorial :D

Would this work with two different versions of vBulletin? Say for example a 3.6.x and a 3.7.x site?

I assume that this would not cause major impacts with upgrading as long as we remember to update the core file again?

I wonder what the chances are that vBulletin could do something as a standard feature in vBulletin as I always wondered what the master and slave setting were for in the config.php file but honestly I never really had the time to investigate.

I will have to look at this code more and give it a try on one of my test boards and if it works I may need to buy some more vBulletin licenses!

King Justice 09-26-2008 11:40 AM

Hi there. :)

Is this working on the latest version of vB? This will work with two different databases right, basically sharing one database's vB users?

Kaelon 10-02-2008 07:08 AM

If I also wanted to share my Who's Online data (so that users showing up as logged in on one forum also appear as logged in on the other), is there anything I should be concerned about before just sharing those tables?

myown 10-02-2008 08:17 AM

great hack will use at some point.

chikkoo 11-10-2008 05:45 AM

I have been looking for such a mod to merge my two forums database, I will give a try and let everyone know the performance.

gibgib 11-11-2008 08:21 AM

I've read this thread 4 times, all 4 pages & I can't seem to get the slave board to grab anything from the main.
The main forum has no prefix in it's tables so I have used the following:

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);

$main_prefix = "";
I also tried
$main_prefix = ".";
&
$main_prefix = " ";

The new forum has yf_ as prefix which I had entered into the config.php before install.
Same database.
Is there a setting within the config.php that could be affecting the class_core.php mod?
I'm refreshing the member list on the new forum to check it's working. I should see it go from 1 member to 12,447 members to mirror the main forum right?

merk_aus 11-16-2008 11:15 AM

i have the same problem my main forum does not use table prefix what can we edit to have it so that members can log into the second board - all i would like is the users shared nothing else.

Please anyhelp would be appreciated.


All times are GMT. The time now is 04:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01223 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete