Can't open mobile version of the website

Feel free to talk about everything related to our Joomla Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Thu Apr 19, 2012 6:33 am
Hi Gavick Team!

I'm trying to build a mobile version of my website http://www.albanianews.it and when I Open it directly from safari Is Ok, but if I Open a link from Facebook ( the facebook app), or Twitter ( twitter app), or Gmail ( gmail app) the full website Is opened, and not the mobile version.

What changes have to be made for not having this problem?

Also, it would be awasome for having the possibility of mobile homepage to show the K2 featured articles if so chosen by the user (I do not use the joomla content, i just use K2 everywhere)
User avatar
Fresh Boarder

GK User
Thu Apr 19, 2012 4:32 pm
Hi,

I don't really understand the issue, when I opened the site with Firefox it showed me desktop layout, I didn't see the mobile layout there. Can you please clarify?

Thanks,
User avatar
Platinum Boarder

GK User
Thu Apr 19, 2012 4:47 pm
Well, let me clarify you!

The problem is not for a desktop browser, whereas for the mobile one.

I'm trying to create a mobile version of my website by adding some extra information needed by iPhone to recognize the mobile versione as a standalone application by adding this meta.

<meta name="apple-mobile-web-app-capable" content="yes"/>

But, if I try to add at the home screen my website, after it creates the link and when I try to open it by this link, the full version of my website will be opened.

The same thing from the other apps, as I mentioned before. Let's say that a friend of mine shared the link on facebook. When I'm on facebook app of my iPhone and try to open the link, the link would open the full versione of the article, and not the mobile one, as I'm on mobile. So, I suppose the template doesn't recognize to be on mobile (twitter and gmail apps do the same)

The last thing, I wanted to have the same mobile experience on the iPad, but on the ipad also i have the full website loaded.

What I suppose is that the browser recognition motor of gavern might have any problem.

O.

Don Lee wrote:Hi,

I don't really understand the issue, when I opened the site with Firefox it showed me desktop layout, I didn't see the mobile layout there. Can you please clarify?

Thanks,
User avatar
Fresh Boarder

GK User
Fri Apr 20, 2012 2:02 pm
Please give us sample generated link from this apps.
User avatar
Platinum Boarder

GK User
Thu May 24, 2012 3:06 pm
is there any solution for this problem ?

gk.browser.php seems to ignore some parts of user-agent if mobile website is
called from home screen on iphone devices.

for example:
user-agent for mobile website in iphone safari:
Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3
>>>everything works fine ...

user-agent for mobile website called from iphone home-link
Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334
>>>results in loading default.php (instead of iphone.php)
User avatar
Fresh Boarder

GK User
Fri May 25, 2012 11:41 am
It looks like forcing safari view on purpose, I'll look to gk.browser class where we made browser detection to check whether it is possible to avoid this problem.
User avatar
Platinum Boarder

GK User
Fri May 25, 2012 11:46 am
Please open file gk.browser.php from template/lib/framework directory then find line 54 where you should see code like case 'safari' and replace this whole case by this code :

Code: Select all
case 'safari':
                if (preg_match('/iphone/i', $browser->getAgentString())) {
                                $result->set('browser', 'iphone');
                                $result->set('mobile', true);
                            } else {
                        $result->set('browser', 'chrome');
                        $result->set('mobile', false);
                     }
                     break;


hope this resolve this problem.
User avatar
Platinum Boarder

GK User
Fri May 25, 2012 2:54 pm
thanks a lot,
sorry this didn't solve the prob...

if website is called from homescreen user agent is not including "Safari" ....
User avatar
Fresh Boarder

GK User
Wed May 30, 2012 8:17 am
Hi I'm having the same problem to. I also tried the code you gave but that still didn't work, was there a quick fix on this? Thanks!
User avatar
Fresh Boarder

GK User
Thu May 31, 2012 8:00 am
The problem is mainly because the browser force different than default, which loading the wrong layout. Please contact with me via PM with all necessary details like forum topic, ftp access etc, I'll try to check this issue.
User avatar
Platinum Boarder


cron