BAWStats drupal module

I am creating a drupal module that uses the Better AWstats php code as a back end for access to, and display of, AWStats web statistics data. I have a working prototype which I have sent to Oliver (the developer of the better awstats) and hopefully we can come up with a "better awstats" release that includes a drupal module by default.

The biggest problem was creating a php name space for the BAWStats back end - allowing the code to sit nicely within drupal. Although I would like to release this as alpha code soon (or get Oliver to release it), there are some issues that need sorting:

  • Security: when distributing a drupal module there should be no CGI interface left lying around as part of the common code. Also, as drupal is muli-site (one code-base supporting many possible sites) I don't want one site to "necessarily" be able to view the stats of all/any sites. In the module I have added security to limit this but leaving the CGI-mode index.php around then becomes problematic.
  • Documentation: although it pretty much works out of the box for a drupal user, it will need some extensive documentation, how to incorporate awstats icons (its currently different from the standard install), also such things as how to limit access to only a single site statistics set etc.

I have added a number of small extensions and bug fixes to the code base. For example, a world map marking the main domains that have come to a site is in the drupal alpha code - but not yet back ported to core better awstats back-end. The core configuration of the system has also been moved from the bespoke tool included with the original code into the standard drupal configuration system.

Other things I would like to do:

  • For "all months" or "all days", the php code uses heaps of memory, I would really like to get this down.
  • I need to clean up the module code and workout how to handle the global variables better.