You are here

README.txt in Style Switcher 6.2

Same filename and directory in other branches
  1. 8.2 README.txt
  2. 7.2 README.txt
  3. 3.0.x README.txt
--------------------------------------------------------------------------------
                                Style Switcher 2
--------------------------------------------------------------------------------

Provides a stylesheet switching functionality.

--------------------------------------------------------------------------------
INTRODUCTION
--------------------------------------------------------------------------------

This module takes the fuss out of creating themes or building sites with
alternate stylesheets. Themer can provide a theme with alternate stylesheets.
Site builder can add alternate stylesheets found in the internet right in the
admin section. And this module presents all those styles to site users as
a block with a list of links. So any site user is able to choose the style of
the site he/she prefers.

There are many commonly known JavaScript techniques to switch CSS stylesheets
"live", without reloading the page. Some examples of them and relevant
JavaScript files can be found here:
  http://www.alistapart.com/articles/alternate
  http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/
  http://www.immortalwolf.com/code-repository/javascript-components/

This module uses a slightly different and more powerful mechanism. But
usability is the same: click on a style label » get the new look of the site.

Works in all major browsers (including Internet Explorer).

For more information about the module, visit the Drupal.org Documentation page:
 * https://www.drupal.org/node/2544814
To submit bug reports and feature suggestions, or to track changes:
 * https://www.drupal.org/project/issues/styleswitcher

--------------------------------------------------------------------------------
INSTALLATION/UPDATE
--------------------------------------------------------------------------------

Install as you would normally install a contributed Drupal module. See
https://www.drupal.org/documentation/install/modules-themes/modules-7 for
further information.

If you're updating from a previous version don't forget to run update.php. See
https://www.drupal.org/node/1782798 for further information.

--------------------------------------------------------------------------------
CONFIGURATION
--------------------------------------------------------------------------------

There are 2 ways to configure the list of styles for switching. And they can be
combined.

 * One way is for site admins:

   1. Create stylesheet(s) in site's public directory, for example: in
      sites/default/files, or anywhere in the internet. Just remember that these
      locations along with the CSS files must be publicly accessible.

   2. Go to Administer » Site configuration » Styleswitcher.
      There you'll find a module's configuration form and a tab where you can
      add stylesheets for switching. Add all your styles providing their labels,
      machine names and paths.

 * Another way is mostly for themers. For site builders it is appropriate only
   if you use a custom theme that you are able to edit:

   1. In your theme's directory or subdirectory create stylesheet(s) for each
      different style.

      Note that each stylesheet when switched is being added to the existing set
      of other site's stylesheets.

   2. In your theme's .info file add a section like the following, replacing
      labels and paths with yours:

        ; Switching stylesheets
        styleswitcher[css][Light Blue] = css/blue.css
        styleswitcher[css][All Black] = css/black.css
        styleswitcher[default] = All Black

      where "All Black" is the label of the style, and css/black.css is the
      location of the stylesheet file, relative to theme's root. A line with
      Default is optional - it is for new site visitors. If it is not set then
      no of alternatives will be visible until user explicitly chooses one.

      NOTE: Do not specify in this section any of other existing CSS loaded by
      Drupal core, modules or your theme. They are being loaded unconditionally.
      If you want to set some of your theme's stylesheets for switching then
      move them from "stylesheets" section of .info file to the "styleswitcher"
      section.

The next steps are for both of previous ways:

 3. In the Styleswitcher admin section you can see tabs for each of site's
    enabled theme. There you can reorganize how style links will be displayed
    to users: you can reorder them, enable/disable some of them and choose
    another default style for each theme. This means that each of your site's
    theme can have its own set of styles for switching.

    Note that styles added in admin form will be available for all themes, but
    those provided in theme's .info will only be available for that theme and no
    other.

 4. Finally, go to Administer » Site building » Blocks, find "Style Switcher"
    block, place it wherever you want and press "Save". You can also configure
    the block however you like.

    Note that this block is the only way to provide a style switching for users.
    So if you need this functionality in multiple themes then you should
    configure the block to be displayed in appropriate themes.

That's it. The block will present links for each of your styles to you and your
users.

