diff --git a/serendipity_event_statistics/ChangeLog b/serendipity_event_statistics/ChangeLog index c945e480..b239bc81 100644 --- a/serendipity_event_statistics/ChangeLog +++ b/serendipity_event_statistics/ChangeLog @@ -1,8 +1,10 @@ -1.54: +1.60: ----- - 2.0 markup ready (YL) - fix spectrum image height with 2.0 - slightly reworked last visitors +- fix for S9y version < 2.0 upgraders +- fix a permission issue 1.53: ----- diff --git a/serendipity_event_statistics/serendipity_event_statistics.php b/serendipity_event_statistics/serendipity_event_statistics.php index 37e34a3d..98baf52a 100644 --- a/serendipity_event_statistics/serendipity_event_statistics.php +++ b/serendipity_event_statistics/serendipity_event_statistics.php @@ -1,5 +1,7 @@ add('name', PLUGIN_EVENT_STATISTICS_NAME); $propbag->add('description', PLUGIN_EVENT_STATISTICS_DESC); $propbag->add('stackable', false); - $propbag->add('author', 'Arnan de Gans, Garvin Hicking, Fredrik Sandberg, kalkin'); - $propbag->add('version', '1.54'); + $propbag->add('author', 'Arnan de Gans, Garvin Hicking, Fredrik Sandberg, kalkin, Matthias Mees, Ian'); + $propbag->add('version', '1.60'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.7', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('groups', array('STATISTICS')); $propbag->add('event_hooks', array( + 'backend_sidebar_entries' => true, 'backend_sidebar_admin_appearance' => true, 'backend_sidebar_entries_event_display_statistics' => true, 'frontend_configure' => true, @@ -231,6 +234,7 @@ class serendipity_event_statistics extends serendipity_event .serendipity_statistics .wide_box dl { clear: left; display: table; + width: 100%; } .serendipity_statistics .wide_box dt { display: table-row; @@ -242,6 +246,8 @@ class serendipity_event_statistics extends serendipity_event 1) break; case 'backend_sidebar_admin_appearance': ?>
  • @@ -609,7 +615,7 @@ class serendipity_event_statistics extends serendipity_event $sql = serendipity_db_query("SELECT COUNT(year) AS result FROM {$serendipity['dbPrefix']}visitors_count WHERE year='$year' AND month='$month' AND day='$day'", true); $sql_hit_update = "UPDATE {$serendipity['dbPrefix']}visitors_count SET hits = hits+1 WHERE year='$year' AND month='$month' AND day='$day'"; - $sql_day_new = "INSERT INTO {$serendipity['dbPrefix']}visitors_count (year, month, day, visits, hits) VALUES ('$year','$month','$day',1,1)"; + $sql_day_new = "INSERT INTO {$serendipity['dbPrefix']}visitors_count (year, month, day, visits, hits) VALUES ('$year','$month','$day',1,1)"; $sql_day_update = "UPDATE {$serendipity['dbPrefix']}visitors_count SET visits = visits+1, hits = hits+1 WHERE year='$year' AND month='$month' AND day='$day'"; switch($action) { case "update": @@ -641,8 +647,9 @@ class serendipity_event_statistics extends serendipity_event function countVisitor($useragent, $remoteaddr, $referer){ global $serendipity; + $thedate = date('Y-m-d'); - $ip=strip_tags($remoteaddr); + $ip = strip_tags($remoteaddr); $ip_how_often = serendipity_db_query("SELECT COUNT(ip) AS result FROM {$serendipity['dbPrefix']}visitors WHERE ip ='$ip' and day='$thedate'", true); if($ip_how_often['result'] >=1){ diff --git a/serendipity_event_statistics/serendipity_plugin_statistics.php b/serendipity_event_statistics/serendipity_plugin_statistics.php index 42afdb17..5256e260 100644 --- a/serendipity_event_statistics/serendipity_plugin_statistics.php +++ b/serendipity_event_statistics/serendipity_plugin_statistics.php @@ -1,4 +1,6 @@ -add('description', PLUGIN_EVENT_STATISTICS_NAME); $propbag->add('stackable', true); $propbag->add('author', 'Arnan de Gans, Garvin Hicking'); - $propbag->add('version', '1.5'); + $propbag->add('version', '1.6'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.7', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -186,7 +188,7 @@ class serendipity_plugin_statistics extends serendipity_plugin $lastmonday = date('Ynj', strtotime('today')); } else if (date('w', strtotime('today') ) == "0" ) { // now it is sunday $nextsunday = date('Ynj', strtotime('today')); - } + } $content = ''; if (serendipity_db_bool($this->get_config('show_lastentry'))) {