- Add percent column for file types.
- Some changes to make AWStats to be XML compliant ready.
Need to set the new parameter UseXMLForOutput to 1 in config file.
+- Can use UA and HOST fields to build personalized ExtraSection reports.
Other/Documentation:
- Prepare code for decodeUTFkeys plugin.
<br># In most cases, you don't need this feature.
<br>#
<br># ExtraSectionNameX is title of your personalized chart.
-<br># ExtraSectionConditionalX are conditions on URL and/or QUERY_STRING and/or
-<br># REFERER you can use to count or not the hit. Use "|" for "OR".
+<br># ExtraSectionConditionalX are conditions you can use to count or not the hit,
+<br># Use one of the field condition (URL, QUERY_STRING, REFERER, UA, HOST)
+<br># and string to match after a coma. Use "|" for "OR".
<br># ExtraSectionFirstColumnTitleX is the first column title of the chart.
-<br># ExtraSectionFirstColumnValuesX is a Regex string to tell AWStats how to
-<br># extract the value used for first column. Each different value found will
-<br># be a different row. Be sure that list of different values is "limited" to
-<br># avoid "not enough memory" problems !
+<br># ExtraSectionFirstColumnValuesX is a Regex string to tell AWStats in which
+<br># field to extract value from (URL, QUERY_STRING, REFERER, UA, HOST) and how
+<br># to extract the value. Each different value found will appear in first
+<br># column of report on a different row. Be sure that list of different values
+<br># is "limited" to avoid "not enough memory" problems !
<br># ExtraSectionFirstColumnFormatX is the string used to write value.
<br># ExtraSectionStatTypesX are things you want to count. You can use standard
<br># code letters (P for pages,H for hits,B for bandwidth,L for last access).
# In most cases, you don't need this feature.
#
# ExtraSectionNameX is title of your personalized chart.
-# ExtraSectionConditionalX are conditions on URL and/or QUERY_STRING and/or
-# REFERER you can use to count or not the hit. Use "|" for "OR".
+# ExtraSectionConditionalX are conditions you can use to count or not the hit,
+# Use one of the field condition (URL, QUERY_STRING, REFERER, UA, HOST)
+# and string 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 how to
-# extract the value used for first column. Each different value found will
-# be a different row. Be sure that list of different values is "limited" to
-# avoid "not enough memory" problems !
+# ExtraSectionFirstColumnValuesX is a Regex string to tell AWStats in which
+# field to extract value from (URL, QUERY_STRING, REFERER, UA, HOST) and how
+# to extract the value. Each different value found will appear in first
+# column of report on a different row. Be sure that list of different values
+# is "limited" to avoid "not enough memory" problems !
# ExtraSectionFirstColumnFormatX is the string used to write value.
# ExtraSectionStatTypesX are things you want to count. You can use standard
# code letters (P for pages,H for hits,B for bandwidth,L for last access).
if ($Debug) { debug(" Check condition '$conditiontype' must contain '$conditiontypeval' in $field[$pos_referer]",5); }
if ($field[$pos_referer] =~ m/$conditiontypeval/) { $conditionok=1; last; }
}
+ elsif ($conditiontype eq 'UA') {
+ if ($Debug) { debug(" Check condition '$conditiontype' must contain '$conditiontypeval' in $field[$pos_ua]",5); }
+ if ($field[$pos_ua] =~ m/$conditiontypeval/) { $conditionok=1; last; }
+ }
+ elsif ($conditiontype eq 'HOST') {\r
+ if ($Debug) { debug(" Check condition '$conditiontype' must contain '$conditiontypeval' in $field[$pos_host]",5); }\r
+ if ($HostResolved =~ m/$conditiontypeval/) { $conditionok=1; last; }\r
+ }\r
else { error("Wrong value of parameter ExtraSectionCondition$extranum"); }
}
if (! $conditionok && @{$ExtraConditionType[$extranum]}) { next; } # End for this section
elsif ($rowkeytype eq 'REFERER') {
if ($field[$pos_referer] =~ m/$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
}
+ elsif ($rowkeytype eq 'UA') {
+ if ($field[$pos_ua] =~ m/$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+ }
+ elsif ($rowkeytype eq 'HOST') {\r
+ if ($HostResolved =~ m/$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }\r
+ }\r
else { error("Wrong value of parameter ExtraSectionFirstColumnValues$extranum"); }
}
if (! $rowkeyok) { next; } # End for this section