--------------------------------------------------------------------------------
AUTHORS & MAINTAINERS
--------------------------------------------------------------------------------

 * Mike Shiyan [https://www.drupal.org/u/pingwin4eg]
 * Alan Burke [https://www.drupal.org/u/alanburke]
 * Roger López [https://www.drupal.org/u/zroger]
 * Kristjan Jansen [https://www.drupal.org/u/kika]

File

README.txt
View source
  1. --------------------------------------------------------------------------------
  2. Style Switcher 2
  3. --------------------------------------------------------------------------------
  4. Provides a stylesheet switching functionality.
  5. --------------------------------------------------------------------------------
  6. INTRODUCTION
  7. --------------------------------------------------------------------------------
  8. This module takes the fuss out of creating themes or building sites with
  9. alternate stylesheets. Themer can provide a theme with alternate stylesheets.
  10. Site builder can add alternate stylesheets found in the internet right in the
  11. admin section. And this module presents all those styles to site users as
  12. a block with a list of links. So any site user is able to choose the style of
  13. the site he/she prefers.
  14. There are many commonly known JavaScript techniques to switch CSS stylesheets
  15. "live", without reloading the page. Some examples of them and relevant
  16. JavaScript files can be found here:
  17. http://www.alistapart.com/articles/alternate
  18. http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/
  19. http://www.immortalwolf.com/code-repository/javascript-components/
  20. This module uses a slightly different and more powerful mechanism. But
  21. usability is the same: click on a style label » get the new look of the site.
  22. Works in all major browsers (including Internet Explorer).
  23. For more information about the module, visit the Drupal.org Documentation page:
  24. * https://www.drupal.org/node/2544814
  25. To submit bug reports and feature suggestions, or to track changes:
  26. * https://www.drupal.org/project/issues/styleswitcher
  27. --------------------------------------------------------------------------------
  28. INSTALLATION/UPDATE
  29. --------------------------------------------------------------------------------
  30. Install as you would normally install a contributed Drupal module. See
  31. https://www.drupal.org/documentation/install/modules-themes/modules-7 for
  32. further information.
  33. If you're updating from a previous version don't forget to run update.php. See
  34. https://www.drupal.org/node/1782798 for further information.
  35. --------------------------------------------------------------------------------
  36. CONFIGURATION
  37. --------------------------------------------------------------------------------
  38. There are 2 ways to configure the list of styles for switching. And they can be
  39. combined.
  40. * One way is for site admins:
  41. 1. Create stylesheet(s) in site's public directory, for example: in
  42. sites/default/files, or anywhere in the internet. Just remember that these
  43. locations along with the CSS files must be publicly accessible.
  44. 2. Go to Administer » Site configuration » Styleswitcher.
  45. There you'll find a module's configuration form and a tab where you can
  46. add stylesheets for switching. Add all your styles providing their labels,
  47. machine names and paths.
  48. * Another way is mostly for themers. For site builders it is appropriate only
  49. if you use a custom theme that you are able to edit:
  50. 1. In your theme's directory or subdirectory create stylesheet(s) for each
  51. different style.
  52. Note that each stylesheet when switched is being added to the existing set
  53. of other site's stylesheets.
  54. 2. In your theme's .info file add a section like the following, replacing
  55. labels and paths with yours:
  56. ; Switching stylesheets
  57. styleswitcher[css][Light Blue] = css/blue.css
  58. styleswitcher[css][All Black] = css/black.css
  59. styleswitcher[default] = All Black
  60. where "All Black" is the label of the style, and css/black.css is the
  61. location of the stylesheet file, relative to theme's root. A line with
  62. Default is optional - it is for new site visitors. If it is not set then
  63. no of alternatives will be visible until user explicitly chooses one.
  64. NOTE: Do not specify in this section any of other existing CSS loaded by
  65. Drupal core, modules or your theme. They are being loaded unconditionally.
  66. If you want to set some of your theme's stylesheets for switching then
  67. move them from "stylesheets" section of .info file to the "styleswitcher"
  68. section.
  69. The next steps are for both of previous ways:
  70. 3. In the Styleswitcher admin section you can see tabs for each of site's
  71. enabled theme. There you can reorganize how style links will be displayed
  72. to users: you can reorder them, enable/disable some of them and choose
  73. another default style for each theme. This means that each of your site's
  74. theme can have its own set of styles for switching.
  75. Note that styles added in admin form will be available for all themes, but
  76. those provided in theme's .info will only be available for that theme and no
  77. other.
  78. 4. Finally, go to Administer » Site building » Blocks, find "Style Switcher"
  79. block, place it wherever you want and press "Save". You can also configure
  80. the block however you like.
  81. Note that this block is the only way to provide a style switching for users.
  82. So if you need this functionality in multiple themes then you should
  83. configure the block to be displayed in appropriate themes.
  84. That's it. The block will present links for each of your styles to you and your
  85. users.
  86. --------------------------------------------------------------------------------
  87. AUTHORS & MAINTAINERS
  88. --------------------------------------------------------------------------------
  89. * Mike Shiyan [https://www.drupal.org/u/pingwin4eg]
  90. * Alan Burke [https://www.drupal.org/u/alanburke]
  91. * Roger López [https://www.drupal.org/u/zroger]
  92. * Kristjan Jansen [https://www.drupal.org/u/kika]