vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Display Browser Information? (https://vborg.vbsupport.ru/showthread.php?t=185638)

Gene Steinberg 07-17-2008 10:58 PM

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?

Dismounted 07-18-2008 06:58 AM

You can use the user agent string - but don't trust it.

Gene Steinberg 07-18-2008 07:52 AM

Quote:

Originally Posted by Dismounted (Post 1578227)
You can use the user agent string - but don't trust it.

What and how?

Dismounted 07-18-2008 09:07 AM

You'll need some knowledge of PHP - if you do, Googling "user agent string php" will probably reveal some code examples.

Gene Steinberg 07-18-2008 10:51 AM

Quote:

Originally Posted by Dismounted (Post 1578304)
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?

Dismounted 07-19-2008 03:59 AM

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.

Gene Steinberg 07-19-2008 03:14 PM

Quote:

Originally Posted by Dismounted (Post 1578848)
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?

RLShare 07-19-2008 04:00 PM

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.

Gene Steinberg 07-19-2008 04:36 PM

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?

RLShare 07-19-2008 04:48 PM

How is anyone insulting you?

Pointing out that what he said was right is insulting you?

How much more help do you want?
Write a plugin that gathers the info as the user is browsing the website and stores it in the database, write another plug-in that retrieves the data and display it accordingly.


All times are GMT. The time now is 04:48 AM.

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.01587 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_php_printable
  • (3)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