Displaying Graphic Counters with Custom Fonts
Introduction
Counters tabulate the number of visitor's to a page. However,
counters cannot determine unique visitors to a page (i.e, one
visitor may visit the page multiple times).
Text counter values appear as text
numbers. Graphic counter values appear as number graphics in
a specified font. MGI has six
internal fonts that may suits your needs, however if they
do not you can use custom number graphics for the graphic counter
values. If you don't want to create your own graphics, there
are tons of web sites that offer free sets of counter graphics
in every style that you can imagine.
In this example, a graphic counter with a custom font is added
to a web page.
MGI Tags
Steps
- Open a page in a text editor .
- Insert the mgiCounter tag.
- Save the page.
- Prepare the counter graphics.
- FTP the page and custom graphics to the web server running
MGI.
- View the page in a web browser.
Step 1: Open a page in a text editor.
- Open a web page in a text editing program that allows you
to view and modify the HTML and code of the page.
Step 2: Insert the mgiCounter tag.
- Enter the mgiCounter tag, name parameter, type parameter
and fontFolderLocation parameter where you want the counter value
to appear. In the name parameter, enter the unique counter name.
Counters are stored in an internal MGI database and values from
multiple counters with the same name are added to the same database
record. In the type parameter, enter "Graphic". In
the fontFolderLocation parameter, enter the relative path to
the folder that contains the custom graphics to display. In this
example, the counter graphics are stored in a folder named "CounterImages".
<mgiCounter name="index" type="Graphic"
fontFolderLocation="CounterImages">
Step 3: Save the page.
- Save the changes you have made to the page.
Step 4: Prepare the counter graphics.
- The custom counter graphics must be saved in GIF format and
named with the following syntax:
- 0.gif
- 1.gif
- 2.gif
- 3.gif
- 4.gif
- 5.gif
- 6.gif
- 7.gif
- 8.gif
- 9.gif
Step 5: FTP the page and custom graphics to the web server
running MGI.
- Upload the page and custom graphics from your local computer
to the web server using an FTP program.
Step 6: View the page in a web browser.
- View the page in a web browser. The counter value displays
in your custom font.
|