NP_SkinChooser.php

Allows site visitors to choose the skin they use to view your site. Supplies a simple dropdown field that can be added to each skin. User can then select the skin. The site admininistrator can select which skins to allow. Feed skins are never allowed.

There is a plugin by the Japanese community that does a similar thing in a different way. It is called NP_SkinSwitcher.

General Plugin info
Author: Frank Truscott
Current Version: 1.02
Download: NP_SkinChooser zip 6kB
Code: N/A
Demo: Demo
Forum Thread: Here

Upgrading

If upgrading from the 0.1b (beta) release to a regular 1.x release, you will need to uninstall the 0.1b version, then install the new version. Visitors will need to re-select their preferred skin as the cookies are now handled differently.

To upgrade from 1.0 to 1.0x, simply replace the old files with the new ones.

Installing

  1. Unzip the file and upload the contents to your plugin directory
  2. Install the plugin…
  3. Click admin link for this plugin and select the skins to be made available, as indicated below.
  4. Add <%SkinChooser%> to your skins (all skins selected to be available). The sidebar is a good place. You may want to add some header or explanation to the skin as well.

How to use the plugin

Just select the skins that should be made available to your users using the form on the admin page for NP_SkinChooser. Then add the <%SkinChooser%> skin variable to your available skins (sidebar, header, etc…) as appropriate.

The user will be presented with the blog's default skin when he first visits the site, as normal. If he selects a different skin, he will see the blog using that skin. His preference is stored in a cookie, so the next time he visits from that browser, he will see his preferred skin.

New to version 1.0:

The list of available skins is now set per blog, as well as a couple new options. The site administrator(s) can manage a blog called 'All' which acts as a site-wide limit to available skins and options. The site admins and the blog admins for a given blog can maintain the options and available skins for that blog.

The following rules apply:

  • Only skins selected by the site admin in the 'All' blog are available to be selected in the individual blogs.
  • A blog admin can select a subset of the available skins designated by the site admin, but cannot allow use of a skin not selected by site admin.
  • The skin chooser can be disabled site-wide by the site admin by setting the appropriate option on the 'All' blog page of the NP_SkinChooser admin page.
  • The skin chooser can be disabled for a specific blog by the blog admin by setting the appropriate option on the 'blogname' blog page of the NP_SkinChooser admin page.
  • A blog admin can choose to display his blog to new visitors (ones who have not selected a skin) using a skin randomly chosen from the available skins. each page load will choose a new skin. Use with care, as this can be disconcerting to a visitor if your skins are very different.
  • A blog admin can give the visitors the option of using a random skin, as well.

Available SkinVars and/or TemplateVars

  • <%SkinChooser%> - Adds the selector form to the skin. Any header or title for the form must be added directly into the skin.

Options

  • Delete tables on uninstall? - Whether to delete the table of selected skins when the plugin is uninstalled. (No).
  • Show Admin Area in quick menu? - Whether to show a link to the SkinChooser admin page in the left navigation bar of the NucleusCMS admin page. (Yes).

Tips and Tricks

  • If you select a skin that does not have the <%SkinChooser%> skin variable in it, when a user chooses that skin, he will not be able to choose a different skin until one of two things happen–either the site admin adds the <%SkinChooser%> skin variable to the skin he chose, or the user clears the cookie on his browser.

Wishlist

If there is interest in this plugin, I would consider adding any of the following (I also welcome contributions, ideas and/or code, from anyone. Please contribute on the forum thread.):

  • Per blog skin selection. Done in v 1.0
  • ???

Bugs

  • skinchooser was replacing the rss feed skin with the skin chosen by the user. Fixed in 1.01.

History

  • 1.02 - 3rd release, 28 Aug 2008
    • fix XHTML compliance issue
  • 1.01 - 2nd release, 09 July 2007
    • fix bug with not showing feeds using feed skins
  • 1.0 - First official release, 11 June 2007
    • Adds per blog skin selection
    • Adds ability to serve a random skin.
  • 0.1b - initial, quasi-beta release, 10 April 2007
    • initial release
skinchooser.txt · Last modified: 2008/09/26 21:49 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki