Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Browser on Who's Online Details »»
Browser on Who's Online
Version: 1.0.2, by derekivey derekivey is offline
Developer Last Online: Jan 2010 Show Printable Version Email this Page

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.
This was a hack request by ReadOrDie.

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 If you installed this hack.

Thanks!

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-29-2005, 08:45 PM
Impreza04 Impreza04 is offline
 
Join Date: Jul 2005
Location: UK
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow.. nice idea

I'll give this a go in a minute
Reply With Quote
  #3  
Old 12-29-2005, 08:51 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 12-29-2005, 08:58 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 12-29-2005, 09:02 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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??
Reply With Quote
  #6  
Old 12-29-2005, 09:06 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
What do you mean it treats them as constants?
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.
Reply With Quote
  #7  
Old 12-29-2005, 09:12 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I fixed the first thing. I'll take a look at the rest later. I uploaded a new zip file.
Reply With Quote
  #8  
Old 12-29-2005, 09:20 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice. Also, you can get a list of all vbulletin-detectable browser from the is_browser function itself

PHP Code:
        $is = array(
            
'opera' => 0,
            
'ie' => 0,
            
'mozilla' => 0,
            
'firebird' => 0,
            
'firefox' => 0,
            
'camino' => 0,
            
'konqueror' => 0,
            
'safari' => 0,
            
'webkit' => 0,
            
'webtv' => 0,
            
'netscape' => 0,
            
'mac' => 0
        
); 
Reply With Quote
  #9  
Old 12-29-2005, 09:21 PM
swa swa is offline
 
Join Date: Apr 2005
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice idea!
Reply With Quote
  #10  
Old 12-29-2005, 09:46 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, zip file has been updated. I changed addslashes to $db->escape_string.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04543 seconds
  • Memory Usage 2,299KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete