| 1 |
/* $Id: README.txt,v 1.7 2008/11/02 13:32:46 sun Exp $ */
|
| 2 |
|
| 3 |
-- SUMMARY --
|
| 4 |
|
| 5 |
Switchtheme allows you to create a block to allow users to switch themes on the
|
| 6 |
fly. The module will present users with a list of all enabled themes and allow
|
| 7 |
them to choose between them. Anonymous users have their choices tracked in a
|
| 8 |
session variable. For logged in users, the user record is updated with their
|
| 9 |
choice so that their last selection will stay the same the next time they log in.
|
| 10 |
|
| 11 |
For a full description visit the project page:
|
| 12 |
http://drupal.org/project/switchtheme
|
| 13 |
Bug reports, feature suggestions and latest developments:
|
| 14 |
http://drupal.org/project/issues/switchtheme
|
| 15 |
|
| 16 |
|
| 17 |
-- REQUIREMENTS --
|
| 18 |
|
| 19 |
None.
|
| 20 |
|
| 21 |
|
| 22 |
-- INSTALLATION --
|
| 23 |
|
| 24 |
* Install as usual, see http://drupal.org/node/70151 for further information.
|
| 25 |
|
| 26 |
* Enable the module in Administer >> Modules.
|
| 27 |
|
| 28 |
|
| 29 |
-- CONFIGURATION --
|
| 30 |
|
| 31 |
* Configure user permissions in Administer >> User management >> Permissions
|
| 32 |
>> Switchtheme.
|
| 33 |
Enable the user roles are allowed to see the switchtheme block. You may only
|
| 34 |
want authenticated users to see it, for instance.
|
| 35 |
|
| 36 |
If the chosen theme should be stored permanently for registered users, please
|
| 37 |
note that you have to grant the "select different theme" permission in Drupal
|
| 38 |
core for (selected) user roles of authenticated users.
|
| 39 |
|
| 40 |
* Customize the settings in Administer >> Site configuration >> Switchtheme and
|
| 41 |
enable all themes that you want users to choose from.
|
| 42 |
|
| 43 |
The theme names may not be very meaningful to regular users, so the settings
|
| 44 |
page allows you to create custom titles to use for each theme. If no titles
|
| 45 |
are setup the original theme name is displayed instead.
|
| 46 |
|
| 47 |
* Go to Administer >> Site building >> Blocks and make sure that the "select
|
| 48 |
switchtheme" block is enabled, and also enabled in every enabled theme.
|
| 49 |
|
| 50 |
|
| 51 |
-- NOTES --
|
| 52 |
|
| 53 |
The module has been designed to defer to themes created by the Sections module
|
| 54 |
(http://drupal.org/project/sections). In other words, if you use the
|
| 55 |
sections module to create a special theme for the admin section, the
|
| 56 |
switchtheme module will use that theme rather than the individual theme chosen
|
| 57 |
by the user.
|
| 58 |
|
| 59 |
If you are setting up a lot of themes, you may find the Block Region module
|
| 60 |
(http://drupal.org/project/blockregion) to be a helpful way of setting up
|
| 61 |
blocks to work the same way across many themes. That will save you the time of
|
| 62 |
setting up every block in every theme.
|
| 63 |
|
| 64 |
|
| 65 |
-- USAGE --
|
| 66 |
|
| 67 |
You can use this module to present users with a small, medium, and large text
|
| 68 |
version of your site. To do that:
|
| 69 |
|
| 70 |
* Select the theme that you want to use for this purpose. Create a subfolder
|
| 71 |
below the theme folder for every subtheme that you want to create (i.e.
|
| 72 |
medium, large, and extra-large). The folder names will be used as the theme
|
| 73 |
names, so make sure they don't duplicate any existing themes. One way to do
|
| 74 |
that is to use the regular theme name as a prefix, then append something to
|
| 75 |
the name (i.e. bluemarine_large).
|
| 76 |
|
| 77 |
* Copy the style.css and any theme images from the main folder to each of these
|
| 78 |
sub-folders.
|
| 79 |
|
| 80 |
* Change style.css in each subfolder to display appropriately for the chosen
|
| 81 |
font size. Well-designed CSS may only need to be changed in a few places.
|
| 82 |
For instance, the Bluemarine theme sets a basic font size at the very top of
|
| 83 |
the CSS to 76%. Make that percentage higher and almost everything in the
|
| 84 |
theme will be displayed in larger text. (You may need to change a few other
|
| 85 |
CSS settings to get it working completely.)
|
| 86 |
|
| 87 |
Any style.css files and images in the subfolders will override those in the
|
| 88 |
main folder, but all folders will use the template.php and tpl.php files in
|
| 89 |
the main theme folder, so you don't need to duplicate all the template files,
|
| 90 |
only the css and image files.
|
| 91 |
|
| 92 |
* Go to the settings page and give the themes user-friendly names like
|
| 93 |
'Regular', 'Medium', and 'Large', and turn the blocks on as noted above.
|
| 94 |
|
| 95 |
Now your users will have a drop-down selection list they can use to increase
|
| 96 |
the font size of their pages.
|
| 97 |
|
| 98 |
|
| 99 |
-- CUSTOMIZATION --
|
| 100 |
|
| 101 |
* When Switchtheme module is enabled, users are able to switch to a different
|
| 102 |
theme any time they follow a link that includes a query string like in this
|
| 103 |
URL: http://www.example.com/foo/bar?theme=exampletheme
|
| 104 |
|
| 105 |
That means, you can implement specially crafted links into your site or themes
|
| 106 |
which allow users to switch to pre-defined themes. For example, using
|
| 107 |
Drupal's l() function in page.tpl.php (without code tags):
|
| 108 |
<code>
|
| 109 |
print l('Red theme', $_GET['q'], array(), 'theme=red');
|
| 110 |
</code>
|
| 111 |
|
| 112 |
|
| 113 |
-- CONTACT --
|
| 114 |
|
| 115 |
Current maintainers:
|
| 116 |
* Daniel F. Kudwien (sun) - dev@unleashedmind.com
|
| 117 |
|
| 118 |
Previous maintainers:
|
| 119 |
* Karen Stevenson (KarenS) - http://drupal.org/user/45874
|
| 120 |
|
| 121 |
This project has been sponsored by:
|
| 122 |
* UNLEASHED MIND
|
| 123 |
Specialized in consulting and planning of Drupal powered sites, UNLEASHED
|
| 124 |
MIND offers installation, development, theming, customization, and hosting
|
| 125 |
to get you started. Visit http://www.unleashedmind.com for more information.
|
| 126 |
|