Better Counter - Description
Better Counter - Description
Please read the chapter Usage
on the "Better Counter" homepage first. On this page you will find a detailled
description how to setup the counter for your homepage and answers to the
most frequently asked question as well as a forum for your questions.
This page describes all parameters of the script file that defines your homepage
structure. Some parameters might sound a little bit complicate when you first read it,
but it is easier than you expect by using the sample file "Counter.script" and by
playing around with the script file a little bit.
If this is too confusing or if you have problems with the HTML code and the script file
lines, you can also use the online form to generate your code. Please select the
"HTML code" option when you log on at the "Better Counter" homepage.
Introduction
First of all some general remarks about the script file:
- Keywords of functions and parameters are NOT case sensitive.
- All parameter values must be enclosed in double quotes.
- If a value is invalid, it is ignored or the default is used.
Keywords and Parameters
Every line starts with the keyword "ITEM" (a page of your homepage)
followed by the parameters of the item:
- url
The URL of the item relative to the base URL of your homepage as specified
in the profile settings of your counter. The value is e.g. "index.html" for
your homepage, or "java/applet1.html" for the page 'applet1.html' in subdirectory
'java'.
- ID
The logical name of the counter of this page. This was introduced to be
independent from the physical file name. You can e.g. use the filename without
extension.
- title
The name of the page as it should appear in the counter tree.
- inlinks
A list of logical counter names (as specified in the "ID" parameter, see above)
which have links to this page, seperated by commas. This parameter is used to define the tree items on the
right side of the centered items and may be different to the real links. Use this to
build a tree that is convenient for navigation.
- outlinks
A list of logical counter names (as specified in the "ID" parameter, see above)
to which this item links, seperated by commas. This parameter is used to define the tree items on the
left side of the centered items and may be different to the real links. Use this to
build a tree that is convenient for navigation.
- islink
Set the value of this parameter to "YES" (capital letters) if this
ITEM is not a page counter, but a counter for a link.
Example
The following example describes the script file that comes with the Counter.zip file.
The asumed homepage has a starting page (index.html), which has links to 3 other
pages (page1.html,page2.html,page3.html). page2.html has again two sub-pages
which are also available per links for the homepage, but belong from the topic
to page2.html. The starting page has a link back to "Better Counter".
The following script file reflects this homepage:
ITEM url="index.html" title="Homepage" ID="index" outlinks="page1,page2,page3,better"
ITEM url="page1.html" title="Page 1" ID="page1" inlinks="index"
ITEM url="page2.html" title="Page 2" ID="page2" inlinks="index" outlinks="page21,page22"
ITEM url="page21.html" title="Page 2-1" ID="page21" inlinks="page2"
ITEM url="page22.html" title="Page 2-2" ID="page22" inlinks="page2"
ITEM url="page3.html" title="Page 3" ID="page3" inlinks="index"
ITEM url="//www.better-counter.com/" title="Better Counter" ID="better" islink="YES" inlinks="index"
You should start by creating one ITEM line (exactly one ITEM per line) for
each page that you want to count. Set the "url" (relative to the homepage
directory that you have specified in your profile data), "title" and "ID"
(a logical ID for the counter of the page, the simplest name could be the
file name without extension).
The second step is to setup the connections.
Start with the "inlinks", which are the pages that link to the actual page.
The starting page has no "inlinks", page1,page2,page3 have a link from the
starting page, page21,page22 have a link from page2, the counter link is
on the starting page.
The next step is to define the "outlinks", which are the pages to which this
page links. In the example the starting page (index.html) links to its sub-pages
(page1,page2,page3). The starting page has also links directly to sub-pages of
page2, but for clarity reasons we specify them only as "outlinks" of page2.html.
The starting page has a link back to "Better Counter", and you want also
to count this link. Please note that the "url" of external links always
starts with the double slash (no http:). The "islink" parameter is set
to specify that this is not a page counter, but a link counter.
Take this example as basis, and change and extend the script file. You will
see that it is much easier than it looks like.