docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 3.3Web Developer ManualInformation Tags
Copyright  2004, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com



<accessed>
<configurl>
<countdown>
<date>
<help>
<modified>
<number>
<roxen>
<user>

<accessed/>

Provided by module: Tags: Accessed counter

Generates an access counter that shows how many times the page has been accessed. A file, AccessedDB, in the logs directory is used to store the number of accesses to each page. By default the access count is only kept for files that actually contain an accessed-tag, but can also be configured to count all files of a certain type.


<accessed/>
17

Attributes

add="number"

Increments the number of accesses with this number instead of one, each time the page is accessed.


addreal

Prints the real number of accesses as an HTML comment. Useful if you use the cheat attribute and still want to keep track of the real number of accesses.


case="{upper, lower, capitalize}"

Sets the result to upper case, lower case or with the first letter capitalized.


cheat="number"

Adds this number of accesses to the actual number of accesses before printing the result. If your page has been accessed 72 times and you add <accessed cheat='100'> the result will be 172.


database

Works like the since attribute, but counts from the day the first entry in the entire accessed database was made.


factor="percent"

Multiplies the actual number of accesses by the factor. E.g. <accessed factor='50'> displays half the actual value.


file="filename"

Shows the number of times the page filename has been accessed instead of how many times the current page has been accessed. If the filename does not begin with "/", it is assumed to be a URL relative to the directory containing the page with the accessed tag. Note, that you have to type in the full name of the file. If there is a file named tmp/index.html, you cannot shorten the name to tmp/, even if you've set Roxen up to use index.html as a default page. The filename refers to the virtual filesystem.

One limitation is that you cannot reference a file that does not have its own <accessed> tag. You can use <accessed silent='1'> on a page if you want it to be possible to count accesses to it, but don't want an access counter to show on the page itself.


lang="langcodes"

Will print the result as words in the chosen language if used together with type=string.


<accessed type="string"/>
seventeen

<accessed type="string" lang="sv"/>
sjutton

per="{second, minute, hour, day, week, month, year}"

Shows the number of accesses per unit of time.


<accessed per="week"/>
0

prec="number"

Rounds the number of accesses to this number of significant digits. If prec=2 show 12000 instead of 12148.


reset

Resets the counter. This should probably only be done under very special conditions, maybe within an <if> statement. This can be used together with the file argument, but it is limited to files in the current- and sub-directories.


silent

Print nothing. The access count will be updated but not printed. This option is useful because the access count is normally only kept for pages with actual <access> on them. <accessed file='filename'> can then be used to get the access count for the page with the silent counter.


since

Inserts the date that the access count started. The language will depend on the lang attribute, default is English. All normal date related attributes can be used. Also see: <date>.


<accessed since="1"/>
September 2002

type="{number, string, roman, iso, discordian, stardate, mcdonalds, linus, ordered}"

Specifies how the count are to be presented. Some of these are only useful together with the since attribute.


<accessed type="roman"/>
XVII

<accessed since="1" type="iso"/>
2002-09-17T18:57:25

<accessed since="1" type="discordian"/>
Setting Orange, the 40th day of Bureaucracy

<accessed since="1" type="stardate"/>
37514.7

<accessed type="mcdonalds"/>
More than ten served.

<accessed type="linus"/>
17 since Tue Sep 17 18:57:25 2002

<accessed type="ordered"/>
17th

minlength="number"

Defines a minimum length the the resulting string should have. If it is shorter it is padded from the left with the padding value. Only values between 2 and 10 are valid.


padding="character"(0)

The padding that the minlength function should use.