Remove Terms from Registration

@halilesen · 21 Apr 2024 · 1401 views
Post Reply
User avatar
halilesen
#1 ·
Posts: 57
Joined: 24 Mar 2024, 18:09
Full Name: Halil ESEN
Has liked: 12
Been liked: 9
When a user wants to register on your phpBB forum, they will be presented with a terms page and after accepting it, they will reach the registration form. This two-step process may slow down registration process or you may not like it. Here I going to show you how to remove terms of use from before registration.

Open /includes/ucp/ucp_register.php file in phpBB root and find this:

Code: Select all

$agreed			= $request->variable('agreed', false);
Replace it with this:

Code: Select all

$agreed			= $request->variable('agreed', true);
And find this:

Code: Select all

if ($agreed && !check_form_key('ucp_register'))
{
	$agreed = false;
}
Replace:

Code: Select all

if ($agreed && !check_form_key('ucp_register'))
{
	$agreed = true;
}
Save changes. Terms of use will no longer appear before registration.

But let's not stop there. Let's put a statement in the registration form that by registering, the user agrees to the terms of use and privacy policy. To do this open /template/ucp_register.html file of style you are using, and find:

Code: Select all

<!-- EVENT ucp_register_buttons_before -->
Add before line above.

Code: Select all

<div class="panel">
    <span>You agree to <a href="{{ U_TERMS_USE }}"><b>Terms of Service</b></a> and <a href="{{ U_PRIVACY }}"><b>Privacy Policy</b></a> by registering on this board.</span>
</div>
An save the changes. Thus, you have also informed the users legally and this is how we accomplished the task of removing terms from registration in phpBB.
nounou
#2 ·
Posts: 9
Joined: 29 Aug 2024, 06:48
Full Name: nou nou
Has liked: 1
Been liked: 4

Re: Remove Terms from Registration

Is it possible to do this with an extension? The downside of custom coding is that every time phpBB updates you have to edit the files again (I guess unless you use the changed files update method which I've never used...?)

But regardless, I've done custom coding in the past but I forget what I custom code! I love the clarity of using extensions...
User avatar
halilesen
#3 ·
Posts: 57
Joined: 24 Mar 2024, 18:09
Full Name: Halil ESEN
Has liked: 12
Been liked: 9

Re: Remove Terms from Registration

I guess not. I have a short routine of editing core files after each update. :)
nounou
#4 ·
Posts: 9
Joined: 29 Aug 2024, 06:48
Full Name: nou nou
Has liked: 1
Been liked: 4

Re: Remove Terms from Registration

Do you ever use the "changed files" update method for phpBB?
User avatar
halilesen
#5 ·
Posts: 57
Joined: 24 Mar 2024, 18:09
Full Name: Halil ESEN
Has liked: 12
Been liked: 9

Re: Remove Terms from Registration

No. I always did the "Full Package" update as it took a minute or two to replace the core files I changed again. I guess I think this is better. However, the idea of ​​creating a custom extension that will retain all changes made is not unreasonable. :)
nounou
#6 ·
Posts: 9
Joined: 29 Aug 2024, 06:48
Full Name: nou nou
Has liked: 1
Been liked: 4

Re: Remove Terms from Registration

Oh! Interesting idea!

Ger made a custom code extension back in the day that allows you to inject custom code into phpBB events... not sure if that could do something like this?
Post Reply