Create Terms and Conditions Page

From WiDirect
Jump to: navigation, search

This page describes how to create a Terms and Conditions page on a WiDirect.

Configure Preferences

A number of preferences are required to be set for users to have accounts created automatically. These preferences need to be set for any profile where the users will create accounts automatically, or for the default profile to apply the settings for all users.



Configure Access Plans

Create one access plan that has unlimited time set for both the days and minutes. The plan should not expire, or the user will be asked to reactivate it. There should only be one plan available for the profile as well. If there is more than one plan available then the user will be asked to pick one.

Configure Branding

If a profile hasn't already been created on the WiDirect, create one now. The default profile used by the WiDirect is AllCity-Wireless-default. If you have changed the profile name in the firewall configuration then use that profile name instead.

Then on the Profile Branding page click on the profile name. Modify the Login Template to use the desired HTML for the terms and conditions page. Use the %%LOGIN_FORM%% variable where you would like the proceed button to go. You may also want to include the %%ERROR_MESSAGES%% variable that is used in case the user is assigned to a plan that expires.


Turn on Automatic Account Creation

Using Putty or other SSH client, SSH to the WiDirect and run this command:

sudo emacs /root/AWICP/etc/config.php

Look for this line:

$MacAuthenticationAutoAdd = 0; //Set to 1 to Automatically Register and Activate accounts when using MAC based authentication

Change the 0 to a 1 and exit the emacs editor by pressing Control-X followed by Control-C. Press y when asked to save.

If you only want to allow automatic account creation on certain profiles, then you can list the profiles on the next line. If you want to allow automatic account creation on all profiles then you only need to change the one line described above.



After making all the above changes connect on a computer behind the WiDirect. You will be brought to the terms and conditions page with a button to click to login.

If you preview from the Profile Branding page then you will see a different page then if you were behind the WiDirect. That is because the MAC address of the user isn't passed to the preview page. If you want to see what the user sees then add "&mac=614056425c5340" to the URL given by using the preview option.


Optional: Remove Extra Login Text

If you want to remove the "Please click Proceed to continue." text then run this command from an SSH session:

sudo emacs /root/AWICP/www/portal/login/index.php

Approximately line 169 (version 2.4) looks like this:

      $text .= '<br>Please click Proceed to continue.';

Comment that line out with two slashes:

//      $text .= '<br>Please click Proceed to continue.';

Save and exit the file. If you are running a different version you can press Control-S to search for the text "please click" to find the appropriate line to comment out.