The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add more than one field in registration phase...help me please
Hi. I'm trying to add more than one filedset in the registratione phase (like in the image that I've uploaded).
Every field will contain something different: 1th Forum Rules 2nd Privacy informative 3rd Sensible Data Treatment ecc... What I hope to do is that: every field must have two options (accept VS don't accept) (like in the image...) and the rigistration will continue only if all accept checkbox are checked. At this moment I've understood how replicate filedsets but I don't know ho to set up another checkbox. This is the code for the checkbox but I don't know how to change phrase read_agree_abide_by_rules... HTML Code:
<div><label for="cb_rules_agree"><input type="checkbox" name="agree" id="cb_rules_agree" value="1" /> <strong> <phrase 1="$vboptions[bbtitle]">$vbphrase[read_agree_abide_by_rules]</phrase></strong></label></div> Moreover I don't know how to join all the chosen of the (more than one) fieldsets: in this condition, in order to proceed to the registration, is sufficiet to check only one "I accept the rules". I want that a new user is able to proceed only if He checks all the "I accept" options. Sorry for my english and thank you. |
#2
|
|||
|
|||
Mmmm... I've forgotten one thing:
I've replicated the checkbox copying more than one time that code. I've set value="1" to value="0". In this case someone that checks this box couldn't proceed. This in the link: http://forum.audirsclub.it/register.php |
#3
|
|||
|
|||
I'va created one table with two fileds and their own choices:
Accept... Dont' accept The only problem now is this: obligate the users to check all the checkboxs. At this moment It's sufficient to check just one checkbox (with Accept option) and the user can continue the registration. |
#4
|
|||
|
|||
Ok... I try with a specific question:
I've understood that I've to edit the register.php file. In particular I've added a new variable agreeinfo . In order to obligate the users to select all the choiches for the two fieldsets. This is the code: // ############################### start register ############################### if ($_REQUEST['do'] == 'register') { $vbulletin->input->clean_array_gpc('r', array( 'agree' => TYPE_BOOL, //############## the new variable agreeinfo 'agreeinfo' => TYPE_BOOL, 'year' => TYPE_UINT, 'month' => TYPE_UINT, 'day' => TYPE_UINT, 'options' => TYPE_ARRAY_BOOL, 'who' => TYPE_NOHTML, )); // Variables that are used in templates $agree =& $vbulletin->GPC['agree']; $year =& $vbulletin->GPC['year']; $month =& $vbulletin->GPC['month']; $day =& $vbulletin->GPC['day']; $url = $vbulletin->url; // ############### I've added this in the line below AND !$vbulletin->GPC['agreeinfo'] if (!$vbulletin->GPC['agree'] AND !$vbulletin->GPC['agreeinfo'] ) { eval(standard_error(fetch_error('register_not_agre ed', $vbulletin->options['forumhome'], $vbulletin->session->vars['sessionurl_q']))); } This code has to work with the buttons: <input type="radio" name="agreeinfo" value="1" /><strong><phrase 1="$vboptions[bbtitle]">$vbphrase[read_agree_abide_by_rules]</phrase></strong> <input type="radio" name="agreeinfo" value="0" /><strong><phrase 1="$vboptions[bbtitle]">$vbphrase[read_dontagree_abide_by_rules]</phrase></strong> Even if I do this modification to the register.php nothing seems to change. I don't know .php code... It's correct the code? It's sufficient to edit the register.php file and to overwrite It... or I've to do something else? Thank you Up.... |
#5
|
|||
|
|||
No one wants to help me?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|