vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Display OS and Browser Information on Postbit (https://vborg.vbsupport.ru/showthread.php?t=219687)

Fighter1405 07-28-2009 10:00 PM

Display OS and Browser Information on Postbit
 
1 Attachment(s)
Hey all,

First plugin, so I hope I'm doing this right! As requested here, it'll display a small icon for both the users operating system and browser on the postbit.

Install steps:
1. Upload the Product
2. upload icon images for each os/browser to images/useragent in the form icon_(browser/os).gif - Sample Icons attached

Thanks to this mybb mod for the sample images and some of the browser detection code.

Screenshot:
http://img18.imageshack.us/img18/738/browsershow.jpg

Thanks and let me know if you have any problems!

Deceptor 07-29-2009 12:44 AM

Nice for a first modification :) I'd suggest the following change so it doesn't clash/break other mods:
Code:

$hook_query_joins = "LEFT JOIN " . TABLE_PREFIX . "postinfo AS postinfo ON (post.postid=postinfo.postid)";
$hook_query_fields = ", postinfo.browser AS browser, postinfo.OS as OS";

To:
Code:

$hook_query_joins .= "LEFT JOIN " . TABLE_PREFIX . "postinfo AS postinfo ON (post.postid=postinfo.postid)";
$hook_query_fields .= ", postinfo.browser AS browser, postinfo.OS as OS";

Basically change = to .= :)

Fighter1405 07-29-2009 12:49 AM

Thanks for the feedback :) I made the change you suggested, makes sense to me :)

erel34 07-29-2009 01:33 AM

Thanks to all

KevinL 07-29-2009 01:35 AM

Nice mod...but how many queries will this add?

bollie 07-29-2009 05:14 AM

Work not for me.
Show not icon_(browser/os).gif

dartho 07-29-2009 07:03 AM

Quote:

Originally Posted by KevinL (Post 1857582)
Nice mod...but how many queries will this add?

Looks like it will add a single query when a post is created.

onlyfree 07-29-2009 09:42 AM

hey nice feature,
but is there a chance to get the possebility for users to turn on/off these icons?

Farman 07-29-2009 10:39 AM

Not working here even, Please give proper instruction, where to upload!

Fighter1405 07-29-2009 10:50 AM

Quote:

Originally Posted by bollie (Post 1857682)
Work not for me.
Show not icon_(browser/os).gif

Quote:

Originally Posted by Farman (Post 1857763)
Not working here even, Please give proper instruction, where to upload!

An example icon name would be "icon_firefox.gif" and that should be in the images/useragent folder, what do you have in that folder?

Quote:

Originally Posted by dartho (Post 1857701)
Looks like it will add a single query when a post is created.

That is correct, it loads the information back through the use of a left join so no extra queries are needed on showthread.

Quote:

Originally Posted by onlyfree (Post 1857742)
hey nice feature,
but is there a chance to get the possebility for users to turn on/off these icons?

You'd like it turned off on a post by post basis or for the user to set it globally on the UCP?


All times are GMT. The time now is 03:19 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
  • Page Generation 0.01365 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete