Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2008, 10:58 PM
Gene Steinberg Gene Steinberg is offline
 
Join Date: Dec 2006
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Display Browser Information?

I did a search of the usual text strings here and failed to turn up anything.

Is there an add-on/hack/whatever that allows you to display information about what browser/OS the member is using as part of the information that's displayed in their messages?

I'd want a vBulletin 3.7x compatible solution.

Anyone?
Reply With Quote
  #2  
Old 07-18-2008, 06:58 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can use the user agent string - but don't trust it.
Reply With Quote
  #3  
Old 07-18-2008, 07:52 AM
Gene Steinberg Gene Steinberg is offline
 
Join Date: Dec 2006
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
You can use the user agent string - but don't trust it.
What and how?
Reply With Quote
  #4  
Old 07-18-2008, 09:07 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll need some knowledge of PHP - if you do, Googling "user agent string php" will probably reveal some code examples.
Reply With Quote
  #5  
Old 07-18-2008, 10:51 AM
Gene Steinberg Gene Steinberg is offline
 
Join Date: Dec 2006
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
You'll need some knowledge of PHP - if you do, Googling "user agent string php" will probably reveal some code examples.
The reason I posted it here was to get just that information and the best way to implement it in vBulletin.

Anyone here want to really help me?

--------------- Added [DATE]1216398110[/DATE] at [TIME]1216398110[/TIME] ---------------

I do have some code now that I got online, as follows:

PHP Code:
<?php
echo ( browser_detection'number' ) .'<br>'
browser_detection'browser' ) .'<br>'.  
browser_detection'os' ) .'<br>'.  
browser_detection'os_number' ) ); 
?>

Outputs (browser version, browser, os, os number): 
1.5
moz
nt
5.1

<?php
if ( ( browser_detection'browser' ) == 'ie' 
&& 
browser_detection'number' ) >= ) )
{
echo 
'it is Internet Explorer ' 
browser_detection'number' );
// or anything else you want to happen of course
}
?>
OK, this goes in a postbit template? Which one? Where?

Will it do what I want?
Reply With Quote
  #6  
Old 07-19-2008, 03:59 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yuou cannot run PHP code in templates - yo need run PHP code in plugins. And furthermore - you need to capture this data as the user browses the website and store it. You cannot simply plonk that code in postbit and have the information magically appear for everyone.
Reply With Quote
  #7  
Old 07-19-2008, 03:14 PM
Gene Steinberg Gene Steinberg is offline
 
Join Date: Dec 2006
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Yuou cannot run PHP code in templates - yo need run PHP code in plugins. And furthermore - you need to capture this data as the user browses the website and store it. You cannot simply plonk that code in postbit and have the information magically appear for everyone.
So, then, when you implied otherwise in your original message, that wasn't quite correct. OK.

So how do we do it then. Anyone want to provide assistance rather than give me two sides of the coin?
Reply With Quote
  #8  
Old 07-19-2008, 04:00 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How did he imply anything. He stated you can use the user agent string to grab the data. WHICH IS TRUE. But you cannot simultaniously grab useragents of all people that have ever browsed the website and magically send them to all other people browsing the website to have them show up in the postbit. The data you gather needs to be stored somewhere so you can retrieve it to display later.
Reply With Quote
  #9  
Old 07-19-2008, 04:36 PM
Gene Steinberg Gene Steinberg is offline
 
Join Date: Dec 2006
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He said I should look on the Internet to find the PHP code, then said it wouldn't work as I wanted it to. I understand the limits.

How about a solution instead of an insult?
Reply With Quote
  #10  
Old 07-19-2008, 04:48 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not just create a Custom "User Profile Field", allow users to select their browser and then display that in postbit?

For Part 1: Check the AdminCP side Menu
For Part 2: see this thread add info to the right?
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 11:07 AM.


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.04361 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)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