Setting Global Parameters

(0 votes, average 0 out of 5)

Chameleon has four Global Parameters.

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

parameters

There are 4 settings in the Parameters: Debugging, Time Zone, Suffix for Duplicated Templates, and Front Page POST fix.

all-parameters2

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. 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.

3. Suffix for duplicated templates

When you use the Template Duplication function when editing a Chameleon rule, each new copy of a template gets a suffix added to it. You can change the suffix here (remember to do this before you duplicate a template).

4. Front page POST fix

There are some components, most notably VirtueMart, which do not include the Itemid and component name when making POST requests (e.g. in the VM checkout). This confuses Joomla because it can’t work out which Itemid should be used — and this causes modules and templates assigned to the Front Page of the site to get assigned to any VM page that does a POST (e.g. VM checkout).

This option implements a fix for this situation. You can turn it off if it causes any unwanted side-effects.

5. After altering any of the parameters, click on “Save” to save the new settings.

Last Updated on Tuesday, 09 August 2011 00:35