![]() | Welcome to Islandnet.com Locally owned and operated since 1993 |
| Create an Account • Pricing & Features • Domain Registration • Customer Sites • Help & Info | |
Sunday May 11 2008 | |
CounterThe counter gadget is an M-Script II program that can be used to count accesses to a page. It can optionally display the current counter value in a variety of textual or graphical formats. You can even supply your own graphical digits to totally customize the display.You embed the counter in your web pages in one of two different ways depending on if you want graphical output or not. For hidden or textual output use this format:
<!--#exec cgi="/cgi-bin/ms2/LOGIN/counter?PARAMETERS" -->When you want a graphical display use this format:
<img src="/cgi-bin/ms2/LOGIN/counter?PARAMETERS">You would replace LOGIN with your own login name and PARAMETERS with a string of counter settings separated with an ampersand (&). For example, a simple hidden counter for the login "mark" that increments a value stored in the file named "www/example.count" would be included like this:
<!--#exec cgi="/cgi-bin/ms2/mark/counter?f=www/example&s=invisible" -->A textual display of the counter value could be done like this:
<!--#exec cgi="/cgi-bin/ms2/mark/counter?f=www/example" -->A textual counter with "th", "st", "nd", and "rd" siffixes would be done with text2 like this:
<!--#exec cgi="/cgi-bin/ms2/mark/counter?f=www/example&i=1&s=text2" -->And finally a graphical version could be done like this:
<img src="/cgi-bin/ms2/mark/counter?f=www/example&i=1&s=^strips/odometer.gif"> Parameters
Creating Digit StripsIf you want to use one of the sample digit strips above, all you have to do is use the same s parameter that is shown. The "^" at the start of the filename indicates that the file should be retrieved from a global area that all customers can access. Without a "^" the file is assumed to be in your own account. This allows you to provide your own digit strips to customize the look of the counter.A digit strip is a GIF image (you cannot use a JPG or any other image format as a digit strip). At a minimum it must consist of the ten digits 0 through 9 (in that order). Each digit must have the exact same height and width, and the overall image width must be perfectly divisible by 10 (or whatever value you specified with the N parameter). You may optionally add an ornamental border to the left and right sides of the image strip. If you do then you must also make use of the l and r parameters. The portion of the strip in the middle must be evenly divisible by 10 (or whatever value you specified with the N parameter). For example, here is the "odometer.gif" image strip, which has no ornamental borders:
And here is "big_red.gif", which has ornamental borders:
Click here to view all of available digit strips
|
| Home • About Us • Contact Us • Terms of Use • Privacy Policy • Help Documents |
| Page generation time: 0.02 seconds |