vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Add more than one field in registration phase...help me please (https://vborg.vbsupport.ru/showthread.php?t=137030)

Nik_s3 01-20-2007 01:25 PM

Add more than one field in registration phase...help me please
 
1 Attachment(s)
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>
Better: I don't know how to create another variable to insert in this code (that rapresents: I don't accept).

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.

Nik_s3 01-20-2007 01:30 PM

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

Nik_s3 01-21-2007 09:54 AM

1 Attachment(s)
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.

Nik_s3 01-22-2007 09:09 PM

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

Nik_s3 01-24-2007 12:34 PM

No one wants to help me? :(


All times are GMT. The time now is 11:49 AM.

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.01093 seconds
  • Memory Usage 1,724KB
  • 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
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete