Motorola Xoom

eelucid8
13 years, 1 month ago
Hi Everybody,
My site   ( www.roadstardesign.com/dojo )  is now online and testing great with iPhone, Android, and Windows Phone. I disabled iPad so it is served the standard site, which better fits its resolution than the iPhone template does. Unfortunately, the Motorola Xoom also has a big resolution, but it is still displaying the mobile_pda template. Is there any possible way to work around this? Thanks in advance,
Bill
dryabov
13 years, 1 month ago
Try to add
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
after < head > tag in mobile_pda template.
eelucid8
13 years, 1 month ago
Hm. No effect. I'm trying to make Xoom show the standard site. Not sure why the viewport tag would do that.
dryabov
13 years, 1 month ago
Then you should patch Mobile-Simple and Mobile-TeraWURFL plugins (or to write additional plugin that will check for Xoom visitors). What is User-Agent of Xoom (you can get it on mobilejoomla.com/ua.php)?
eelucid8
13 years, 1 month ago
User agent is:
Mozilla/5.0 (Linux; U; Android 3.1; en-us; sdk Build/MASTER) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13

Can you explain or send me a link describing how to patch Mobile-Simple and Mobile-TeraWURFL?
dryabov
13 years, 1 month ago
OK, the example of plugin is below. Just pack xoom.xml and xoom.php into single archive and install it like usual joomla plugin.

xoom.xml:
<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="plugin" group="mobile" method="upgrade">
    <name>Mobile - Xoom</name>
    <files>
        <filename plugin="xoom">xoom.php</filename>
    </files>
</install>


xoom.php:
<?php
defined('_JEXEC') or die('Restricted access');
jimport('joomla.plugin.plugin');
class plgMobileXoom extends JPlugin{
    function plgMobileXoom(&$subject,$config){parent::__construct($subject,$config);}
    function onDeviceDetection(&$MobileJoomla_Settings, &$MobileJoomla_Device)
    {
        if(strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla/5.0 (Linux; U; Android 3.1; en-us; sdk Build/MASTER)')===0)
            $MobileJoomla_Device['markup'] = '';
    }
}
eelucid8
13 years, 1 month ago
Ok. I take it that it doesn't matter what I name the archive? and that a .zip file is good? 
dryabov
13 years, 1 month ago
eelucid8 wrote:
Ok. I take it that it doesn't matter what I name the archive? and that a .zip file is good? 

Yes
eelucid8
13 years ago
Hi Dryabov. I made the php and the xml and zipped it up and installed it. Install went fine, but I don't see any difference on blaze.io/mobile for Xoom. It's still rendering the mobile page instead of the standard one. Any thoughts? Thanks,
Bill
dryabov
13 years ago
Did you published plugin after install?
Set this plugin to be last in the order of mobile group pugins.

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.