Mobile Switch module
Simple automatic theme switch for mobile devices, detected by browscap.
DEPENDENCIES
------------
Drupal 6.
The Browscap module from drupal.org/project/browscap
INSTALL
-------
1) Copy the Mobile Switch folder to the modules folder in your installation.
Usually this is sites/all/modules.
2) In your Drupal site, enable the module under:
Administer -> Site building -> Modules.
/admin/build/modules
ADMINISTER
----------
1) Important for first time usage
of Mobile Switch and Browscap module.
As first make sure that fetched the Browscap module browser data.
Administer the Browscap module under Administer -> Site configuration
admin/settings/browscap
Check the line 'Current browscap data version'.
If you see 'Never fetched' on this line it is necessary to fetch
browser data.
To fetch browser data use simply the 'Refresh browscap data' button.
2) Administer themes under Administer -> Site building -> Themes.
/admin/build/themes
- Enable your preffered mobile theme (Not set as default).
- Use as default theme a 'not mobile theme'.
3) Administer the Mobile Switch module under Administer -> Site configuration
/admin/settings/mobile-switch
- Choose your mobile theme.
If a theme used as mobile theme, their displayed informations on the
Appearance administration page are altered for better visualisation.
A Mobile Switch mobile theme is not available on administration pages and
in the maintenance mode.
Mobile theme on administration pages
Configure the 'Administration usage' in the module 'Basic settings' to
enable the use of the mobile theme on administration pages.
Mobile device prevention
It is possible to bypass the automatic switching to the mobile theme for
mobile devices.
This is useful, for example, to exclude large tablets for the theme
switching.
To use this,
administer the 'Advanced' settings under:
Administer -> Site configuration -> Mobile Switch
/admin/settings/mobile-switch/advanced
enable the 'Use preventing' option and configure the user agent strings
for such devices.
To test this feature, without a real mobile device, it is a good
solution to use the desktop browser with a user agent switcher extension
and custom defined user agents.
For the development of a web site
Administer the 'Development' settings under:
Administer -> Site configuration -> Mobile Switch
/admin/settings/mobile-switch/development
a) Enable/disable the 'Developer modus'.
If a desktop mobile emulator not detected from browscap it is possible
to configure additional user agents.
b) Enable/disable desktop browser usage of the mobile theme.
DEVELOPMENT
-----------
Development with Mobile Switch.
The module provides three system variables:
1. mobile_switch_ismobiledevice
2. mobile_switch_ismobiletheme
3. theme_mobile
The value of the variables 1. and 2. is a boolean value.
The value of the variable 3. is FALSE or the machine name of the used theme.
EXTERNAL RECOURCES
------------------
Mobile Emulators & Simulators: The Ultimate Guide
http://www.mobilexweb.com/emulators
View source
- Mobile Switch module
-
- Simple automatic theme switch for mobile devices, detected by browscap.
-
- DEPENDENCIES
- ------------
-
- Drupal 6.
- The Browscap module from drupal.org/project/browscap
-
- INSTALL
- -------
-
- 1) Copy the Mobile Switch folder to the modules folder in your installation.
- Usually this is sites/all/modules.
-
- 2) In your Drupal site, enable the module under:
- Administer -> Site building -> Modules.
- /admin/build/modules
-
- ADMINISTER
- ----------
-
- 1) Important for first time usage
-
- of Mobile Switch and Browscap module.
-
- As first make sure that fetched the Browscap module browser data.
-
- Administer the Browscap module under Administer -> Site configuration
- admin/settings/browscap
-
- Check the line 'Current browscap data version'.
-
- If you see 'Never fetched' on this line it is necessary to fetch
- browser data.
- To fetch browser data use simply the 'Refresh browscap data' button.
-
- 2) Administer themes under Administer -> Site building -> Themes.
- /admin/build/themes
-
- - Enable your preffered mobile theme (Not set as default).
- - Use as default theme a 'not mobile theme'.
-
- 3) Administer the Mobile Switch module under Administer -> Site configuration
- /admin/settings/mobile-switch
-
- - Choose your mobile theme.
-
- If a theme used as mobile theme, their displayed informations on the
- Appearance administration page are altered for better visualisation.
-
- A Mobile Switch mobile theme is not available on administration pages and
- in the maintenance mode.
-
- Mobile theme on administration pages
-
- Configure the 'Administration usage' in the module 'Basic settings' to
- enable the use of the mobile theme on administration pages.
-
- Mobile device prevention
-
- It is possible to bypass the automatic switching to the mobile theme for
- mobile devices.
- This is useful, for example, to exclude large tablets for the theme
- switching.
-
- To use this,
-
- administer the 'Advanced' settings under:
- Administer -> Site configuration -> Mobile Switch
- /admin/settings/mobile-switch/advanced
-
- enable the 'Use preventing' option and configure the user agent strings
- for such devices.
-
- To test this feature, without a real mobile device, it is a good
- solution to use the desktop browser with a user agent switcher extension
- and custom defined user agents.
-
- For the development of a web site
-
- Administer the 'Development' settings under:
- Administer -> Site configuration -> Mobile Switch
- /admin/settings/mobile-switch/development
-
- a) Enable/disable the 'Developer modus'.
-
- If a desktop mobile emulator not detected from browscap it is possible
- to configure additional user agents.
-
- b) Enable/disable desktop browser usage of the mobile theme.
-
- DEVELOPMENT
- -----------
-
- Development with Mobile Switch.
-
- The module provides three system variables:
-
- 1. mobile_switch_ismobiledevice
- 2. mobile_switch_ismobiletheme
- 3. theme_mobile
-
- The value of the variables 1. and 2. is a boolean value.
- The value of the variable 3. is FALSE or the machine name of the used theme.
-
- EXTERNAL RECOURCES
- ------------------
-
- Mobile Emulators & Simulators: The Ultimate Guide
- http://www.mobilexweb.com/emulators