Current time: 05-24-2012, 01:45 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
User Agent question
02-13-2009, 04:52 PM
Post: #1
User Agent question
I dont know who made it, but I was wondering if you could upgrade it so it supports Google Chrome?
I use Google Chrome and this mod makes it say I use Safari...
Visit this user's website Find all posts by this user
Quote this message in a reply
09-25-2009, 04:21 AM
Post: #2
RE: User Agent question
would very much appreciate if this plugin will be updated to support Chrome and Windows 7. thanks so much for the plugin Wink
Visit this user's website Find all posts by this user
Quote this message in a reply
09-26-2009, 12:47 AM
Post: #3
RE: User Agent question
quick fix:

after line 75 add
Code:
    else if (strpos($ua, 'windows nt 6.1') !== false || strpos($ua, 'winnt6.1') !== false) $ua_os = 'windows_seven';

after line 137 add
Code:
        case 'windows_seven': return 'Windows Seven';

// Browser detection: (line18)
after the safari part add
Code:
    else if (strpos($ua, 'chrome') !== false) $ua_browser = 'chrome';

line 99 after the safari part add
Code:
        case ''chrome': return ''Chrome';

and upload the icons for the system and browser to your "/images/useragent" folder they need to be "icon_windows_seven.gif" and "icon_chrome.gif"

system part is tested, browser part should work (not testet yet)

LINUX is like a Wigwam: No Windows, no Gates and an Apache inside.
[Image: 1.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
09-26-2009, 02:19 AM
Post: #4
RE: User Agent question
thanks very much Andii S Big Grin
Windows 7 is detected now except for the chrome which still displays safari. anyway, thanks for you help Wink
Visit this user's website Find all posts by this user
Quote this message in a reply
09-26-2009, 02:40 AM
Post: #5
RE: User Agent question
try
Code:
else if (strpos($ua, 'AppleWebKit') !== false) $ua_browser = 'chrome';

Code:
case ''chrome': return ''Chrome';

LINUX is like a Wigwam: No Windows, no Gates and an Apache inside.
[Image: 1.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
09-26-2009, 02:51 AM
Post: #6
RE: User Agent question
doesn't work either Sad

Intead, i placed chrome before safari and it work now.

Thanks again.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-29-2009, 12:31 AM
Post: #7
RE: User Agent question
How can made this plugin info only visible for Admins?

vBulletin/Wordpress/Magento/MyBB
Developer and Designer
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication