Setting Global Parameters

(0 votes, average 0 out of 5)

Chameleon has four Global Options.

You can find the options on both the Chameleon Configuration page, and the Rule Chain Manager page:

chameleon-options-button

There are 4 settings in the Parameters: Debugging, IP Override, Time Zone, and User Profile template.

chameleon-options-panel

1. Debugging

Note: introduced in MetaTemplate Pro 1.8, 13 Dec 2010

When this parameter is enabled, Chameleon will output a great deal of information on the front end of the site. The information is displayed in the “message” area of the template. i.e. your template should contain the following code in order to display this information (most templates should already have this):

<jdoc:include type="message" />

If a Chameleon Rule causes a page redirect to take place, then the output messages “stack”, and after the final redirect has been done, the message area will display all the debugging information for the redirected pages as well.

Chameleon will output information about each part of a rule that was attempted, including whether or not it succeeded or failed. Information is given about the actions that are performed, including which template has been activated (if any).

Example output:

CHAMELEON DEBUG ON
Current date and time: "2010-12-13 22:25:52" in timezone "Pacific/Auckland"
Processing rule id 4 ("article 21")
- Start date/time (12:00) has been reached - succeeding
- Language: "en" is in the include list - succeeding
- Domain name: "localhost" is in the include list - succeeding
- Page types: current page (frontpage) is not on list of page types to include - failing
Started FAIL action for rule id 4
Finished FAIL action: default template not changed
Processing rule id 5 ("VM test")
- Start date/time (00:00) has been reached - succeeding
- End date/time (21:59) has not yet been reached - succeeding
- Language: "en" is in the include list - succeeding
- Domain name: "localhost" is in the include list - succeeding
- URL: "http://localhost/testsite/" startswith "http" ? - succeeding
- Browser "safari" in allowed list
- PHP: rule returned true - succeeding
Started SUCCEED action for rule id 5
Finished SUCCEED action: default template was set to "beez"
Processing rule id 6 ("blackberry beez")
- Browser not in allowed list
Started FAIL action for rule id 6
Finished FAIL action: default template not changed
Processing rule id 7 ("Menu check")
- Menu handling: currently in menu name: mainmenu, Menu id 1
- Menu items: current menu item is not in list of menu items to include - failing
Started FAIL action for rule id 7
Finished FAIL action: default template not changed
Finished all rules
Final template set to "beez"

2. IP Override

If you enter an IP address here, the GeoIP functions will use this address instead of the IP address of the client, when calculating the country/city of the client. This is useful for testing what your site will look like from different countries, as long as you can find example IP addresses from those countries (hint: google for "IP addresses from Australia", for example.)

3. Time Zone

The “Start date/time” and “End date/time” parameters in Chameleon rules, and also the $core_genius->inTimeSpan("...") methods rely on using the correct time zone in order to operate correctly. By default, these methods use the default Joomla time zone setting. This however does not take into account Daylight Saving (Summer) time. Therefore by changing this Time Zone setting, you can choose a time zone which will take into account Daylight Saving (Summer) time in your locale.

Note: If you are also using MetaMod, then MetaMod will inherit this setting too.

4. User Profile template

Chameleon is able to add a new element to a user's "Profile" in Joomla, for assigning a template for that user. If you want to use this function you must do 3 things:

a - enable it here
b - publish the "User - Template" plugin in the Joomla Plugin manager.
c - configure the "User - Template" plugin to specify the templates that you want to allow people to use:

chameleon-user-template-plugin

Display templates: choose which templates will be shown to the user in their user profile

Show groupsNo: just show a flat list of templates; Yes: show the styles grouped by parent template, as in the list above

User profile fields for registration and administrator user forms: required/optional/disabled This controls whether the user or administrator are allowed to change the template style on the user registration page and the administrator's back-end form for editing a user. If "required", they will have to make a selection in order to complete registration. If optional, it's optional. If disabled, they will be unable to change it.

User profile fields for profile edit form: required/optional/disabled This controls whether the user is able to change the template on their profile edit page, and whether it's required or optional.

Last Updated on Tuesday, 30 September 2014 09:46