Konstrukt::Plugin::hitstats - Hit statistics plugin
<!-- 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" / &>
<!-- display a counter for the current site -->
<& hitstats show="counter" / &>
<!-- with optional title attribute -->
<& hitstats show="counter" title="some page" / &>
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.
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 (determined by session)
hitstats/unique 0
#don't count hits by robots
hitstats/ignore_robots 1
#access control
hitstats/userlevel_view 1 #userlevel to view the stats
hitstats/userlevel_clear 2 #userlevel to clear the logs
Yes, this plugin may return dynamic nodes (i.e. template nodes).
Initializes this object. Sets $self->{backend} and $self->{template_path}layout/. init will be called by the constructor.
Installs the templates.
Parameters:
none
Prepare method
Parameters:
All the work is done in the execute step.
Parameters:
Logs a hit.
Parameters:
Displays the results of the hit logging.
Parameters:
all, year, month and day. Should not be finer than the setting hitstats/aggregateDisplays a simple counter for the specified page. Won't show if the user doesn't have the needed user level.
Parameters:
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.
Konstrukt::Plugin::hitstats::DBI, Konstrukt::Plugin, Konstrukt