NAME
Konstrukt::Plugin::hitstats - Hit statistics plugin
SYNOPSIS
<!-- count hit. use the specified title -->
<& hitstats title="some page" / &>
<!-- count hit. use the current filename as title -->
<& hitstats / &>
<!-- display the overall top sites -->
<& hitstats show="all" / &>
<!-- display the top sites grouped by year -->
<!-- month and day will also work, if the data is stored in such a fine granularity -->
<!-- the display aggregation should not be finer than the setting hitstats/aggregate -->
<& hitstats show="year" / &>
<!-- only display the top 20 sites -->
<& hitstats show="all" limit="20" / &>
<!-- with optional title attribute -->
<& hitstats show="counter" title="some page" / &>
<!-- display a counter and use the filename of the current page as the title -->
<& hitstats show="counter" / &>
DESCRIPTION
Creates statistics about the number of hits of your homepage.
You may simply integrate it by putting the tag into your page. See </SYNOPSIS> for details.
CONFIGURATION
You may do some configuration in your konstrukt.settings to let the plugin know where to get its data and which layout to use. Defaults:
#backend
hitstats/backend DBI
See the documentation of the backend modules (e.g. "CONFIGURATION" in Konstrukt::Plugin::hitstats::DBI) for their configuration.
#granularity
hitstats/aggregate all #specifies the granularity of the logs. may be all, year, month, day
#layout
hitstats/template_path /templates/hitstats/
#only count unique visitors per page (determined by session)
hitstats/unique 0
#don't count hits by robots
hitstats/ignore_robots 1
#access control
hitstats/userlevel_view 2 #userlevel to view the stats
hitstats/userlevel_clear 3 #userlevel to clear the logs
METHODS
execute_again
Yes, this plugin may return dynamic nodes (i.e. template nodes).
init
Initializes this object. Sets $self->{backend} and $self->{template_path}layout/. init will be called by the constructor.
install
Installs the templates.
Parameters:
none
prepare
Prepare method
Parameters:
$tag - Reference to the tag (and its children) that shall be handled.
execute
All the work is done in the execute step.
Parameters:
$tag - Reference to the tag (and its children) that shall be handled.
hit
Logs a hit.
Parameters:
$title - The title of the page to log. (optional) If not defined, the filename of the current page will be used.
show_stats
Displays the results of the hit logging.
Parameters:
$aggregate - The range over which the hits should be aggregated. May be
all
,year
,month
andday
. Should not be finer than the settinghitstats/aggregate
$limit - Max. number of returned entries.
show_counter
Displays a simple counter for the specified page.
Parameters:
$title - The title of the page
AUTHOR
Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.
This document is free software. It is distributed under the same terms as Perl itself.
SEE ALSO
Konstrukt::Plugin::hitstats::DBI, Konstrukt::Plugin, Konstrukt