#
# ExtraSectionNameX is title of your personalized chart.
# 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 a regex to match after a coma. Use "|" for "OR".
+# Use one of the field condition (URL,QUERY_STRING,REFERER,UA,HOST,CODE),
+# 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) 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 values is "limited" to avoid "not enough memory" problems !
+# field to extract value from (URL, QUERY_STRING, REFERER, UA, HOST, CODE)
+# 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.
# 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_host]",5); }
if ($HostResolved =~ /$conditiontypeval/) { $conditionok=1; last; }
}
+ elsif ($conditiontype eq 'CODE') {
+ if ($Debug) { debug(" Check condition '$conditiontype' must be '$conditiontypeval' in $field[$pos_code]",5); }
+ if ($field[$pos_code] eq "$conditiontypeval") { $conditionok=1; last; }
+ }
else { error("Wrong value of parameter ExtraSectionCondition$extranum"); }
}
if (! $conditionok && @{$ExtraConditionType[$extranum]}) { next; } # End for this section