# HG changeset patch # User Dan # Date 1231212626 18000 # Node ID 186507f67064cc439bb4c950d84ba0212e2204f0 # Parent 73f74d395f9538c18f9cd0f9e56a2f18b6575396# Parent 53a50ba4d690c4131dba62d6d0e003eee697125c Merging heads diff -r 53a50ba4d690 -r 186507f67064 graphing/class.graph.php --- a/graphing/class.graph.php Sun Jan 04 16:42:52 2009 -0500 +++ b/graphing/class.graph.php Mon Jan 05 22:30:26 2009 -0500 @@ -766,7 +766,7 @@ $this->$func($settings); } } - if (is_array($data['data'])) { + if (isset($data['data']) && is_array($data['data'])) { $this->data = $data['data']; } } diff -r 53a50ba4d690 -r 186507f67064 htdocs/changetz.php --- a/htdocs/changetz.php Sun Jan 04 16:42:52 2009 -0500 +++ b/htdocs/changetz.php Mon Jan 05 22:30:26 2009 -0500 @@ -1,5 +1,6 @@ - - Change time zone - - - - '; + if ( $set_zone ) { $target = rtrim(dirname($_SERVER['REQUEST_URI']), '/') . '/'; @@ -95,5 +62,7 @@
Make sure you have cookies enabled. - - + + diff -r 53a50ba4d690 -r 186507f67064 htdocs/graph.php --- a/htdocs/graph.php Sun Jan 04 16:42:52 2009 -0500 +++ b/htdocs/graph.php Mon Jan 05 22:30:26 2009 -0500 @@ -9,6 +9,8 @@ function makeGraph($type = 'bar') { + global $webtheme; + $class = ( $type == 'line' ) ? 'LineGraph' : 'BarGraph'; $g = new $class(); // _Compat(); @@ -33,6 +35,10 @@ $g->SetScaleRoundY(0); $g->SetScaleRoundX(0); $g->SetAxisStepSize(7); + + if ( file_exists("./themes/$webtheme/graph_$type.def") ) + $g->LoadGraph(realpath("./themes/$webtheme/graph_$type.def")); + return $g; } diff -r 53a50ba4d690 -r 186507f67064 htdocs/index.php --- a/htdocs/index.php Sun Jan 04 16:42:52 2009 -0500 +++ b/htdocs/index.php Mon Jan 05 22:30:26 2009 -0500 @@ -5,21 +5,10 @@ $channel_list = stats_channel_list(); $first_channel = $channel_list[0]; $channel = ( isset($_REQUEST['channel']) && in_array($_REQUEST['channel'], $channel_list) ) ? $_REQUEST['channel'] : $first_channel; + +$title = "$nick - Statistics"; +require("./themes/$webtheme/header.php"); ?> - - - - <?php echo $nick; ?> - Statistics - - -

" />

Last 2 weeks

Graph image - - - - + - - <?php echo $nick; ?> - updates - - -

Updates and changes

2009-01-04

Added a last 60 minutes graph.

@@ -25,5 +23,6 @@ records after the import of the existing flat file database. It makes for a more portable programming technique and it means it can be easily expanded in the future to include more data. The table's indexed so it should be decently fast.

In addition, smarter functionality is being included, plus a few bugs here and there have been fixed.

- - + diff -r 53a50ba4d690 -r 186507f67064 htdocs/privacy.php --- a/htdocs/privacy.php Sun Jan 04 16:42:52 2009 -0500 +++ b/htdocs/privacy.php Mon Jan 05 22:30:26 2009 -0500 @@ -1,17 +1,16 @@ - - <?php echo $nick; ?> - privacy info - - -

Privacy information

is designed to collect IRC statistics. It does this by recording raw data and then letting the frontend (index.php and the backend access abstraction in stats-fe.php) look at the data and draw graphs and measurements based on it.

@@ -32,5 +31,5 @@

Remove yourself from the anonymization list with:

/msg denonymize

Want to know more about the numbers collects? Download a dump of 's database yourself.

- - + + is a privacy-respecting bot. Read about what information collects +
+ + diff -r 53a50ba4d690 -r 186507f67064 htdocs/themes/generic/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/htdocs/themes/generic/header.php Mon Jan 05 22:30:26 2009 -0500 @@ -0,0 +1,45 @@ + + + <?php echo $title; ?> + + + diff -r 53a50ba4d690 -r 186507f67064 stats-fe.php --- a/stats-fe.php Sun Jan 04 16:42:52 2009 -0500 +++ b/stats-fe.php Mon Jan 05 22:30:26 2009 -0500 @@ -14,6 +14,8 @@ require(ENANOBOT_ROOT . '/hooks.php'); require(ENANOBOT_ROOT . '/database.php'); +$webtheme = ( isset($webtheme) && is_dir(ENANOBOT_ROOT . "/htdocs/themes/$webtheme") ) ? $webtheme : 'generic'; + mysql_reconnect(); /**