test
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • xyzb Friend
    #165753

    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

    himangi Friend
    #399517

    Hi,

    I am sorry for the late reply, but I am still consulting this with the JA developers, and will get back to you soon.

    Thanks!

    Thanh Nguyen Viet Friend
    #400025

    <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!

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 3 voices, and was last updated by  Thanh Nguyen Viet 13 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum