Can the iPhone template also be used for the Android user agent?

Elegant Joomla template designed especially for both professional and personal website presentation.
GK User
Sat Oct 30, 2010 8:08 pm
Hi,

I've been testing my deployment of the Postnote template and I've noticed that viewing the website on an Android phone invokes the other handheld device template. I believe the browser on Android phones is able to process the proprietary iPhone html tags. Can the template be changed so that Android phones also use the template selected for the iPhone?

Thanks,
Dave.
User avatar
Senior Boarder

GK User
Wed Nov 10, 2010 2:04 am
I've enabled Android to view the iPhone template by editing the following file:
gk_postnotelibsmobile_device_detect.php

Edit the line:
Code: Select all
elseif(preg_match('/ip(hone|od)/i',$useragent) && !preg_match('/opera/i',$useragent))

to read:
Code: Select all
elseif(preg_match('/ip(hone|od)/i',$useragent) && !preg_match('/opera/i',$useragent) || preg_match('/Android/i',$useragent))

Kind regards,
Dave.
User avatar
Senior Boarder

GK User
Wed Nov 10, 2010 9:25 am
i would go for a
User avatar
Platinum Boarder

GK User
Wed Nov 10, 2010 9:26 am
i try again:)

i would go for a
Code: Select all
elseif(preg_match('/(ip(hone|od)|android)/i',$useragent) && !preg_match('/opera/i',$useragent))
User avatar
Platinum Boarder

GK User
Wed Nov 10, 2010 9:54 am
Agreed, however I would have appreciated more help to find this code in the first place instead of having to spend client time looking for this myself.
User avatar
Senior Boarder

teitbite
Fri Nov 12, 2010 3:17 pm
Hi

Such changing to the template code are considered as customization. I wouldn't have know this and got to search for it like You did. Hope it's gonna help someone.
User avatar
Moderator


cron