<em>@xyzb 250241 wrote:</em><blockquote>I would like to have a layout for for the iPad which could just mimic the iPhone theme. How do I add the device detection script to point to my iPhone or new iPad layout?
Thanks</blockquote>
Please open the file “plugins/system/plg_system_jat3/jat3/core/common.php”
Find the following code snippet:
[PHP]//consider ipad as normal browser
if ($browser->getBrowser() == Browser::BROWSER_IPAD) return false;
//mobile
if ($browser->isMobile()) {
if (in_array($browser->getBrowser(), array(Browser::BROWSER_IPHONE, Browser::BROWSER_IPOD)))
$device = ‘iphone’;
else
$device = strtolower($browser->getBrowser());
//$device = ‘handheld’;
$layout = T3Parameter::get ($device.”_layout”, ”);
if ($layout == -1) return false; //disable
return $device;
//return ‘handheld’;
}[/PHP]
And replace it with:
[PHP]//consider ipad as normal browser
//if ($browser->getBrowser() == Browser::BROWSER_IPAD) return false;
//mobile
if ($browser->isMobile()) {
if (in_array($browser->getBrowser(), array(Browser::BROWSER_IPHONE, Browser::BROWSER_IPOD, Browser::BROWSER_IPAD)))
$device = ‘iphone’;
else
$device = strtolower($browser->getBrowser());
//$device = ‘handheld’;
$layout = T3Parameter::get ($device.”_layout”, ”);
if ($layout == -1) return false; //disable
return $device;
//return ‘handheld’;
}[/PHP]
Please note that you are customizing T3 core so remember to back it up to restore after upgrading T3 plugin otherwise it would be lost!