Themeswitcher_XH – a CMSimple_XH Plugin

Stylized Themes

Themeswitcher_XH facilitates to display widgets that allow your visitors to select one of the available themes (aka. templates). This is especially useful for demonstration purposes, but might also be appropriate for normal websites, in particular, if you're using a fancy template which might have accessibility or usability issues.

Please do read this documentation before you encounter any problems!

Important Notice

Themeswitcher_XH hasn't be tested so far in various environments. It is a so called beta version. Use with caution!

Requirements

Themeswitcher_XH is a plugin for CMSimple_XH. It requires CMSimple_XH ≥ 1.6 and PHP ≥ 5.1.2.

Installation

The installation is done as with many other CMSimple_XH plugins. See the CMSimple_XH wiki for further details.

  1. Backup the data on your server.
  2. Unzip the distribution on your computer.
  3. Upload the whole directory themeswitcher/ to your server into CMSimple_XH's plugins/ directory.
  4. Set write permissions to the subdirectories css/, config/ und languages/.

Settings

The plugin's configuration is done as with many other CMSimple_XH plugins in the website's back-end. Select Plugins → Themeswitcher.

You can change the default settings of Themeswitcher_XH under "Config". Hints for the options will be displayed when hovering over the help icon with your mouse.

Localization is done under "Language". You can translate the character strings to your own language if there is no appropriate language file available, or customize them according to your needs.

The look of Themeswitcher_XH can be customized under "Stylesheet".

Usage

You can manually embed theme switcher widgets either in the template:

<?php echo themeswitcher()?>

or on individual pages:

{{{themeswitcher();}}}

This enables your visitors to choose their preferred theme. This choice is stored in a cookie, so the selected theme stays available for the rest of the browser session. You can configure whether page specific templates (defined via page_params) override the user selection or not.

If you have many templates to choose from, and you want to make a theme switcher available on all pages, you can set the respective configuration option. Then the widget will be displayed on top of the contents area, i.e. above the page heading.

Limitations

The theme switcher widgets generate valid HTML5, but invalid HTML 4.01 and XHTML 1.0. The functionality of the page is not affected, though. If you want to get rid of validation errors, you should consider to change the doctype in your template to:

<!DOCTYPE html>

Since CMSimple_XH 1.6 page specific templates are enabled also for subpages (unless explicitly overridden). However, this is not catered to by Themeswitcher_XH.

License

Themeswitcher_XH is licensed under GPLv3.

© 2014-2015 Christoph M. Becker

Credits

Themeswitcher_XH is inspired by Templateshift by olape and xhomie.

The plugin logo is designed by newmooon. Many thanks for publishing this icon under GPL.

And last but not least many thanks to Peter Harteg, the "father" of CMSimple, and all developers of CMSimple_XH without whom this amazing CMS wouldn't exist.