Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2008, 09:20 PM
Ecksta C Ecksta C is offline
 
Join Date: Feb 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Switching the vBulletin user database

Hi all,

I'm currently looking at a couple of discussion boards on behalf of my company. Basically we're looking to add discussion boards functionality to our existing websites.

I've recommended VB because i've used it a fair bit on my personal sites before.

I've always based my user database on the vb_user table - sensible for a site which doesn't have any users to begin with.

However, my company has several thousand users already stored in a database, off which multiple sites run, so changing the database that users' details are stored in to VB is out of the question (all of the other sites would have to have their SQL rewritten).

What I really want to do is have VB use our 'One Database' for authentication and also perform password updates and other specified profile fields on it.

The obvious problem is that VB has hardcoded SQL statements that reference the vb_user table...

Has anybody ever been in the same situation? I haven't thought it through a great deal yet as I'm hoping somebody else has already gone this process.

Any theories/ideas are appreciated!
Reply With Quote
  #2  
Old 08-16-2008, 10:29 PM
w1z4rd w1z4rd is offline
 
Join Date: Feb 2005
Location: MooseTown
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What platform are the sites you are referencing? Alot of CMS' and blog platforms already have solutions that integrate with vbulletin to varying degrees. Other then that you would probably have to get a vb guru to write a script that could sync the desired tables of your databases.

I don't really know what I'm talking about though so I'd definitely seek alternate answers. Just trying to be helpful.
Reply With Quote
  #3  
Old 08-17-2008, 09:07 AM
Ecksta C Ecksta C is offline
 
Join Date: Feb 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The platform is completely custom and has been written in-house so there's no integration with vBulletin.

The only thing that I've come up with so far is very similar to what you've said here... writing a script that has the ability to syncronize data from our custom DB with the vBulletin one when an update occurs and vice versa.

Another potential solution that I was thinking about was creating a view from our custom database and calling it vb_user instead of the table shipped with vBulletin. This would allow us to keep the vBulletin code the same and change the datasource at the database level rather than when PHP runs.

The only problem is that when it comes to updating or inserting to that view, we'll run into problems because you can't insert/update a row with a column that is derived from an expression (see this from the MySQL manual on views).

Quote:
A view that has a mix of simple column references and derived columns is not insertable, but it can be updatable if you update only those columns that are not derived. Consider this view:

Code:
CREATE VIEW v AS SELECT col1, 1 AS col2 FROM t;
This view is not insertable because col2 is derived from an expression. But it is updatable if the update does not try to update col2. This update is allowable:
Code:
UPDATE v SET col1 = 0;
This update is not allowable because it attempts to update a derived column:
Code:
UPDATE v SET col2 = 0;
So... any ideas how I could get around this perhaps? It seems to be the least intrusive to me...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:55 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.03300 seconds
  • Memory Usage 2,183KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete