vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   where in register.php can I add some custom db inputs.... (https://vborg.vbsupport.ru/showthread.php?t=172638)

Scuzzy 03-21-2008 07:06 PM

Quote:

Originally Posted by Opserty (Post 1470639)
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.

I found a way very similar to what your describing, but without editing a template. In order to add a custom set of fields to the actual registration form I did the following:
  1. Created a hook on register_activateform that appended my custom template form fields to $profile_variable
  2. Created another hook on register_addmember_process to pull and verify my form specific information.

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

ilrglen 08-14-2009 07:17 PM

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?

ravistb 08-18-2009 07:34 PM

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.

Lynne 08-18-2009 07:43 PM

$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).

ravistb 08-18-2009 07:53 PM

Thank thank you! That was perfect!

Lynne 08-18-2009 08:02 PM

Which worked (in case someone else comes across this thread with the same question)?

ravistb 08-18-2009 10:19 PM

$vbulletin->userinfo[field2] was the correct one

ilrglen 08-31-2009 08:29 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 1470544)
AdminCP -> User Profile Fields.

Is there a way to make the Location field a pulldown menu list that the user would be required to choose from? It would be nice to be able to get some consistent responses for this so that possible it could be used to sort users or make users from certain countries have access to certain forums. Any ideas?

Lynne 08-31-2009 08:57 PM

Take a look in the manual under User Profile Fields and you will see how to make a dropdown menu for it.

ilrglen 08-31-2009 09:21 PM

Quote:

Originally Posted by Lynne (Post 1877391)
Take a look in the manual under User Profile Fields and you will see how to make a dropdown menu for it.

Not sure how I missed that. Must have had a couple of pages stuck together. Thanks.

--------------- 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:

Originally Posted by ilrglen (Post 1877407)
Not sure how I missed that. Must have had a couple of pages stuck together. Thanks.



All times are GMT. The time now is 02:59 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.01236 seconds
  • Memory Usage 1,738KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete