OS & Browser Detection (version 1.5 is out) [20. 09. 2010.]

Started by Branko., December 06, 2008, 05:23:42 AM

Previous topic - Next topic

riker

Quote from: X3mE on February 15, 2009, 06:13:54 PM
Please leave your user agents from IE8 and Mint. You can find them out eg here: http://tinyurl.com/6yn8ek

Err this -

QuoteYour browser user agent ID: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0
?

riker

It's showing now, is this information stored remotely then ?

EDIT: There now showing as IE7 again!,  How can some of my posts show as IE8 and then others IE7 again?

lookang

Great mod , i like a lot. thx!

by the way, i have a small problem

reference:
http://66.7.205.91/~lookangc/index.php?topic=933.0

i seems to have 3 times the display

any  idea how i can get it to work with just one time?


villasg

Plz if u can make a small edit.
The :Microsoft Internet Explorer is too long
Maybe need to change like Microsoft I.E...

And something else .
I have the new 1.2 and the previus errors is the same
Quote from: villasg on December 12, 2008, 03:20:54 AM
Today i see in my error log that :
1) A new member activate acount.
(http://www.thai.gr/forum/index.php?action=activate;u=656;code=c2744da987)
The time in activate acount i take this errors

2) A moderator MOVE a topik
( http://www.thai.gr/forum/index.php?action=movetopic2;topic=441.0 )
Again take thiw errors

Undefined index: ua_browser_icon
Undefined index: ua_os_icon
Undefined index: ua_browser
Undefined index: ua_os


8: Undefined index: ua_browser_icon
Αρχείο: /****/*****/****/forum/Sources/Subs-Post.php
Γραμμή: 1538


AND

Undefined index: ua_os
Αρχείο: /****/*****/****/forum/Sources/Subs-Post.php
Γραμμή: 1538


And
Undefined index: ua_os_icon
Αρχείο: /****/*****/****/forum/Sources/Subs-Post.php
Γραμμή: 1538


Line 1538 is :
VALUES ('$posterOptions[ua_os]', '$posterOptions[ua_browser]', '$posterOptions[ua_os_icon]', '$posterOptions[ua_browser_icon]',


inside in
// Insert the post.
db_query("
INSERT INTO {$db_prefix}messages
(ua_os, ua_browser, ua_os_icon, ua_browser_icon,
ID_BOARD, ID_TOPIC, ID_MEMBER, subject, body, posterName, posterEmail, posterTime,
posterIP, smileysEnabled, modifiedName, icon)
VALUES ('$posterOptions[ua_os]', '$posterOptions[ua_browser]', '$posterOptions[ua_os_icon]', '$posterOptions[ua_browser_icon]',
$topicOptions[board], $topicOptions[id], $posterOptions[id], SUBSTRING('$msgOptions[subject]', 1, 255), SUBSTRING('$msgOptions[body]', 1, 65534), SUBSTRING('$posterOptions[name]', 1, 255), SUBSTRING('$posterOptions[email]', 1, 255), " . time() . ",
SUBSTRING('$posterOptions[ip]', 1, 255), " . ($msgOptions['smileys_enabled'] ? '1' : '0') . ", '', SUBSTRING('$msgOptions[icon]', 1, 16))", __FILE__, __LINE__);
$msgOptions['id'] = db_insert_id();


X3mE

Quote from: riker on February 16, 2009, 06:42:47 AM
It's showing now, is this information stored remotely then ?

EDIT: There now showing as IE7 again!,  How can some of my posts show as IE8 and then others IE7 again?

The script detects "MSIE" in the user agent and shows the number which follows it as the version number. The versions aren't hardcoded. I think the problem is in the IE itself, there's not much I can do if the wrong user agent is being sent... Maybe some addon, toolbar or something is causing the problem?

Quote from: lookang on February 19, 2009, 10:11:56 PM
Great mod , i like a lot. thx!

by the way, i have a small problem

reference:
http://66.7.205.91/~lookangc/index.php?topic=933.0

i seems to have 3 times the display

any  idea how i can get it to work with just one time?

Please attach your display.template.php and I'll fix it for you.

Quote from: villasg on February 20, 2009, 03:05:53 AM
Plz if u can make a small edit.
The :Microsoft Internet Explorer is too long
Maybe need to change like Microsoft I.E...

I'll change it to MS Internet Explorer.

Quote from: villasg on February 20, 2009, 03:05:53 AM
And something else .
I have the new 1.2 and the previus errors is the same

I'll fix it, I thought it wasn't happening in 1.1.x, only in 2.0.
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



villasg

I use 1.1.8

in
http://www.thai.gr/forum/index.php?action=movetopic2;topic=2063.0

have error
8: Undefined index: ua_browser_icon
Αρχείο: /home/thai.gr/********/Sources/Subs-Post.php
Γραμμή: 1535


8: Undefined index: ua_os_icon
Αρχείο: /home/thai.gr/******/Sources/Subs-Post.php
Γραμμή: 1535


8: Undefined index: ua_browser
Αρχείο: /home/thai.gr/*******/Sources/Subs-Post.php
Γραμμή: 1535


8: Undefined index: ua_os
Αρχείο: /home/thai.gr/*****/Sources/Subs-Post.php
Γραμμή: 1535

lookang

Quote from: X3mE on February 20, 2009, 07:31:19 AM
Quote from: riker on February 16, 2009, 06:42:47 AM

Quote from: lookang on February 19, 2009, 10:11:56 PM
Great mod , i like a lot. thx!

by the way, i have a small problem

reference:
http://66.7.205.91/~lookangc/index.php?topic=933.0

i seems to have 3 times the display

any  idea how i can get it to work with just one time?

Please attach your display.template.php and I'll fix it for you.
Thanks!

I found it at C:.............\Themes\default\Display.template.php

X3mE

Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



villasg

errors is in
http://www.thai.gr/forum/index.php?action=movetopic2;topic=2077.0
http://www.thai.gr/forum/index.php?action=activate;u=753;code=434b57ed91
And here is the line 535 from subs-post.php

VALUES ('$posterOptions[ua_os]', '$posterOptions[ua_browser]', '$posterOptions[ua_os_icon]', '$posterOptions[ua_browser_icon]',


and here is all from 529 until 538
// Insert the post.
db_query("
INSERT INTO {$db_prefix}messages
(ua_os, ua_browser, ua_os_icon, ua_browser_icon,
ID_BOARD, ID_TOPIC, ID_MEMBER, subject, body, posterName, posterEmail, posterTime,
posterIP, smileysEnabled, modifiedName, icon)
VALUES ('$posterOptions[ua_os]', '$posterOptions[ua_browser]', '$posterOptions[ua_os_icon]', '$posterOptions[ua_browser_icon]',
$topicOptions[board], $topicOptions[id], $posterOptions[id], SUBSTRING('$msgOptions[subject]', 1, 255), SUBSTRING('$msgOptions[body]', 1, 65534), SUBSTRING('$posterOptions[name]', 1, 255), SUBSTRING('$posterOptions[email]', 1, 255), " . time() . ",
SUBSTRING('$posterOptions[ip]', 1, 255), " . ($msgOptions['smileys_enabled'] ? '1' : '0') . ", '', SUBSTRING('$msgOptions[icon]', 1, 16))", __FILE__, __LINE__);
$msgOptions['id'] = db_insert_id();

X3mE

There's a new version probably coming soon, the fix will be included. Alternately, if development takes too long, I will probably release a minor upgrade just fixing this. There's a long list of planned changes to be done.

Thanks for the heads up once again.
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



lookang


ysNoi

Thanks for this mod..! I tried and it works for me..! However, the result is not an image but only a text...!

OS:
Linux (Ubuntu 8.04 LTS Hardy Heron) Linux (Ubuntu 8.04 LTS Hardy Heron)
Browser:
Firefox 3.0.5 Firefox 3.0.5
"Don't fix it if it ain't broken, don't break it if you can't fix it."

X3mE

You have to upload the folder with the icons to your theme's images folder manually, and you'll see them ;)
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



ysNoi

Quote from: X3mE on February 22, 2009, 11:38:46 AM
You have to upload the folder with the icons to your theme's images folder manually, and you'll see them ;)

Oh I see..!Thanks for the info X3mE...! Anyway, where can I get this images..? What is the ideal size of each image bro..?
"Don't fix it if it ain't broken, don't break it if you can't fix it."

X3mE

Unpack the installation package and you will find all the required images there :)
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



ysNoi

Got it..! Nice mod and thanks...!

One more query, can I shorten the display name of the OS..? After the Ubuntu image, I got Linux (Ubuntu 8.04 LTS Hardy Heron) so I'm thinking to shorten this like Linux (Ubuntu 8.04) or the like....!

Thank you so much...!
"Don't fix it if it ain't broken, don't break it if you can't fix it."

X3mE

You can open os_browser_detection.php from the Sources folder and edit any hard coded strings you like :)
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



ysNoi

"Don't fix it if it ain't broken, don't break it if you can't fix it."


X3mE

Extract the installation package, find the folder with all the icons and upload it to your theme's images folder ;)
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



Advertisement: