Register page

kollegah
Topics: 11
Posts: 29
Rep: 10
ok i have added a agree box to the register page thaat uer have to check to register
The code for the agree box i have added to the codes in /templae/modules/register.php

<input type="checkbox" name="agree" id="agree" value="yeah"> Please check this box<br />

but how do i fix it in the register.inc.php file that if that box isnt checkt then it comes a error box whit a text like this "You didn`t checkt the agree box? ok i know my english is not so good :P im norwegian :P but i hope youuu understand what i mean :)
2014-02-12 10:54:12
kollegah
Topics: 11
Posts: 29
Rep: 10
and my friend cant connect to the game anymore cause it just keep loading page when he hit login :/ but works fine for me :) and my friend also get internal server error some thimes dont know what to do :S it worked for him later but not now :P
2014-02-12 18:23:28
Chris Day
Topics: 9
Posts: 71
Rep: 32
Have you got a url for me to check?

And to make the form not submit unless the box is checked you will have to edit modules/register.inc.php you would have to add a method to the $allowdMedods array like so:


public $allowedMethods = array(
'password'=>array('type'=>'post'),
'cpassword'=>array('type'=>'post'),
'username'=>array('type'=>'post'),
'email'=>array('type'=>'post'),
'agree'=>array('type'=>'post')
);


then add after $user = @new user();

if (empty($this->methodData->agree)) {
$this->html .= $this->page->buildElement('error', 'You have to agree to our T&C\'s before joining');
} else
2014-02-13 14:41:07
salmen
Topics: 0
Posts: 1
Rep: 0
Chris i tryed this but only get

Sorry something went very wrong!

The error has been logged and waiting for a developer to review this issue.
2014-04-17 20:46:53