Message
  • You must log in first
Welcome, Guest
Username Password: Remember me

User agent detection problem...
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: User agent detection problem...

User agent detection problem... 14 years, 2 months ago #183

  • yonk
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
Hi, i installed the latest version (0.9.1) of mobilejoomla, and the problem is that my iPod touch isnt properly detected, so the site it is shown as the standard version. These are my specs:

- iPod Touch 1G firmware 3.0 (jailbreak done)
- User agent of the iPod (got from web server): Mozilla/5.0 (device; U; CPU iPhone OS 3_0 like Mac OS X; es-es) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16

The key issue is that where appears 'device' should appear 'iPod', and that's what confuse the User Agent detection of mobilejoomla. However, the same device is properly detected by JA Purity II template o another site, which integrates an iPhone version in the template, so it would be great if the user agent detection could be modified to fix this issue.

Thanks.

User agent detection problem... 14 years, 2 months ago #1468

Well, I don't have iphone/ipod around to test, but I tested from this site(emulator), www.testiphone.com/ ,
my site show normal page. I had to set "Global Setting"->"User Agent Checking" = "Always Iphone/Ipod" to make it working which I don't want.I want to focus on to other mobile phone as well.

User agent detection problem... 14 years, 2 months ago #1498

  • Barkley
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Having the same problem... iphone is not detected but all other pda / smartphones seem to work correctly.

User agent detection problem... 14 years, 1 month ago #1551

  • yonk
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
This bug is still unfixed in version 0.9.3. It would be great if developers could take a look at it, it must be very easy to fix.

Thx

User agent detection problem... 14 years, 1 month ago #1565

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
yonk, support of iPod Touch 1G firmware 3.0 will be included into version 0.9.4.

To add support to v0.9.3, replace line 143 in plugins/system/mobilebot.php to
[php] $iphone_list=array('Mozilla/5.0 (iPod;','Mozilla/5.0 (iPod touch;','Mozilla/5.0 (iPhone;','Apple iPhone ','Mozilla/5.0 (iPhone Simulator;','Mozilla/5.0 (Aspen Simulator;','Mozilla/5.0 (device; U; CPU iPhone OS');[/php]

User agent detection problem... 14 years, 1 month ago #1571

  • yonk
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
Thank you dryabov, now it works. However, i wonder if it would be better to only look for "iPhone" or "iPod Touch" string in the user agent string instead of the whole 'Mozilla/5.0 (<x>;' variants.

User agent detection problem... 14 years, 1 month ago #1572

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
yonk wrote:
However, i wonder if it would be better to only look for "iPhone" or "iPod Touch" string in the user agent string instead of the whole 'Mozilla/5.0 (<x>;' variants.


It may lead to mistakes for phones with user agent strings like "DummiPhone" or "This phone is not iPhone" (of course, most likely there are no such a phones, so it's just an example).

User agent detection problem... 14 years, 1 month ago #1573

  • Barkley
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
I tried the above change (thanks for adding this) however it still doesn't work for my site. I tried various online emulators. Do you have either an online emulator or application that you test with?

User agent detection problem... 14 years, 1 month ago #1574

  • yonk
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
Barkley wrote:
I tried the above change (thanks for adding this) however it still doesn't work for my site. I tried various online emulators. Do you have either an online emulator or application that you test with?

Mozilla Firefox + User Agent Switcher plugin

User agent detection problem... 14 years, 1 month ago #1575

  • Barkley
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
That worked! Thanks very much ....
  • Page:
  • 1
  • 2
Time to create page: 0.10 seconds

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.