|
Cookbook /
ChoiceColorChangerSummary: Provide a way of setting persistent skin color and theme choices when using the Choice skin.
Version: 2011-06-12
Status: Active
Maintainer: tamouse
Categories: Skins
Discussion: ChoiceColorChanger-Talk?
Questions answered by this recipe
DescriptionChoiceColorChanger provides a means for a visitor to set different color and theme settings for the Choice, Colorimetry, and Skittlish skins. InstallationDownload choice-colorchanger.zipΔ and unzip in your cookbook directory. ConfigurationTo enable choice-colorchanger, add the following to your config.php file: $EnableAutoSkinColorList = 1;
include_once("If you have other skins that follow the same scheme as Choice, you can make a list of skins that will be acted on if they are set for the current skin: $ValidColorChangerSkins = array('choice','colorimetry','skittlish','mychoice','mycolorimetry','myskittlish');
will allow the additional use of localised versions of the given skins. In addition, if you want to limit or map the available color schemes and themes, there are two hashes you can set: To only allow a specific set of colors and themes, create an array called $PageColorList and $PageStyleList that maps names from ?color= or ?skintheme= into the corresponding skin to be used for that name. For example: $PageColorList = array( # Only allow muted colors
'blue_bold' => 'blue_muted',
'green_bold' => 'green_muted',
'orange_bold' => 'orange_muted',
);
$PageStyleList = array(
'light' => 'light',
'dark' => 'light', # Only allow light theme
);
UsageTo use the recipe, once installed, add various query parameters to set color and theme:
ExamplesThe following query string will set the color sheme to blue_muted and the theme to dark for the current view: ?color=blue_muted&skintheme=dark The following query string will set the color scheme to green_bold and the theme to light for all pages for this visitor: ?setcolor=green_bold&setskintheme=light NotesFuture plans include developing some markup to insert a color scheme chooser so it can be easily embedded in a page somewhere. It is possible to specify both the per-page and persistent options on the query string. Both will work, but the per-page set will take precedence (for that view only, then the persistent ones take over). Change log / Release notes
See alsoChoice, Colorimetry, Skittlish ContributorsCommentsSee discussion at ChoiceColorChanger-Talk? User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |