2
#-----------------------------------------------------------------------------
3
# AWStats axample plugin
5
# THIS IS A SAMPLE OF AN EMPTY PLUGIN FILE WITH INSTRUCTIONS TO HELP YOU TO
6
# WRITE YOUR OWN WORKING PLUGIN. REPLACE THIS SENTENCE WITH THE PLUGIN GOAL.
7
# NOTE THAT A PLUGIN FILE example.pm MUST BE IN LOWER CASE.
9
#-----------------------------------------------------------------------------
10
# Perl Required Modules: Put here list of all required plugins
11
#-----------------------------------------------------------------------------
12
# $Revision: 1.10 $ - $Author: eldy $ - $Date: 2003/11/15 19:39:01 $
16
# ENTER HERE THE USE COMMAND FOR ALL REQUIRED PERL MODULES
17
#if (!eval ('require "TheModule.pm";')) { return $@?"Error: $@":"Error: Need Perl module TheModule"; }
19
use strict;no strict "refs";
23
#-----------------------------------------------------------------------------
25
#-----------------------------------------------------------------------------
27
# ENTER HERE THE MINIMUM AWSTATS VERSION REQUIRED BY YOUR PLUGIN
28
# AND THE NAME OF ALL FUNCTIONS THE PLUGIN MANAGE.
29
# EACH POSSIBLE FUNCTION AND GOAL ARE DESCRIBED LATER.
30
my $PluginNeedAWStatsVersion="5.6";
31
my $PluginHooksFunctions="xxx";
35
# IF YOUR PLUGIN NEED GLOBAL VARIABLES, THEY MUST BE DECLARED HERE.
43
#-----------------------------------------------------------------------------
44
# PLUGIN FUNCTION: Init_pluginname
45
#-----------------------------------------------------------------------------
48
my $checkversion=&Check_Plugin_Version($PluginNeedAWStatsVersion);
51
# ENTER HERE CODE TO DO INIT PLUGIN ACTIONS
52
debug("InitParams=$InitParams",1);
56
return ($checkversion?$checkversion:"$PluginHooksFunctions");
61
# HERE ARE ALL POSSIBLE HOOK FUNCTIONS. YOU MUST CHANGE THE NAME OF THE
62
# FUNCTION xxx_example INTO xxx_pluginname (pluginname in lower case).
63
# NOTE THAT IN PLUGINS' FUNCTIONS, YOU CAN USE ANY AWSTATS GLOBAL VARIALES.
66
#-----------------------------------------------------------------------------
67
# PLUGIN FUNCTION: AddHTMLStyles_pluginname
68
# UNIQUE: NO (Several plugins using this function can be loaded)
69
# Function called to Add HTML styles at beginning of BODY section.
70
#-----------------------------------------------------------------------------
71
sub AddHTMLStyles_example {
77
#-----------------------------------------------------------------------------
78
# PLUGIN FUNCTION: AddHTMLBodyHeader_pluginname
79
# UNIQUE: NO (Several plugins using this function can be loaded)
80
# Function called to Add HTML code at beginning of BODY section.
81
#-----------------------------------------------------------------------------
82
sub AddHTMLBodyHeader_example {
88
#-----------------------------------------------------------------------------
89
# PLUGIN FUNCTION: ShowInfoHost_pluginname
90
# UNIQUE: NO (Several plugins using this function can be loaded)
91
# Function called to add additionnal columns to the Hosts report.
92
# This function is called when building rows of the report (One call for each
93
# row). So it allows you to add a column in report, for example with code :
94
# print "<TD>This is a new cell</TD>";
95
# Parameters: Host name or ip
96
#-----------------------------------------------------------------------------
97
sub ShowInfoHost_hostinfo {
103
#-----------------------------------------------------------------------------
104
# PLUGIN FUNCTION: ShowPagesAddField_pluginname
105
# UNIQUE: NO (Several plugins using this function can be loaded)
106
# Function used to add additionnal columns to the Top Pages-URL report.
107
# This function is called when building rows of the report (One call for each
108
# row). So it allows you to add a column in report, for example with code :
109
# print "<TD>This is a new cell</TD>";
110
#-----------------------------------------------------------------------------
111
sub ShowPagesAddField_example {
117
#-----------------------------------------------------------------------------
118
# PLUGIN FUNCTION: ShowInfoURL_pluginname
119
# UNIQUE: NO (Several plugins using this function can be loaded)
120
# Function called to add additionnal information for URLs in URLs' report.
121
# This function is called after writing the URL value in the URL cell of the
122
# Top Pages-URL report.
124
#-----------------------------------------------------------------------------
125
sub ShowInfoURL_example {
131
#-----------------------------------------------------------------------------
132
# PLUGIN FUNCTION: ShowInfoUser_pluginname
133
# UNIQUE: NO (Several plugins using this function can be loaded)
134
# Function called to add additionnal columns to Authenticated users report.
135
# This function is called when building rows of the report (One call for each
136
# row). So it allows you to add a column in report, for example with code :
137
# print "<TD>This is a new cell</TD>";
139
#-----------------------------------------------------------------------------
140
sub ShowInfoUser_example {
147
1; # Do not remove this line