![]() |
where in register.php can I add some custom db inputs....
In the register php file, at what point can I add my own mysql query.
Basically, at what point is the user fully registered, but before the page goes to the thank you page... I want to do some certain things with php. I hope anyone can understand this. And thanks for the help! |
Absolutely. Rather than modifying your documents, leave them be and create a hook via the AdminCP.
Goto... AdminCP -> (left menu) Products & Plugins -> Plugin Manager Click "Add New Plugin" and point your hook location to register_form_complete. You can begin your PHP modification there. :) |
I think you want addmember_complete or something like that.
register_form_complete is executed when the form is displayed, as opposed to when the data is processed. |
Thanks for the help... Now if want to use the newly registered persons, id number(example: member.php?u=23
whats the variable name, and is there a list of all variable names anywhere? Thanks for the help. |
If you use register_addmember_complete, I believe $userid is available for use at that point.
I don't know of a list of others available. You can look in the register.php page and see what is defined right before the hook you use. |
I've noticed there are no template hooks in the registry pages. Is it possible, without modifying the registry template itself, to add another required field to the user registration process? Any idea on how to accomplish this without modifying any generic vbulletin template?
Thanks |
AdminCP -> User Profile Fields.
|
Marco hit it right on. The easiest way to do it.
|
What I'd like to do is a little more difficult then that. The field needs to be a part of a plugin (so it would have to be installed when they install the plugin), it must be a drop down box, and it must contain information from a table other then one part of regular vbulletin. It's currently done by actually modifying the registry.php and changing the display of one user defined field, but I want to get out of direct modifications to vb code and templates and make this completely plugin driven.
|
You will have to edit a template then, if you want to include custom HTML into the Registration Form. PHP code can be placed in a nearby Plugin and then use that to call and evaluate a template. Then use the variable, that the template is evaluated to, in the registration template.
|
Quote:
If anyone thinks of any caveats to that I'd really like to hear them, but it appears to work very well, and I don't have to modify any regular VBulletin php files or templates. Scuzzy |
I would like to send new registrants to my payments.php page to purchase a membership before the registration process is completed. If there is no payment made then I would like the registrant deleted so that they cannot log in to any part of my site. I added a pluggin that redirects to payments.php after the registration page but discovered that the registration still goes through if they cancel the page or close the window. How can I get around this so that the registration process and payment process are one and the same?
|
I've added some custom user profile fields, but I would like to insert them into a separate DB table for use in my non vb site. I've got the plugin on the register_addmember_complete hook, but am not sure how to refence what those fields were. From what I can see they are just called $userfield[field2], $userfield[field5], $userfield[field6]. What do I need to do in order to get these values into some sort of variable that I can insert into my table? I've tried setting a variable like $customfield1 = $vbulletin->userfield[field2]; but all the inserts into my table are just blank empty inserts.
Any help would be greatly appreciated. |
$vbulletin->userinfo[field2] is probably the correct variable, or it may be $vbulletin->GPC[field2] (or $vbulletin->GPC['field2'] depending on where you use it).
|
Thank thank you! That was perfect!
|
Which worked (in case someone else comes across this thread with the same question)?
|
$vbulletin->userinfo[field2] was the correct one
|
Quote:
|
Take a look in the manual under User Profile Fields and you will see how to make a dropdown menu for it.
|
Quote:
--------------- Added [DATE]1251760289[/DATE] at [TIME]1251760289[/TIME] --------------- B U T . . . I now noticed there is a limit of 31 options allowed to pulldown menus. Any way that can be overridden? Quote:
|
Quote:
|
I think that limit is hardcoded.
|
All times are GMT. The time now is 05:19 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|