-# AWSTATS CONFIGURE FILE 6.0
+# AWSTATS CONFIGURE FILE 6.2
#-----------------------------------------------------------------------------
# Copy this file into awstats.www.mydomain.conf and edit this new config file
# to setup AWStats (See documentation in docs/ directory).
# contains data of several virtual web servers. AWStats
# will discard records not in SiteDomain nor HostAliases
# %cluster If log file is provided from several computers (merged by
-# logresolvemerge.pl), this tag define field of cluster id.
+# logresolvemerge.pl), use this to define cluster id field.
+# %extraX Another field that you plan to use for building a
+# personalized report with ExtraSection feature (See later).
# If your log format has some fields not included in this list, use:
-# %other Means another field not used
+# %other Means another not used field
+# %otherquot Means another not used double quoted field
#
# Examples for Apache combined logs (following two examples are equivalent):
# LogFormat = 1
# ExtraSectionCodeFilterX is list of codes the record code field must match.
# Put an empty string for no test on code.
# ExtraSectionConditionX are conditions you can use to count or not the hit,
-# Use one of the field condition (URL,QUERY_STRING,REFERER,UA,HOST)
+# Use one of the field condition (URL,QUERY_STRING,REFERER,UA,HOST,extraX)
# and a regex to match, after a coma. Use "||" for "OR".
# ExtraSectionFirstColumnTitleX is the first column title of the chart.
-# ExtraSectionFirstColumnValuesX is a Regex string to tell AWStats in which
-# field to extract value from (URL,QUERY_STRING,REFERER,UA,HOST)
+# ExtraSectionFirstColumnValuesX is a string to tell AWStats which field to
+# extract value from (URL,QUERY_STRING,REFERER,UA,HOST,extraX)
# and how to extract the value (using regex syntax). Each different value
# found will appear in first column of report on a different row. Be sure
# that list of different possible values will not grow indefinitely.
$QueryString $SiteConfig $StaticLinks $PageCode $PageDir $PerlParsingFormat $UserAgent
$pos_vh $pos_host $pos_logname $pos_date $pos_tz $pos_method $pos_url $pos_code $pos_size
$pos_referer $pos_agent $pos_query $pos_gzipin $pos_gzipout $pos_compratio
-$pos_cluster $pos_emails $pos_emailr $pos_hostr
+$pos_cluster $pos_emails $pos_emailr $pos_hostr @pos_extra
/;
$DIR=$PROG=$Extension='';
$Debug = $ShowSteps = 0;
$pos_vh = $pos_host = $pos_logname = $pos_date = $pos_tz = $pos_method = $pos_url = $pos_code = $pos_size = -1;
$pos_referer = $pos_agent = $pos_query = $pos_gzipin = $pos_gzipout = $pos_compratio = -1;
$pos_cluster = $pos_emails = $pos_emailr = $pos_hostr = -1;
+@pos_extra=();
# ----- Plugins variable -----
use vars qw/ %PluginsLoaded $PluginDir $AtLeastOneSectionPlugin /;
%PluginsLoaded=();
$PerlParsingFormat .= "([^$LogSeparatorWithoutStar]+)";
}
}
+ # Extra tag
+ elsif ($f =~ /%extra(\d+)$/) {
+ $pos_extra[$1] = $i; $i++; push @fieldlib, "extra$1";
+ $PerlParsingFormat .= "([^$LogSeparatorWithoutStar]+)";
+ }
# Other tag
elsif ($f =~ /%other$/) {
$PerlParsingFormat .= "[^$LogSeparatorWithoutStar]+";
foreach (split(/&/,$standalonequery)) {
if ($_ =~ /^screen=(\d+)x(\d+)/i) { $foundparam++; $_screensize_h{"$1x$2"}++; next; }
#if ($_ =~ /cdi=(\d+)/i) { $foundparam++; $_screendepth_h{"$1"}++; next; }
- if ($_ =~ /^nojs=(\w+)/i) { $foundparam++; if ($1 eq 'y') { $_misc_h{"JavaScriptDisabled"}++; } next; }
+ if ($_ =~ /^nojs=(\w+)/i) { $foundparam++; if ($1 eq 'y') { $_misc_h{"JavascriptDisabled"}++; } next; }
if ($_ =~ /^java=(\w+)/i) { $foundparam++; if ($1 eq 'true') { $_misc_h{"JavaEnabled"}++; } next; }
if ($_ =~ /^shk=(\w+)/i) { $foundparam++; if ($1 eq 'y') { $_misc_h{"DirectorSupport"}++; } next; }
if ($_ =~ /^fla=(\w+)/i) { $foundparam++; if ($1 eq 'y') { $_misc_h{"FlashSupport"}++; } next; }
if ($Debug) { debug(" Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_host]'",5); }
if ($HostResolved =~ /$conditiontypeval/) { $conditionok=1; last; }
}
+ elsif ($conditiontype =~ /extra(\d+)/i) {
+ if ($Debug) { debug(" Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_extra[$1]]'",5); }
+ if ($field[$pos_extra[$1]] =~ /$conditiontypeval/) { $conditionok=1; last; }
+ }
else { error("Wrong value of parameter ExtraSectionCondition$extranum"); }
}
if (! $conditionok && @{$ExtraConditionType[$extranum]}) { next; } # End for this section
elsif ($rowkeytype eq 'HOST') {
if ($HostResolved =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
}
+ elsif ($rowkeytype =~ /extra(\d+)/i) {
+ if ($field[$pos_extra[$1]] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+ }
else { error("Wrong value of parameter ExtraSectionFirstColumnValues$extranum"); }
}
if (! $rowkeyok) { next; } # End for this section
if (scalar keys %{'_section_' . $extranum . '_h'} > $ExtraTrackedRowsLimit) {
error(<<END_ERROR_TEXT);
The number of values found for extra section $extranum has grown too large.
-In order prevent awstats from using an excessive amount of memory, the number
+In order to prevent awstats from using an excessive amount of memory, the number
of values is currently limited to $ExtraTrackedRowsLimit. Perhaps you should consider
revising extract parameters for extra section $extranum. If you are certain you
want to track such a large data set, you can increase the limit by setting
print "<th width=\"100\"> </th>";
print "<th width=\"100\"> </th>";
print "</tr>\n";
- my %label=('AddToFavourites'=>$Message[137],'JavaScriptDisabled'=>$Message[168],'JavaEnabled'=>$Message[140],'DirectorSupport'=>$Message[141],
+ my %label=('AddToFavourites'=>$Message[137],'JavascriptDisabled'=>$Message[168],'JavaEnabled'=>$Message[140],'DirectorSupport'=>$Message[141],
'FlashSupport'=>$Message[142],'RealPlayerSupport'=>$Message[143],'QuickTimeSupport'=>$Message[144],
'WindowsMediaPlayerSupport'=>$Message[145],'PDFSupport'=>$Message[146]);
foreach my $key (@MiscListOrder) {