MantisBT - ATutor
View Issue Details
0004338ATutorThemepublic2010-06-18 10:412010-09-22 11:52
cindy 
cindy 
normalminoralways
closedfixed 
2.0 
2.0 
SVN
0004338: Support mobile themes
1. Categorize themes to 2 types: for desktop or for mobile device
2. Can set the default themes for these 2 types
3. Automatically recognize the request is from desktop or mobile and apply the according themes.
No tags attached.
Issue History
2010-06-18 10:41cindyNew Issue
2010-06-18 10:41cindyAffects version => SVN
2010-06-18 10:53cindyStatusnew => resolved
2010-06-18 10:53cindyFixed in Version => 2.0
2010-06-18 10:53cindyResolutionopen => fixed
2010-06-18 10:53cindyAssigned To => cindy
2010-06-18 10:53cindyNote Added: 0004340
2010-09-22 11:52gregStatusresolved => closed

Notes
(0004340)
cindy   
2010-06-18 10:53   
SVN revision: 10023

Solution:
1. add new table field themes.type with values "Desktop", "Mobile"
2. add "mobile theme" field onto pages "user preference", admin "default preference", where the users/admins can set the default desktop and mobile themes
3. add is_mobile_device() function into vitals.inc.php to recognize what kind of device the request is from, by checking $_SERVER['HTTP_USER_AGENT']
4. in header.inc.php, add 2 more pass-in parameters to header.tmpl.php: is_mobile_device, mobile_device_type(ipod, blackberry, android, unknown)
5. modify admin "themes" page to display 2 tables for desktop themes and mobile themes, modify theme import/export script to cater for the new field

Affected scripts:
include/classes/ContentManager.class.php
include/vitals.inc.php
include/lib/constants.inc.php
include/header.inc.php
themes/default/include/header.tmpl.php
users/atutor_settings.inc.php
mods/_core/users/default_preferences.php
mods/_core/themes/index.php
mods/_core/themes/import.php
mods/_core/themes/lib/themes.inc.php
mods/_core/themes/theme_install_step_2.php
mods/_core/themes/classes/ThemeParser.clas.php
mods/_core/themes/lib/theme_template.inc.php
mods/_core/users/lib/pref_tab_functions.inc.php
install/db/atutor_schema.sql
install/db/atutor_upgrade_1.6.4_to_2.0.sql
themes/default/theme_info.xml
themes/blumin/theme_info.xml
themes/default16/theme_info.xml
themes/fluid/theme_info.xml
themes/greenmin/theme_info.xml
themes/mobile/theme_info.xml