Displays number of hits for certain objects
Tags:
plugin
Plugin Object Hits
This Wiki Plugin will display the number of hits for a wiki page, article, image gallery, file gallery and individual images or files in a gallery. The total number of hits can be displayed or the number of hits over the past x number of days.Table of contents
Usage and Parameters
To use this plugin in a wiki page, use the syntax:Syntax for the OBJECTHITS plugin
{OBJECTHITS(object=> ,type=> ,days=> ) /}| Parameter | Accepted values | Default | Effect | Required? | Since |
|---|---|---|---|---|---|
| object | for a wiki page: the page name for all others (see type parameter and note about file galleries below): ID number + ? + object title |
the wiki page where the plugin is used | Identifies the object that the hits relate to | n | |
| type | wiki, article, image, file, image gallery, file gallery | wiki | Identifies the type of object | n | |
| days | numeric | 0 | The default is to show total hits for the object since it was created. Setting this parameter above 0 will cause the number of hits for that number of past days to be shown. For example, if set to 4, the total of the hits over the last 4 days for the object will be displayed. | n |
The plugin works differently for file galleries than described above:
- Prior to version 3.0
- The ID number that will work in the object parameter may be different than the actual ID number for a file gallery (sometimes it's "-1"). You would need to look in the tiki_stats MySQL database table on the server where TikiWiki is installed to see what number to use.
- With version 3.0
- Only the hits for the top level File Galleries can be displayed, and this is done by setting the object parameter to "0?" and the type parameter to "file gallery" (both without the quotes). The result is essentially the number of hits for the List Galleries page.
Examples
|
This code, Example with no parameters set {OBJECTHITS() /} |
|
Would produce on this site (total hits for this page): 2173 |
|
This code, Another wiki page and days used {OBJECTHITS(object=HomePage, days=30) /} |
|
Would produce on this site (hits on HomePage for the past 30 days): 43668 |
|
This code, Hits for an article {OBJECTHITS(object=19?News from doc.tw.o!, type=article) /} |
|
Would produce on this site (total hits on article ID 19, titled News from doc.tw.o!): 1496 |
Related pages
Contributors to this page: lindon
.
Page last modified on Sunday 07 June, 2009 19:10:29 UTC by lindon
.
Sidebar
Sidebar
To register
To have an account at this site, please register at Tikiwiki.org
, and then use that user name and password to log in here.
