Version: 1.0.2, by derekivey
Developer Last Online: Jan 2010
Version: 3.5.5
Rating:
Released: 12-28-2005
Last Update: 03-01-2006
Installs: 79
DB Changes Uses Plugins Template Edits
Code Changes Additional Files
No support by the author.
Browser on Who's Online Developers:derekivey Version: 1.0.2 vBulletin Version: 3.5.5 (3.6.0 version available here) File Edits: 2 Template Edits: 1 New Phrases: 8 Uses Plugins: Yes Difficulty: Easy
Description: This hack will show each user's browser in the Who's Online Box beside their name. It supports IE, Firefox, Opera, Camino, Safari, Konqueror, and Netscape. If the user is using a browser that is unsupported with this hack, it will show a Question mark icon, which means its an Unknown browser.
*** I Strongly Recommend That You Backup Before Installing/Upgrading This Hack! ***
Planned features for a later release:
Add support for more browsers.
Add browser to online.php
Show only 1 image for each browser when there is more than 1 person with that browser.
Whatever is suggested.
Features/Changes in Version 1.0.2:
Fixed SQL bug
Features/Changes in Version 1.0.1:
Moved browsers to session table.
Removed 'Unknown' from being stored in database, replaced it with Psionic Vision's suggestion.
Note: If you are using vBadvanced CMPS, please follow 350Chevy's post to get this hack working on it, if you want to show their browser on the CMPS' Who's Online.
I have added screen shots of this hack in action below.
This hack has poor code for the following reasons:
- It does not treat strings as strings, rather as constants. PHP, however, will only show an error if there is an E_NOTICE error reporting turned on.
- It is completely unnecessary to alter user table and save browser informations.
- Addslashes() is deprected in vbulletin 3.5. Use $db->escape_string() instead.
- There is no point in the "unknown" value. That value will just take up db space. Why not make a default empty string which will return false when accessed. E.g. you can change <if condition="$loggedin[browser] == unknown"> to <if condition="!$loggedin[browser]"> if you do that.
That said, I like the idea. Only, I think I've seen the same thing released a couple of days ago. Maybe I have hallucations, Idk
A string must be wrapped in single or double quotes.
When you call is_browser(ie), it looks for a constant IE. Because PHP is a very non-restrictive language, it then treats ie as a string, even though it is not; it will only display an error if E_NOTICE is enabled. But since vBulletin error reporting is E_ALL ^ E_NOTICE, you don't see the error.
The right way would be using is_browser('ie').
Quote:
Also, how would you suggest that I store the browsers then??
I would store browser information in the session table, because there it is temporary and deleted automatically when the user leaves the board.