The uber geeks

Cam Status Detection Version 0.2

Written by Colin Devroe on Thursday, April 29th, 2004 at 2:54 am. Colin is the founder of ChanceCube and the Community Evangelist for Viddler.

Those of you using the Cam Status Detection Script, hahaha - who am I kidding nobody is using it, should be pleased to hear that a new version is completed and being released.

Version 0.2 has many new features, making it even easier to show your cam pic on your site, and let your users know whether or not the image is up-to-date. The new features include:

  • Function Based
  • Input allowed (FileName,Interval,Message On,Message Off,Icon,Msg)
  • Display Text Message
  • Switch between Icon only, Message Only, and Message & Icon display
  • Zoom Page Included
  • Include File Included

Function based is something I should have done on the outset, but originally I had only planned to use it for 1 camera image. However, I quickly saw the light and switched the script to be contained in a function that can be called from anywhere on a given page, and multiple times.

Input allowed, now allows for the user to customize various pieces of the script just by customizing the function call. The input chart is shown below for version 0.2:

  • FileName: This is the filename for the cam image.
  • Interval: The time-to-die if you will. How old should the image be before it’s considered “old”.
  • Message On: This is a text message to display, when status is On.
  • Message Off: This is a text message to display, when the status is Off.
  • Icon: Y or ” - which toggles the status icon display.
  • Msg: Y or ” - which toggles the status text message display.

Function call examples are included in the readMe.txt file.

Display Text Message now allows for a customized text message which appears when the Msg toggle is set to Y. This message also shows up as the title of the status icon, when the Icon is set to Y.

Switching between Icon, Message or both is now as easy as changing 2 letters. This ability is essential when wanted to call the same function for the zoom page as the thumbnail page.

A zoom page is included just as an example. This will also show you a specific function call which allows for both the Icon and Text Message to display.

Include file included now, so that you can just include the script into whatever site you might have. Much easier than copy/paste routines.

Note: This script also comes with the status icons for On and Off - by default they are put in a directory called wp-images - since that is the default image directory for WordPress, the CMS which I use for this site. To change that, small edits to the code will be needed.

Update: Version 0.3 Available Now.

Previous and next posts

« The cost of a dream

APC Vol. 2 »

Related sites

Recent features

Song of the week

Sara Bareilles - Between the Lines
Sara Bareilles' "Between the Lines" is the Song of the Week for April 20 to 26.

The Deal Log