=== K2 Style Switcher === Contributors: thecuriousfrog, kimyahasira Donate link: http://thecuriousfrog.com/projects Tags: k2, style, theme, switcher, WPMU, MU Requires at least: 1.5 Tested up to: 2.3.3 Stable tag: 1.0.0 This plugin allows site visitors to change the active style when the excellent K2 theme is selected. == Description == One of the best things about using WordPress is the ability to skin your site at will by choosing a new theme. There are theme switcher plugins available which allow your website visitors to skin your site with their choice of themes, selected from the stylesheets currently in your `/themes/` directory. I only have three themes in my `/themes/` directory: Classic, Default, and K2. When I skin my site, I do it with a style, an alternate stylesheet for K2. So all the nifty theme switcher programs don’t work for me. This plugin is the K2 equivalent of a theme switcher. It allows your visitors to re-skin your site from a list of K2 styles that you select. == Installation == **K2 must be installed and selected as the current theme. Please do not attempt installation if this is not the case.** To install the K2 Style Switcher, follow these steps: 1. Upload `style-switcher.php` to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress 1. To display the style switcher, place the following code in a Text, HTML and PHP module in your sidebar: `` == Frequently Asked Questions == = Help! = You can ask questions, leave comments or find more information at the plugin's homepage: [K2 Style Switcher](http://thecuriousfrog.com/projects/k2-style-switcher/ "K2 Style Switcher") == Screenshots == 1. The K2 Style Switcher options panel == Usage == This plugin will place either a dropdown menu (strictly HTML) or an unordered list (uses some Javascript) of the styles you select into your sidebar. You select the type of display (menu or list) and the styles to display from the K2 Style Switcher administration panel, found in the Presentation menu. This plugin also takes over the default K2 Scheme option. You will need to use the K2 Style Switcher options panel to set your default style and footer display. == Configuration == The first time you visit your new administration panel (Presentation -> K2 Style Switcher), all options will be blank. *Display Style* The first option controls the way the sidebar module displays the styles list. * Unordered List - Displays a list of links. Requires javascript to work. * Dropdown Menu - Displays a form for your visitors to use. This option is strictly HTML. Javascript is only added to your page if the unordered list option is selected. *Available Styles* The second option displays all the styles currently available in your `/k2/styles/` directory. Select the styles you want website visitors to be able to use. The ‘K2 Scheme’ (from the ‘K2 Options’ tab) had to be disabled (set to ‘No Scheme’) for the plugin to work as intended. That means no default style and no footer, so the next two K2 Style Switcher options replace ‘K2 Scheme’. *Default Styles* The third option sets the style that visitors will see upon first landing on your page. Once they select a style, they will see that style instead. *Footer Text* The fourth option replaces the style info display in your footer. The footer display is by far the most complicated area of the plugin to configure. Because I was tired of editing my footer file directly, this is intended to replace the entire footer. You can put whatever you like at the bottom of your pages using this option. The only limitation is that you cannot run PHP code directly. The tags from the ‘K2 Options’ page are all available. They will display the stylesheet information for the currently displayed style. The following tags are available: * `%style%` for style name * `%stylelink%` for the style’s homepage * `%author%` for author * `%site%` for author’s site * `%version%` for version * `%comments%` for style comments * `%stylefolderpath%` The folder URI of the current style (can be used for images, e.g. ``) * `%bloginfoname%` Name of the blog (normally display in your header) * `%bloginfoversion%` WordPress version * `%k2infoversion%` K2 version * `%podpressversion%` podPress version, if installed be sure to disable the podPress footer in podPress/General Settings * `%templatepath%` The web path to K2, useful if you want to use one of the stock K2 images in your footer * `%rssentries%` Outputs the URI for a ‘RSS Entries’ link * `%rsscomments%` Outputs the URI for a ‘RSS Comments’ link The block of text below is an example of a complete footer: `%bloginfoname% is powered by WordPress %bloginfoversion% and K2 %k2infoversion%.

Current style is %style% %version% by %author%. %comments%

RSS Entries | RSS Comments

` You’ll note the use of line breaks, instead of paragraph tags. K2 Style Switcher automatically outputs an opening and closing paragraph tag. == Style == You’ll need to add a few lines of css to each stylesheet to be displayed. First, you need to make sure the default footer doesn’t display: `#footer { display: none; }` Then, you need to make sure that your new footer displays as intended: `#k2ss_footer { text-align: center; }` `#k2ss_footer a { color: blue; }` `#k2ss_footer a:hover { color: silver; }` You’ll want to change this to your own style preferences. It’s probably easiest to rename `#footer` to `#k2ss_footer`, thus preserving the existing css. If your footer isn’t displaying the way the old one did, you probably need to add the `#footer` css from /k2/style.css to your `#k2ss_footer css`. If you opt to use the unordered list to display your sidebar, the class `.k2ss_selected` can be styled to highlight the currently selected style in the list: `.k2ss_selected { border-left: 1px dashed #666; }`