iPad version

sepsisgr
14 years, 10 months ago
Hi,

in MobileJoomla 0.9.4, my site would load on an iPad in its PC template but with the latest update in MobileJoomla now I get the iPhone version on my iPad.

How do I disable this and have the iPhone version run only on an iPhone/iPod touch and not on an iPad?
dryabov
14 years, 10 months ago
Starting from 0.9.5 there is a way to make additional plugins (of the 'mobile' group) for device checking.

So, it's possible to make a plugin of such a form (this is ipad.php file, making of corresponding ipad.xml file is trivial)
 
<?php
defined('_JEXEC') or die('Restricted access');
jimport('joomla.plugin.plugin');
class plgMobileIpad extends JPlugin
{
function plgMobileIpad(&$subject, $config)
{
parent::__construct($subject, $config);
}
function onDeviceDetection(&$MobileJoomla_Settings, &$MobileJoomla_Device)
{
if(strpos($_SERVER['HTTP_USER_AGENT'],'iPad')!==false)
$MobileJoomla_Device['markup'] = '';
}
}
 


For more examples look at /plugins/mobile directory.

PS. The plugin should be ordered to be runned after 'Mobile - TeraWURFL' plugin.
sepsisgr
14 years, 10 months ago
thanx rodsdesign, very helpful
dagobert
14 years, 10 months ago
Came to a similar solution this afternoon, but neither your solution nor mine is shown as an extension in the Joomla backend under Mobile Joomla! Settings -> Extensions. Is this intentional, or are we to early?

We're just keen to show our complete page on the iPad - appears to work now, anyway.

-Kurt.
rodsdesign
14 years, 10 months ago
Hi Kurt,

It installs the normal joomla way - and is listed under Extensions -> plugins. (it does work - i tested it today on my ipad).

As dryabov said above - PS. The plugin should be ordered to be runned after 'Mobile - TeraWURFL' plugin.

just install - turn it on - move it below TeraWURFL - and voila!

take a look at www.rodmartindesign.com on both your iphone and ipad (just a quick site i threw up to play with today)
dagobert
14 years, 10 months ago
Thank you for the confirmation. It's all fine, MobileJoomla 0.9.5 and the iPad module are working like a charm on the site. I was just confused about the MobileJoomla Extensions tab in the backend.
jpeters
14 years, 7 months ago
Hello.. greet thing for iPad... but when i use this it nolonger sees a iPad for a iPhone but it show's the url (show this page for pc)...
further i don't get a extra tab in component MobileJoomla settings..
So i can't / don't know how to assign a differant layout for iPad... or do i expact something else..
i wish to have mobileJoomla settings for pc, iPhone, iPad, Android??)...
grietbroek
14 years, 6 months ago
Thanks robdesign, works great.

at jpeters, this is only a plugin to tell the mobile joomla component that iPads don't need to be directed to the mobile template, but to the normal template. If you use the 'show this page for pc' option, the iPad will go to that page, because it is no longer detected as mobile device.

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.