Your message dated Wed, 21 Dec 2011 17:56:01 +0300
with message-id
<CAO+do4BKVW-fNs9qFmYfsLGwLK0KCpH5MCxsT0Q9TKJw5=6...@mail.gmail.com>
and subject line Re: explicit subdomain integration would be helpful
has caused the Debian Bug report #302210,
regarding awstats: explicit subdomain integration would be helpful
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
302210: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=302210
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: awstats
Version: 6.3-1
Severity: wishlist
It would be very helpful if the AWStats CGI script provided a small
amount of subdomain integration. Specifically, currently stats for
multiple subdomains of the same main domain must be viewed separately,
by changing the config parameter of the URL.
I am currently accomplishing this with the following patch, which
replaces the block currently entitled "# Print Statistics Of":
print "<tr><td class=\"awsm\"><b>$Message[7]:</b></td></tr><tr><td
class=\"aws\"><span style=\"font-size: 12px;\">";
# calculate other domains
my @domains;
if ($SiteDomain =~ m/([^.]+\.[^.]+)$/) {
my $domain = $1;
opendir STATS, '/var/lib/awstats';
@domains = sort grep /\.$domain$/, readdir STATS;
closedir STATS;
unshift @domains, $domain;
}
# and put them in a cute select menu
print qq{
<form name="DomainSelector" action="awstats.pl" style="padding: 0px 0px 0px
0px; margin-top: 0" target="_parent">
<select class="aws_formfield" name="config">
};
foreach my $domain (@domains) {
my $selected;
if ($domain eq $SiteDomain) {
$selected = 'selected="true"';
}
print qq{<option $selected value="$domain">$domain</option>\n};
}
print qq{
</select>
<input type="submit" value=" OK " class="aws_button" /></td></tr>
</table>
</td></tr></table>
</form>
};
print "</span></td>";
While I am glad to keep this for myself, it seems like generically
useful functionality that others could also benefit from.
Charles
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (90, 'testing'), (80, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.26-1um
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages awstats depends on:
ii perl [libstorable-perl] 5.8.4-6 Larry Wall's Practical Extraction
-- no debconf information
--- End Message ---
--- Begin Message ---
Closed, due to the upstream reaction.
Probably, in future we can distribute some script alike
"AWStats Totals" (e.g., as an example).
--- End Message ---