Part of the EllisLab Network
   
 
User Agent: Opera Mini reporting as browser instead of mobile
Posted: 05 November 2006 05:04 PM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  56
Joined  03-20-2006

When I use the Opera Mini simulator with the User Agent library, it’s reporting itself as a browser instead of a mobile.

echo $this->agent->browser().' '.$this->agent->version().' '.$this->agent->platform();

Opera 8.01 Unknown Platform

echo $this->agent->agent_string();

Opera/8.01 ( J2ME/MIDP; Opera Mini/2.03942/1378;en;U;ssr)

Profile
 
 
Posted: 06 November 2006 07:15 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRank
Total Posts:  2505
Joined  12-21-2001

Well, it’s identifying itself as Operaa 8.01.  That’s no good.  OK try this:

Open libraries/User_agent.php

At line 189, add $this->_set_mobile() just before “return TRUE”:

$this->is_browser = TRUE;
$this->version = $match[1];
$this->browser = $val;
$this->_set_mobile();  // <------ new code here
return TRUE;

 Signature 
Profile
MSG
 
 
Posted: 06 November 2006 09:04 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  56
Joined  03-20-2006

That seems to have done the trick; thanks.

Profile
 
 
Posted: 16 June 2007 08:49 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  116
Joined  07-31-2006

My i-mate JASJAM phone running Windows Mobile 5 has the agent_string

Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; i-mate JASJAM PPC; 240x320; PPC; 240x320)

Doesnt show up as mobile, would the string PPC or Windows CE be a giveaway?

I notice Windows CE isnt in the platform list either. Where’d you get that initial list from Rick? Any way we can beef it up a bit?

 Signature 

Andrew Somervell Beer

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66431 Total Logged-in Users: 26
Total Topics: 84797 Total Anonymous Users: 2
Total Replies: 455086 Total Guests: 219
Total Posts: 539883    
Members ( View Memberlist )
Newest Members:  GlennJDylan1978X_franbaguasllogocsaturkeyPeter BryanttherendStudioGeorgiaJZeer