Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
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.
Attachments
88520-browser_check_1-3-0.zip (0 Bytes, 106 downloads)

Last edited by Dave_L; 07/11/2003 9:12 AM.
Sponsored Links
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
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?


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
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?

Joined: Jan 2003
Posts: 338
Enthusiast
Enthusiast
Offline
Joined: Jan 2003
Posts: 338
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

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
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.

Sponsored Links
Joined: Jan 2003
Posts: 338
Enthusiast
Enthusiast
Offline
Joined: Jan 2003
Posts: 338
If you creating sth for ubbthreads it should like as add for ubb. Of course, base of files could be utilize in any application

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Great Work Dave!

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

Joined: Jan 2003
Posts: 338
Enthusiast
Enthusiast
Offline
Joined: Jan 2003
Posts: 338
[]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 ???
Attachments
88700-Image2.jpg (0 Bytes, 37 downloads)

Last edited by JoshPet; 07/13/2003 3:19 PM.
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I put the browsercheck here - in the footer - for troubleshooting.
Thanks Dave!

Sponsored Links
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
In English it says "Submit Query"

Joined: Jul 2003
Posts: 2
Pug Offline
Lurker
Lurker
Offline
Joined: Jul 2003
Posts: 2
I would like to add the browser check to the bottom of the page also. What file would I have to modify?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You would place a link in ubbt_footer.tmpl

Joined: Jul 2003
Posts: 2
Pug Offline
Lurker
Lurker
Offline
Joined: Jul 2003
Posts: 2
Thanks Omegatron

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
No Problem


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)