UBB.Dev
Mod Name / Version: Browser Check 1.3.0

Description: This is a standalone script that checks whether the user's browser supports various features used by UBB.threads, and displays the results.

The idea is that if a user if having a problem using UBB.threads, he can run this script to help isolate the problem.

The following client-side features are tested:
Cookies - Cookies can be set and read.
Referrer - The URL of the referring page can be read.
Javascript - Javascript within a web page can be executed.
Javascript read cookie - Cookies can be read using Javascript.
Javascript set cookie - Cookies can be set using Javascript.
Clock - The server and client clocks agree within a specified tolerance.

Working Under: UBB.Threads 6.0-6.1-6.2-6.3

Mod Status: Finished

Any pre-requisites:

Author(s): Dave_L

Date: 07/10/03

Credits:

Files Altered:

New Files: browser_check.php
browser_check.inc.php

Database Altered: No

Info/Instructions: I recommend placing the two files in their own directory, which may be anywhere within the web document tree.

On my server, I placed them in /etc/browser_check/, and added a link to browser_check.php in the header for my feedback/help forum: If you're having problems logging in, making posts, etc., it could be because your browser or firewall settings are too restrictive. This Browser Check may help isolate the problem.

Edit: attachment updated to version 1.0.1 - made downward-compatible with PHP 4.0

Edit: attachment updated to version 1.1.0 - added Javascript cookie tests and clock test, and added a separate configuration file.[i]

[i]Edit: attachment updated to version 1.2.0 - split single referrer test into three tests, changed clock difference display to use appropriate time units, added a few parameters to configuration file.


Edit: attachment updated to version 1.2.1 - Fixed clock difference display to use appropriate time units for negative values.

Edit: attachment updated to version 1.3.0 - Added link to Infopop's Browser Problems article on test results page.

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attached File
88520-browser_check_1-3-0.zip  (106 downloads)
Thanks for the update. Is there any easy way that you know of to add java to this, for those of us, who run chat rooms?
Hmmmm ... I haven't thought about that.

If you can suggest a way of checking whether the browser supports Java applets, I could probably incorporate that.

The way the Javascript check works is that the Javascript sets a form field value, and then the (PHP) script checks whether the field was set.

Would it be possible to write a trivial Java applet that does something similar?
Posted By: Slawek_L design for ubbthreads [6.0-6.3] - 07/11/2003 6:20 PM
Description:
You must edit browser_check.php file.
After <? add:
Code
 <br />   require ("main.inc.php"); <br />  $html = new html; <br />  $html -> send_header("Browser Check",$Cat,0,""); <br />  $html -> table_header("Browser Check"); <br />  $phpurl = $config['phpurl']; <br />echo <<<END <br /><table width='{$theme['tablewidth']}' align='center' cellpadding='1' cellspacing='1' class='tablesurround'> <br /><tr> <br /><td> <br /><table cellpadding='{$theme['cellpadding']}' cellspacing='{$theme['cellspacing']}' width="100%' class="tableborders'> <br /><tr> <br /><td class='tdheader'> <br />END; <br />

------------
------------
At the end of file, before ?> add:
Code
 <br />echo <<<END <br /></td> <br /></tr> <br /></table> <br /></td> <br /></tr> <br /></table> <br />END; <br />  $html -> send_footer(); <br />


Demo: http://zlosnik.pl/browser_check.php
Posted By: Dave_L_dup1 Re: design for ubbthreads [6.0-6.3] - 07/11/2003 6:44 PM
Just noting that Slawek_L's modification embeds the Browser Check into a UBB.threads page by adding the header and footer.

I could incorporate that into the hack, maybe as an option in case you wanted to use the hack with a non-threads application.
Posted By: Slawek_L Re: design for ubbthreads [6.0-6.3] - 07/11/2003 6:49 PM
If you creating sth for ubbthreads it should like as add for ubb. Of course, base of files could be utilize in any application
Posted By: AKD96 Re: design for ubbthreads [6.0-6.3] - 07/11/2003 10:11 PM
Great Work Dave!

I've integrated this with my contactus.php file at my site. http://www.drumlines.org/threads/contactus.php
Posted By: Slawek_L Re: design for ubbthreads [6.0-6.3] - 07/13/2003 3:05 PM
[]DLWebmaestro said:
Great Work Dave!

I've integrated this with my contactus.php file at my site. http://www.drumlines.org/threads/contactus.php [/]

Could you tell me what it's mean ???

Attached picture 88700-Image2.jpg
Posted By: omegatron Re: design for ubbthreads [6.0-6.3] - 07/13/2003 3:13 PM
What he means if you look at his picture of contactus is he put a link in the template to browser check. I did much the same thing but added a table row to my HOW DO I forum up top to display the browser check link.
Posted By: JoshPet Re: design for ubbthreads [6.0-6.3] - 07/13/2003 9:29 PM
I put the browsercheck here - in the footer - for troubleshooting.
Thanks Dave!
Posted By: AKD96 Re: design for ubbthreads [6.0-6.3] - 07/15/2003 1:28 AM
In English it says "Submit Query"
Posted By: Pug Re: design for ubbthreads [6.0-6.3] - 07/26/2003 11:01 PM
I would like to add the browser check to the bottom of the page also. What file would I have to modify?
Posted By: omegatron Re: design for ubbthreads [6.0-6.3] - 07/26/2003 11:27 PM
You would place a link in ubbt_footer.tmpl
Posted By: Pug Re: design for ubbthreads [6.0-6.3] - 07/27/2003 1:22 AM
Thanks Omegatron
Posted By: omegatron Re: design for ubbthreads [6.0-6.3] - 07/27/2003 1:36 AM
No Problem
© UBB.Developers