Mobile: Auto Templates Switcher

If you have unzipped the template, you will notice Extesion zip folder inside. Unzip it and install mod_autotemplateswitcher_v1.51 on your website. Go to you module manager and edit it. For the field "Show Title", select "No", so that the module becomes invisible and place it into any available position on the site. Set the detect string (from $_SERVER['HTTP_USER_AGENT']) for browser 1, 2 and 3 (iphone, IEMobile...) and set the corresponding templates for each of the browswer. Also specify a template for the default browser. This will be used when there's no match with browser 1, 2 or 3 then, save your work.

How to test what user agent does have your phone, go to: http://whatsmyuseragent.com

 

Core Changes

Install

You need to change one line in the Joomla core for this to work. In file /includes/application.php in function getTemplate (line 286), change the line

if ($template = $this->get('setTemplate')) {

to this one

if ($template = $this->getUserState('setTemplate')) {