News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

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

Branko.

OS & Browser Detection
by X3mE, version 1.5




Description



This modification will show the OS & Browser used by the user while posting. This information is gathered from the browser's user agent sent during posting time. It is not changed after editing the post.

You can choose in the Admin Control Panel which membergroups are allowed to view detected information.

There are many operating systems and browsers supported, but if you wish to add some new to the list, please use the modification support thread and leave your user agent.


Screenshot





Live Demo: http://x3me.iz.rs/index.php?board=2.0


Changelog



* version 1.5 (20. 09. 2010.)
- Added SMF 2.0 RC3 compatibility (thanks to everyone in the support topic who posted their comments, especially cieplutki & snoopy_virtual), not working with earlier SMF 2.0 branch anymore, use 1.4 instead!
- Updated the base detection engine for new releases of browsers and operating systems
- Spanish translation updated (thanks to snoopy_virtual)
- Russian translation added (thanks to Gladman)
- Turkish translation added (thanks to ოկtђ)
- Thai translation added (thanks to Rid-rop)
- Italian translation added (thanks to CrazyHorse80)

* version 1.4 (29. 04. 2009.)
- Added a membergroup permission to view detected information
- Ubuntu 9.04 Jaunty detection added
- Installation code reorganized
- Finnish translation updated (thanks to LexArma)
- German translation added (thanks to Eclipse16V)

* version 1.3 (10. 04. 2009.)
- Fixed undefined errors in SMF 1.1.x
- Finnish language added (thanks to LexArma)

* version 1.2 (05. 02. 2009.)
- Updated to work with SMF 2.0 RC1 (Removed compatibility with 2.0 Beta 4)
- Fixed a layout issue in SMF 1.1.x
- SMF 1 & 2 installs in same package, AUMR version no longer needed

* Version 1.1 (18. 01. 2009.)
- Fixed Unefined index error in Subs-Post.php (SMF 2.x)
- Windows 7 support included
- Swedish translation added (thanks to P_cool)
- Portugeese translation added (thanks to joomlamz)
- Polish translation added (thanks to saneone)
- Spanish translation added (thanks to M-DVD)

* Version 1.0 (19. 11. 2008.)
- Initial version for SMF 2.0 Beta 4 and SMF 1.1.7


Credits



Based on Web Browser Identifier v0.9, by Marcin Krol.


Notes



Normally, you upload and install OS_Browser_Detection_vX.X.zip (for SMF 2.0 RC3 or SMF 1.1.x).

If you have SMF up to 2.0 RC1, please use version 1.4 of the mod, and if you have Advanced Reputation System installed, please use the file with the ARS extension (up to 2.0 RC1 only!).

Please be aware that if you wish to uninstall ARS later, you will have to uninstall OS & Browser Detection first (however, your database settings will be saved if you wish to reinstall it later).

Note that this mod will only show OS & Browser for posts created after installation. Before installing it, this information was never stored in the database.

If you are switching from K-Detection, refer to this post for instructions how to preserve and import existing data into OS & Browser detection.

Please post all your support questions and comments in the support thread. You can also use the Issue Tracker on the Demo Website.


Languages



Languages included:
- English (english, english-utf8)
- Finnish (finnish)
- German (german)
- Italian (italian)
- Polish (polish)
- Portuguese (portuguese_pt-utf8)
- Russian (russian)
- Serbian (serbian, serbian-utf8, serbian-utf8-lat, serbian_latin-utf8)
- Spanish (spanish, spanish-utf8, spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8)
- Swedish (swedish-utf8)
- Thai (thai)
- Turkish (turkish)

To translate it to your own language, add the translation for:

$txt['OS_Browser_Compatible'] = 'compatible';
$txt['OS_Browser_OS'] = 'OS';
$txt['OS_Browser_Unknown'] = 'Unknown';
$txt['OS_Browser_Browser'] = 'Browser';
$txt['permissiongroup_simple_view_os_browser'] = 'View detected OS & Browser in posts';
$txt['permissionname_view_os_browser'] = 'View detected OS & Browser in posts';
$txt['permissionhelp_view_os_browser'] = 'If enabled, the member will see the detected OS & Browser for each post, if they are detected.';


