Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 11-25-2004, 02:10 AM
Radon3k's Avatar
Radon3k Radon3k is offline
 
Join Date: Nov 2001
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Inserting a new user into multiple tables.

Currently on my site you have to register for the site and then again for the forums. What I would like is to be able to have one registration form that registers you for both the forums and the site. When you fill out the form and submit it, 2 queries are sent; 1 query to the actual website table that handles the user functions there and 1 query to the forum table to register the new user. However looking at the vBulletin code there were several queries made to the database for registering a new user. How does one go about accomplishing something like what I'm trying to do? When the user registers he/she should go into to standard usergroup. To make things a little more complex, I want to includ email activation through my site, not the forums. So when a user registers on the site, they are also registered on the forums and receive an email to activate their account. When the account is activated it updates both tables. Any ideas? Thanks.
Reply With Quote
  #2  
Old 11-25-2004, 02:56 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Radon3k
Currently on my site you have to register for the site and then again for the forums. What I would like is to be able to have one registration form that registers you for both the forums and the site. When you fill out the form and submit it, 2 queries are sent; 1 query to the actual website table that handles the user functions there and 1 query to the forum table to register the new user. However looking at the vBulletin code there were several queries made to the database for registering a new user. How does one go about accomplishing something like what I'm trying to do? When the user registers he/she should go into to standard usergroup. To make things a little more complex, I want to includ email activation through my site, not the forums. So when a user registers on the site, they are also registered on the forums and receive an email to activate their account. When the account is activated it updates both tables. Any ideas? Thanks.
I would do it though the vB end personaly

You are going to want to look at register.php for abit of help
Reply With Quote
  #3  
Old 11-25-2004, 03:07 AM
Radon3k's Avatar
Radon3k Radon3k is offline
 
Join Date: Nov 2001
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't want to do the registering through the vBulletin end. I want vBulletin to have almost nothing to do with my main site which is why I'm doing it this way. The way it is setup now on my site is you have to register both on the site and the forums and I'm fine with that but I'm sure users would like to ease of one registration process. Also, I have looked through register.php and there were several sections that could potentially be involved with the registration process hence why I'm asking here.
Reply With Quote
  #4  
Old 11-27-2004, 08:02 AM
Radon3k's Avatar
Radon3k Radon3k is offline
 
Join Date: Nov 2001
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Radon3k
I don't want to do the registering through the vBulletin end. I want vBulletin to have almost nothing to do with my main site which is why I'm doing it this way. The way it is setup now on my site is you have to register both on the site and the forums and I'm fine with that but I'm sure users would like to ease of one registration process. Also, I have looked through register.php and there were several sections that could potentially be involved with the registration process hence why I'm asking here.
Anybody have any suggestions?
Reply With Quote
  #5  
Old 11-27-2004, 06:40 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Radon3k
Anybody have any suggestions?
You are going to need to populate at least three rows in 3 tables everytime someone registers, like i said look at the register.php file for help.
Reply With Quote
  #6  
Old 11-29-2004, 07:45 PM
Radon3k's Avatar
Radon3k Radon3k is offline
 
Join Date: Nov 2001
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery
You are going to need to populate at least three rows in 3 tables everytime someone registers, like i said look at the register.php file for help.
I have looked in register.php and I don't see where it's inserting the user. It's checking so many conditions on where to put the user and I don't need that. I just want the user, when registered through my site, to go into the users awaiting validation usergroup. Everything else is normal and can be left as is. The password is also another issue I'm having as I don't understand the way vBulletin has encrypted the password (yes, I've looked in the correct functions file). I'm looking for a simple way to insert a user into the vBulletin database as well as mine (they are in separate databases and I can work around that).
Reply With Quote
  #7  
Old 11-30-2004, 06:49 PM
Radon3k's Avatar
Radon3k Radon3k is offline
 
Join Date: Nov 2001
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've looked through this file and maybe it's just that I don't understand it but I don't see where exactly this stuff is. I've looked through it and I see where the various actions are being done. I'm not looking for someone to write the code for me but instead point out the necessary code from the vBulletin files I need in order to make this work. I can write the code to integrate what I need as long as I have the right code from vBulletin.
Reply With Quote
  #8  
Old 11-30-2004, 07:02 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Radon3k
I've looked through this file and maybe it's just that I don't understand it but I don't see where exactly this stuff is. I've looked through it and I see where the various actions are being done. I'm not looking for someone to write the code for me but instead point out the necessary code from the vBulletin files I need in order to make this work. I can write the code to integrate what I need as long as I have the right code from vBulletin.
Check this area of register.php out.

PHP Code:
// ############################### start add member ###############################
if ($_POST['do'] == 'addmember')

Reply With Quote
  #9  
Old 11-30-2004, 08:01 PM
Radon3k's Avatar
Radon3k Radon3k is offline
 
Join Date: Nov 2001
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Brad.loo
Check this area of register.php out.

PHP Code:
// ############################### start add member ###############################
if ($_POST['do'] == 'addmember')

Thanks Brad. Do I need to include any file so that this works properly (aside from the file that holds the functions for the salt passwords)? I'm beginning to think it would be easier just to do the entire registration thing through vBulletin but I'll keep at it.
Reply With Quote
  #10  
Old 11-30-2004, 08:07 PM
rake's Avatar
rake rake is offline
 
Join Date: Nov 2002
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah. doing it through vbulletin would be much easier. check for the query that inserts the info in the user table (look for something like $userid = $DB_site->insert_id(); ) and then switch databases and insert the stuff you need into your site database. don't forget to switch back to the vbulletin database after that.
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:53 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04353 seconds
  • Memory Usage 2,261KB
  • 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
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete