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-19-2004, 08:01 PM
tjnugent tjnugent is offline
 
Join Date: Jul 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default External user reg when reg is turned off

Hi all. I'm working on my first real modification to vB, and came across a question I can't figure out.

My site is using the vB user list / logged in list to control access to all parts of our site, including those outside vB (thanks to the hints in other threads here at vBulletin.org for how to do that part!). We want to combine our user registration system with vB's system. Members will pay money by check (or at least checks are one major option), so we can't use the vB subscription functionality, so we won't bother expanding the vB registration fields. The entire process will have people fill out a registration form (which includes many fields that are not part of the vB registration system), then when we receive payment, we'll activate their account. Activation will entail putting their extended info into our own user database, and then putting the relevant subset of data into the vB user database.

I could (probably) write the SQL statement to insert the data into the vB user tables directly. But it would be nicer and easier if I could just submit the data to the register.php directly via my own PHP code (I'd have PHP submit the data as _POST elements). The problem, though, is that I want to require people to use our registration form instead of vB's form, since ours has many more fields. To enforce this, I've turned off "allow registration" in the adminCP. And of course register.php checks to see if "allow registration" is on or off, which means that anything I submit to register.php shouldn't work (at least, that's what I expect, looking at the code).

So, is there some way programmatically (i.e., without my having to personally go into the adminCP) to allow registration on a case-by-case basis for submissions via my own PHP pages submitting to register.php, either by adding something to the _POST elements, or by sending some "allow registration" page, then the _POST data page, then a "close registration" page?

Thanks in advance.
Reply With Quote
  #2  
Old 08-26-2004, 12:24 AM
tjnugent tjnugent is offline
 
Join Date: Jul 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I never got any replies, so I tried working around the limitations. Here's what I did to allow an external registration form to register users in vBulletin, in case anyone can use it.

I turned 'allow registration' back on, and then edited the navbar template so that it doesn't show the "register" link. Given that our forum URL isn't advertised outside the site, and you need to register in order to "see" them, I'm not too worried about people trying to register directly via the forums.

Then it was a relatively simple matter of making a form containing the user data (which will eventually be pulled from our custom registration page) which submits to the vB register.php page. It's important to include the "agree" variable, otherwise it will assume that you haven't yet agreed to the terms of the site.
HTML Code:
<form action="forums/register.php" method="post">

<input type="hidden" name="do" value="addmember">
<input type="hidden" name="agree" value="1">
Also, you need to include two copies of the email and password:
HTML Code:
<input type="text" name="email" value="email@wherever.com" readonly> <BR>
<input type="text" name="emailconfirm" value="email@wherever.com" readonly> <BR>

<input type="text" name="password" value="abcd1234" readonly> <BR>
<input type="text" name="passwordconfirm" value="abcd1234" readonly> <BR>
And of course, you can set other options, such as whether or not to receive admin emails and what the time zone offset is:
HTML Code:
<input type="hidden" name="options[adminemail]" value="1">
<input type="hidden" name="dst" value="2">
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 02:25 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.03282 seconds
  • Memory Usage 2,178KB
  • 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_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)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