in the appropriate Modifications.language.php file. You are welcome to post your translations in the support topic.


Donations



If you like this mod, please donate to support its further development. Any amount would be highly appreciated. Thank you.


Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

villasg

Thanks work good
A litle problem with the folder os_browser_detection in images dir ( th mod  canot transfer the images  i make manual )

X3mE

It has to be writable in order to transfer the 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



setthedark

I got problem i am running it on 1.1.7 and nothing is displayed in member profil on posts!
Any suggestion? Is it possible that it malfuction with some other mod?

X3mE

Did it install correctly? What other mods do you have?
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



DeviDarkL

#5
Hi there,

Great Mod ;) but I have the same problem that setthedark :( I had to had manually one code to display.php since one of my mod had changed it.
I use 2 beta 4 and mods i use are:
Registration redirection      0.1       [ Desinstalar ]  [ Listar Ficheiros ]  [ Apagar ]
2.    SimplePortal - Portuguese    1    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
3.    Irritate lurkers with 0 posts    0.1    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
4.    Downloads System    1.1.3    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
5.    Karma Buttons    1.1    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
6.    PDF Tag    1.1    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
7.    No More Ugly Avatar Scrollbars    1.0    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
8.    SMF Gallery Lite    2.0.4    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
9.    JPG Thumbnails    2.0    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
10.    [user] BBC Tag    1.0.1    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
11.    Separated Birthdays from Events    1.0    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
12.    New Style Message Icon    1.1    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
13.    Advanced AJAX Shoutbox    1.22    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
14.    OS & Browser Detection    1.0    [ Aplicar Mod ] [ Listar Ficheiros ] [ Apagar ]
15.    Hide Tag    2.2.3    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
16.    YouTube BBCode    2.4    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
17.    Auto Merge Double Post    1.0    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
18.    Thank-O-Matic    2.0 Beta 4    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
19.    Last Topics of Person    1.0    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
20.    Pm_Informer    2.0    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
21.    SimplePortal    2.1.1    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
22.    The Rules    1.2    [ Desinstalar ] [ Listar Ficheiros ] [ Apagar ]
23.    JPG Thumbnails    2.0

By the way, here it is the Portuguese Translation (modifications.portuguese.php or modifications.portuguese_pt.php)
$txt['OS_Browser_Compatible'] = 'compatível';
$txt['OS_Browser_OS'] = 'SO';
$txt['OS_Browser_Unknown'] = 'Não Identificado';
$txt['OS_Browser_Browser'] = 'Navegador';


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



DeviDarkL


[unplugged]

Hello. Installed the mod on SMF 2.0 Beta 4 and it went flawlessly. However, nothing actually shows anywhere. I have a fairly heavily modded site, but the install was without errors.

Any help would be appreciated.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



X3mE

Quote from: DeviDarkL on December 06, 2008, 10:16:04 PM
I just edited my first post. Can you help me? :D

Could you attach display.php so that I could have a look?

Quote from: SunKing on December 07, 2008, 02:59:55 AM
Hello. Installed the mod on SMF 2.0 Beta 4 and it went flawlessly. However, nothing actually shows anywhere. I have a fairly heavily modded site, but the install was without errors.

Any help would be appreciated.

Ok, check your database first to see if there are 4 new columns in the messages table (ua_os, ua_browser, ua_os_icon and ua_browser_icon). Check some of your latest records to see if they are filled properly.

If they are, then attach display.php from your sources folder and display.template.php from your theme folder and I'll have a look.
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



AlenNS

Great work X3me!!!

I had an error while installing your mod in source file Display.php and I made a change in installation package. It's caused by some mod I don't know which.

Quote<file name="$sourcedir/Display.php">
        <operation>
            <search position="before"><![CDATA[
        $messages_request = $smcFunc['db_query']('', '
            SELECT
                id_msg, icon, subject, poster_time, poster_ip, id_member, modified_time, modified_name, body,
                smileys_enabled, poster_name, poster_email, approved,
                id_msg_modified < {int:new_from} AS is_read
]]></search>

            <add><![CDATA[
        , ua_os, ua_browser, ua_os_icon, ua_browser_icon
]]></add>
        </operation>

Instead of this I had to do this:

Quote<file name="$sourcedir/Display.php">
        <operation>
            <search position="before"><![CDATA[
        $messages_request = $smcFunc['db_query']('', '
            SELECT
                m.id_msg, m.icon, m.subject, m.poster_time, m.poster_ip, m.id_member, m.modified_time, m.modified_name, m.body,
                m.smileys_enabled, m.poster_name, m.poster_email, m.approved,
                m.id_msg_modified < {int:new_from} AS is_read, k.message AS is_repped
]]></search>

            <add><![CDATA[
        , ua_os, ua_browser, ua_os_icon, ua_browser_icon
]]></add>
        </operation>

Mod works fine by now, but I would like to hear have I done good thing with this?

Thanks in advance. :)

X3mE

Thanks :)

It works, so you've done a good job :)

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



AlenNS


[unplugged]

Quote from: X3mE on December 07, 2008, 07:28:48 AM
Ok, check your database first to see if there are 4 new columns in the messages table (ua_os, ua_browser, ua_os_icon and ua_browser_icon). Check some of your latest records to see if they are filled properly.

Everything is working fine.  ;)   I didn't realize the mod only applied to posts made after it was installed. Great mod!!
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



