Disable Registration Agreement
#21
(2011-11-15, 06:15 PM)ViniH Wrote: Hello,

I realise that this is a fairly old thread, however when people are searching to disable the registration agreement I assume they will read this, and so I thought I would offer you the solution I chose, which is simply to add an on/off option within the "User Registration and Profile Options" settings.

Step 1: Create a new setting.
  1. On the admin control panel click the Configuration tab, then click on Settings in the left navigation menu.
  2. Click the Add New Setting tab.
  3. Fill in the form as follows:
    • Title: Registration Agreement
    • Description: Turns the registration agreement on or off.
    • Group: User Registration and Profile Options
    • Display Order: 1
    • Identifier: reg_agreement
    • Type: On/Off Choice
    • Value: 1
  4. Click the Save Setting button at the bottom of the form.
Step 2: Modify relevant file.

Open member.php in a text-editor and change line 374 from this:

	if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post")

To this:

	if($mybb->settings['reg_agreement'] && ((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post"))

Save member.php (and if you edited a local copy you will need to upload the modified version to your web server).

Once you have followed the above steps, you can then turn the registration agreement on or off via the User Registration and Profile Options on the Settings page in the admin area.

This code is correct but with some updates, that line is not the correct line, for the updated method, head to page 762 and replace all code on the line with

if($mybb->settings['reg_agreement'] && ((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post"))
Reply
#22
Thank you for this useful post
Thrive To Make www.obeyafriday.com The Best On MYBB
Reply
#23
How do I change to add let's say a subscription upon registrations so members can choose if they want to stay free or Premium (Paid)?
Reply
#24
(2011-11-15, 06:15 PM)ViniH Wrote: Hello,

I realise that this is a fairly old thread, however when people are searching to disable the registration agreement I assume they will read this, and so I thought I would offer you the solution I chose, which is simply to add an on/off option within the "User Registration and Profile Options" settings.

Step 1: Create a new setting.
  1. On the admin control panel click the Configuration tab, then click on Settings in the left navigation menu.
  2. Click the Add New Setting tab.
  3. Fill in the form as follows:
    • Title: Registration Agreement
    • Description: Turns the registration agreement on or off.
    • Group: User Registration and Profile Options
    • Display Order: 1
    • Identifier: reg_agreement
    • Type: On/Off Choice
    • Value: 1
  4. Click the Save Setting button at the bottom of the form.
Step 2: Modify relevant file.

Open member.php in a text-editor and change line 374 from this:

	if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post")

To this:

	if($mybb->settings['reg_agreement'] && ((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post"))

Save member.php (and if you edited a local copy you will need to upload the modified version to your web server).

Once you have followed the above steps, you can then turn the registration agreement on or off via the User Registration and Profile Options on the Settings page in the admin area.

now the code has changed due to upgrade version of mybb

so the codes will be
find the codes in member.php this

if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) && $fromreg == 0 || $mybb->request_method != "post")


and change it to or replace it to this

if($mybb->settings['reg_agreement'] && 	((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) && $fromreg == 0 || $mybb->request_method != "post"))
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)