![]() |
Browser on Who's Online
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:
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. Please click https://vborg.vbsupport.ru/ If you installed this hack. Thanks! |
Wow.. nice idea
I'll give this a go in a minute :) |
Thanks, let me know if you have any problems. I tested it on my public site and my test board and it works for me.
|
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 :( |
What do you mean it treats them as constants? Can I see an example of what you mean please?
Also, how would you suggest that I store the browsers then?? |
Quote:
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:
|
Ok, I fixed the first thing. I'll take a look at the rest later. I uploaded a new zip file.
|
Nice. Also, you can get a list of all vbulletin-detectable browser from the is_browser function itself :)
PHP Code:
|
nice idea!
|
Ok, zip file has been updated. I changed addslashes to $db->escape_string.
|
All times are GMT. The time now is 04:02 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|