DeviDarkL

Here is my Display.php

Also, I'm using a different theme which hasn't display.template.php ::)

X3mE

#15
Quote from: SunKing on December 07, 2008, 10:53:33 AM
Quote from: X3mE on December 07, 2008, 07:28:48 AM
Ok, check your database first to see if there are 4 new columns in the messages table (ua_os, ua_browser, ua_os_icon and ua_browser_icon). Check some of your latest records to see if they are filled properly.

Everything is working fine.  ;)   I didn't realize the mod only applied to posts made after it was installed. Great mod!!

I'm glad it's working :)

Quote from: DeviDarkL on December 07, 2008, 11:03:17 AM
Here is my Display.php

I've edited the file for you, and I've attached it below.

Quote from: DeviDarkL on December 07, 2008, 11:03:17 AM
Also, I'm using a different theme which hasn't display.template.php ::)

:o

You must have a display.template.php file, how else could your posts be displayed? :S

Actually, 3rd party themes for SMF 2 usually come without it I think (at least those I've tried did), but the one from the default theme is used. Attach the one from the default theme and I'll edit it.

Btw, try inserting this Display.php first, maybe it'll work right away (if the display.template.php file is already edited).
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



M-DVD

Good MOD :)

spanish (SMF 1.1.X), spanish_es (SMF 2.0 b), spanish_latin. [normal & UTF-8]

$txt['OS_Browser_Compatible'] = 'Compatible';
$txt['OS_Browser_OS'] = 'Sistema Operativo';
$txt['OS_Browser_Unknown'] = 'Desconocido';
$txt['OS_Browser_Browser'] = 'Navegador';


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



dannys

#18
i install manualy but when try to execute mysql syntax give me a error ALTER TABLE {$db_prefix}messages ADD COLUMN ua_os TINYTEXT NOT NULL
Error

SQL query:

ALTER TABLE {$db_prefix}messages ADD COLUMN ua_os TINYTEXT NOT NULL

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{$db_prefix}messages ADD COLUMN ua_os TINYTEXT NOT NULL' at line 1

and now i cant see the posts :(  http://sidux.gr/forum/index.php/topic,113.0.html its empty
i use smf 1.1.7
what i do wrong? thanx!

"edit" 
<< i recover from backup files (Post.php~ etc)>>

saneone

Polish Translation:

//OS, Browser
$txt['OS_Browser_Compatible'] = 'kompatybilny';
$txt['OS_Browser_OS'] = 'System Operacyjny';
$txt['OS_Browser_Unknown'] = 'Nieznany';
$txt['OS_Browser_Browser'] = 'Przeglądarka';

Advertisement: