Knowledgebase: cPanel General Questions
How to add a counter to your website?
Posted by Administrator on 20 September 2005 09:17 PM
1. Log in to your Cpanel account.|
2. Click the icon for "Cgi Center".
3. Click "Counter" (about halfway down)
You will now be presented with several options.
Select the radio button labeled Counter on the top line.
// Time Settings
Select your time zone:
Eastern Time: GMT -0500
Central Time: GMT -0600
Mountain Time: GMT -0700
Pacific Time: GMT -0800
Leave TimeFormat at 12, unless you prefer the times to be displayed in 24-hour (military) time.
Likewise, it is probably best to leave Date Format at MMDDYYYY, unless you prefer the European styles
to display dates in alternate formats.
// Aesthetics - Set these to your preference.
Frame thickness refers to the width of the box that surrounds the counter. Set this to your preference.
On the next line,you will see Frame Color, and boxes marked Red, Green, and Blue.
These numbers correspond to a color code, that will be the color of the box around your counter.
Most graphics programs, such as Adobe Photoshop, will display the Red/Green/Blue (RGB) values for as given color.
If you prefer to use HTML formatted hexadecimal colors (such as #FFFFFF for white), you may convert them in the following manner:
In this example, use the color #374066, a dark blue.
1. Take the first two numbers/letters, ignoring the #. In our example, we want 37.
2. Run the Calculator program included with Windows by
going to the Start Menu, clicking Programs, then
Accessories, then Calculator. Go to the View tool menu and
ensure that Scientific is selected.
3. Click on the radio button marked Hex, directly below the
white text box on the far upper left of the calculator. Type in the first two characters of the color, in this case, 37.
4. Click the Dec radio button, immediately to the right of
the Hex button. The text in the box will change, In our
example, you should see 55.
5. Type this new value into the box marked Red.
6. Repeat steps 3-5 for the middle two characters (40 in our example), putting that in the Green box.
7. Repeat steps 3-5 again for the final two characters (66
in our example), putting that in the Blue box.
Max Digits refer to the decimal places your counter will display.
The default is 5, which will show up to 99,999 hits to your site.
Style refers to the visual appearance of your counter. Click "See Styles" to view a picture of each style, and then enter the corresponding letter of the style you prefer in the Style pulldown menu. (You can close the popup style window with no effect to the rest of the process)
Color Replacer is an advanced feature, to be used to change any one color in the counter style from one color to another. To do this, you must enter the EXACT color to replace (using the techniques described in steps 3-5 above), and then enter the EXACT color to replace it with, using the same method.
Under Counter Name, you will be given a default value of your Cpanel login name. It is best to change this name to the name of your domain, without the extension (.com, .net, etc.) If you were setting up a counter on affordablehost.com, you should enter 'affordablehost'. (without the 'quotes', of course.)
By clicking Preview, you can view what your counter will look like.
If you like it, click Make HTML. This will display a line of HTML code at the bottom of the page. Simply copy and paste that line of code into your HTML page, and your counter will be ready!
// To change the displayed value of a counter you've already set up...
1. Log in to your CPanel account.
2. Click the icon labeled 'Cgi Center'.
3. Click 'Counter' (about halfway down)
Down at the bottom of the page that appears, you will notice two boxes and the heading "Edit/Reset a Counter".
Simply enter the name of the counter (which will either be your Cpanel login name, or the name of your domain without the extension if you followed the advice above) in the Counter Name box.
In the New Count box, simply enter the number you want the counter to display, and click Commit Changes.
Your counter will now display whatever value you select!