vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   2 Vb's One Login (https://vborg.vbsupport.ru/showthread.php?t=176351)

noj75 04-16-2008 04:42 PM

2 Vb's One Login
 
Hi all,

Is it possible to register a user into two vB's on different domains.

let me explain.

I have two licenses of vB on two seperate domains ( eg DA & DB). If a user registered on DA could I set it up so that their registration also goes into DB automatically? Linke linking the two.
I hope that makes sense.

Is it possible for this to be done?

Thanks in advance!

dcw 04-16-2008 04:50 PM

I'd like to know this too, we have 3 forums actually but one isn't VB 2 are, and we are talking about figuring out how to connect the 3 together without having to log in on each forum.

MoT3rror 04-16-2008 08:06 PM

I am not for sure if this will work. I would test this on a development server before trying.

Using one the register hooks. Change the current DB info using this code assign the correct values for the second site.
PHP Code:

$db->connect(
    
$vbulletin->config['Database']['dbname'],
    
$vbulletin->config['MasterServer']['servername'],
    
$vbulletin->config['MasterServer']['port'],
    
$vbulletin->config['MasterServer']['username'],
    
$vbulletin->config['MasterServer']['password'],
    
$vbulletin->config['MasterServer']['usepconnect'],
    
$vbulletin->config['SlaveServer']['servername'],
    
$vbulletin->config['SlaveServer']['port'],
    
$vbulletin->config['SlaveServer']['username'],
    
$vbulletin->config['SlaveServer']['password'],
    
$vbulletin->config['SlaveServer']['usepconnect'],
    
$vbulletin->config['Mysqli']['ini_file'],
    
$vbulletin->config['Mysqli']['charset']
); 

Then in the same hook use the user datamanager to create a user on the other site.
https://vborg.vbsupport.ru/showthrea...t=create+users

Then switch the DB info back to the current site.
PHP Code:

$db->connect(
    
$vbulletin->config['Database']['dbname'],
    
$vbulletin->config['MasterServer']['servername'],
    
$vbulletin->config['MasterServer']['port'],
    
$vbulletin->config['MasterServer']['username'],
    
$vbulletin->config['MasterServer']['password'],
    
$vbulletin->config['MasterServer']['usepconnect'],
    
$vbulletin->config['SlaveServer']['servername'],
    
$vbulletin->config['SlaveServer']['port'],
    
$vbulletin->config['SlaveServer']['username'],
    
$vbulletin->config['SlaveServer']['password'],
    
$vbulletin->config['SlaveServer']['usepconnect'],
    
$vbulletin->config['Mysqli']['ini_file'],
    
$vbulletin->config['Mysqli']['charset']
); 

There might be better way to do this but I am just giving a idea. Also there might be more to this then just this code.

Opserty 04-16-2008 08:52 PM

Won't be easy you'd have to edit a lot of things, maybe you should consider running them off the same database if that is possible? and just merging the two current ones into a single one. Then you can just use a different style for each domain.

Dismounted 04-17-2008 05:42 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=174642" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=174642</a>


All times are GMT. The time now is 05:56 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.01409 seconds
  • Memory Usage 1,740KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete