More Configuration Settings

There are 20 plus possible configuration setting within AgeLock, which you can easily set using a text editor

minimum_age_in_years is the lowest age that a user should be and still be allow to enter. maximum_age_in_years is the oldest age that a user should be allowed to enter. At least one of these setting should be set to a number. If one of these variable is not required it should be set to null;

installed_folder variable holds the location where you have saved the agelock folder to, probably something like http://www.yoursite.com/agelock/‘;

title, subtitle and description all hold text that is displayed to the user as part of the theme/template.

simple_check, If you simply require that the user clicks either of two button to confirm they are the correct age to be grated access should be set to true. If this is not required this should be set to false.

dmy_order, The order that the day month and the year are displayed to the user can be set in any order by using a 3 character code. d is day, m is month (Jan), M is also month (January) and y is year.

dmy_heading, if date selectors are displayed to the user a heading/title will also be displayed if dmy_heading is set.

t_and_c, hold the text for the Terms and Conditions – this is optional.If t_and_c is set to null; none of the Terms and Conditions features will be displayed to the user.

t_and_c_heading is the heading  that is displayed above the Terms and Conditions

t_and_c_error holds the text for the error message if the T&C checkbox has not been checked.

success_page When the user has successfully passed the AgeLock test the user will be automatically redirected to the success_page. The success_page needs to be set with the full website address (including http://www.)

continue_browsing if the user has been redirect to the AgeLock system while attempting to view another page they will be automatically directed back to that page unless continue_browsing is set to false;

failure_page (NEW in Version 1.1) if the user fails the AgeLock test and failure_page is set to a URL (including http://www.) then the user will be redirected to that page.

starting_year_offset the dropbox / Selector for the users birth year has two settings. If starting_year_offset is set to 10 and the current year is 2013 the default year that the user will see on the date of birth selector will be 2003.

number_of_years_to_show if set to 100 will allow the user to select any year between this the current year and 100 years ago.

error_message If the user fails the AgeLock test they will be blocked from locked pages and will be shown the error message below.

allow_spiders_and_ips if set to true search engines, bots and spiders will be not need to pass the AgeLock system.

expire_session_in_hours If set to 3 the user will need to repass the AgeLock test after 3 hours of browsing the site. If set to null; once the AgeLock test has been passed the user will not need to repass the test until they close their browser and try and visit the site again. Although support for this feature is inconstant, many browsers ignore this meaning that a user may only see the AgeLock test once if expire_session_in_hours is set to null; and will not need to repass the test if the browser is closed.

theme There are many built in themes available; light, dark, amelia, cerulean, cosmo, cyborg, journal, flatly, readable, simplex, slate, spacelab, superhero, united, and custom. Custom is a very bare theme made for you to tweak and add your own styling.

charset (NEW in Version 1.2) The AgeLock age verification form can include text set by you. If you are using non-latin characters or wish to change Character Encoding set charset to something like UTF-8, UTF-16 or ISO-8859-1

joomla (NEW in Version 1.3) If AgeLock is being used on a Joomla powered website set as true if not leave as false.

joomla_install_directory (NEW in Version 1.3) If Joomla is not installed in the root folder the Joomla directory needs to be set here. For example if Joomla is installed at http://www.example.com/joomla/ then joomla_install_directory = “joomla”; if Joomla is installed at http://www.impossiblepanda.com/test/joomla/ then joomla_install_directory = “test/joomla”;

cookie_mode (NEW in Version 1.5 Replaces ‘’Standard Cookie Mode’) by default AgeLock uses session cookies and cookies to keep track of who has passed the AgeLock test. However sometimes this method will clash with some CMS systems. If this is the case set to 2 to uses only a standard cookie or 3 to uses only a session cookie

cookie_mode (NEW in Version 1.6) if your site uses a subdomain, HTTP & HTTPS, or inconstant prefixing of www. you may also need to also set a cookie domain. For example your site has a site at http://www.example.com and a store at http://store.example.com the cookie set by AgeLock will not work on both unless cookie_domain is set like this:

$agelock_settings[‘cookie_domain'] = ‘.example.com';

please note the . before the domain. This is a wildcard and means that cookies for:
http://www.example.com | http://example.com | https://www.example.com and http://subdomain.example.com the same cookie will work.

Was this article helpful to you? Yes No

How can we help?