Waverider Systems
Perlshop 4 Page Counter DBI Package Version 1.1
Contents
This plugin requires Perlshop 4.2.06 or later, and is intended for
use by customers that already have the PSDBI package installed.
Database tables used by this plugin:
The psdbi.cfg file is used by this plugin to connect to the default
database. All page counter data is stored in a table called
'ps_page_count'. This table is expected to have the following form:
create table ps_page_count
(
page varchar(40),
count integer,
last varchar(40)
)
Column 'page' contains the name of the html file.
Column 'count' contains the number of times that page has been loaded.
Column 'last' contains the date and time this page was last loaded.
- Place the ps_plugin_counter_dbi.pl file into the same web server directory as your perlshop.cgi file.
- Give the ps_plugin_counter_dbi.pl file the same file permissions as your perlshop.cgi file.
- Add the counter plugin to the plugin registration table in your ps.cfg file.
Example plugin registration table before adding the counter plugin:
%plugins =
(
# Calendar example plugin
'calendar' =>
{
'program' => 'ps_plugin_gencal.pl'
}
);
Example plugin registration table after adding the counter plugin:
%plugins =
(
# Calendar example plugin
'calendar' =>
{
'program' => 'ps_plugin_gencal.pl'
},
# PSDBI Page Counter plugin
'page_counter' =>
{
'program' => 'ps_plugin_counter_dbi.pl',
'event' => 'after_page_load'
}
);
The database table can be created from the web server command line using this command:
ps_plugin_counter_dbi.pl create
Once created, this table can be cleared from the web server command line using this command:
ps_plugin_counter_dbi.pl clear
- Place the PSO_PageCounter.pm file into the same web server directory as your psoffice.cgi file.
- Give this file the same permissions as your perlshop.cgi file.
- Add the Perlshop Office Page Counter DBI plugin to the plugin registration table in your pso.cfg file.
%office_tool_plugins =
(
# Page Hit report
'page_hit_report' =>
{
'label' => 'Page Hit Report',
'module' => 'PSO_PageCounter.pm'
}
);
Once installed, the tools supplied with this Office Plugin will be displayed in the Tools menu of Perlshop Office.
Page Hit Report
This report displays the number of hits made to each page on your web site.
Data can be sorted by Page Name, Hit Count, or Last Hit Time.