--- /dev/null
+20070723 Version 1.60:
+----------------------
+(By kalkin)
+
+- rewrote the botfilter. Now it's smarter.
+- the graphs can be maximal 200px large
+- the bar colors are now relative.
+
+20070121 Version 1.50:
+----------------------
+(By kalkin)
+
+- added lots of bots
+- now the plugin just count each ip as an visitor at this day, not evry refresh
+
+Version 1.40:
+-------------
+
+(By Shrikee / Arnan)
+
+- added a database table which holds daily stats.
+- 2 graphs which use the data in the above table
+- rewrote the bots filter
+- added a config option to show only visitor stats or show everything (post counts and such)
+- option to enable or disable the bot filter
+- fixed the referer register. They werent added in the database, now they are
+- if either $useragent, $referer or $remote_addr is empty or unknown its set to unknown.
@define('PLUGIN_EVENT_STATISTICS_EXT_OPT1', ' Не');
@define('PLUGIN_EVENT_STATISTICS_EXT_OPT2', 'Да, долу на страницата');
@define('PLUGIN_EVENT_STATISTICS_EXT_OPT3', 'Да, горе на страницата');
- @define('PLUGIN_EVENT_STATISTICS_EXT_ALL', 'Ð\9fоказване на пÑ\8aлна Ñ\81Ñ\82аÑ\82иÑ\81Ñ\82ика?');
- @define('PLUGIN_EVENT_STATISTICS_EXT_ALL_DESC', 'УÑ\81Ñ\82ановеÑ\82е \'не\' за да показваÑ\82е Ñ\81амо Ñ\81Ñ\82аÑ\82иÑ\81Ñ\82икаÑ\82а за поÑ\81еÑ\82иÑ\82елиÑ\82е');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_ALL', 'УÑ\81Ñ\82ановеÑ\82е \'не\' за да показваÑ\82е Ñ\81амо Ñ\81Ñ\82аÑ\82иÑ\81Ñ\82икаÑ\82а за поÑ\81еÑ\82иÑ\82елиÑ\82е');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_ALL_DESC', 'Ð\9fоказване на вÑ\81иÑ\87ко? (по подÑ\80азбиÑ\80ане: не)');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL1', 'Не, скриване на всичко освен броячите');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL2', 'Пълна статистика');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISITORS', 'Брой на посетителите');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL1', 'Nein, alles außer dem Zähler verbergen.');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL2', 'Ja, alle Statistiken anzeigen!');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISITORS', 'Anzahl der Besucher');
- @define('PLUGIN_EVENT_STATISTICS_EXT_VISTODAY', 'Anzahl der Besucher heute');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_HITSTODAY', 'Aufrufe heute');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_HITSTOTAL', 'Aufrufe gesamt');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_VISTODAY', 'Besucher heute');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISTOTAL', 'Besucher gesamt');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISSINCE', 'Die erweiterte Besucherstatistik hat seit folgendem Zeitpunkt Daten gesammelt:');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_COUNTDESC','Die Zahl der Aufrufe kann sehr groß werden, liefert jedoch einen Wert bezüglich der einzelnen Seitenanfragen. Diese Zahl erhöht sich deshalb mit JEDEM Seitenaufruf sowie jeder Aktualisierung der Seite und kann damit NICHT als Besucherzähler verstanden werden.');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISLATEST', 'Letzte Besucher');
@define('PLUGIN_EVENT_STATISTICS_EXT_TOPREFS', 'Top-Referrer');
@define('PLUGIN_EVENT_STATISTICS_EXT_TOPREFS_NONE', 'Bisher wurden keine Referrer registriert.');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_DAYGRAPH', 'Aufrufe, auf den Tag bezogen');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_MONTHGRAPH', 'Aufrufe, auf den Monat bezogen');
@define('PLUGIN_EVENT_STATISTICS_OUT_EXT_STATISTICS', 'Erweiterte Besucherstatistik');
@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS1', 'Aktivieren, keine Robots zählen');
@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS2', 'Nein, Robots bitte mitzählen');
-<?php # $Id$
+<?php # $Id$
/**
* @version $Revision$
@define('PLUGIN_EVENT_STATISTICS_EXT_OPT1', ' Íå');
@define('PLUGIN_EVENT_STATISTICS_EXT_OPT2', 'Äà, äîëó íà ñòðàíèöàòà');
@define('PLUGIN_EVENT_STATISTICS_EXT_OPT3', 'Äà, ãîðå íà ñòðàíèöàòà');
- @define('PLUGIN_EVENT_STATISTICS_EXT_ALL', 'Ïîêàçâàíå íà ïúëíà ñòàòèñòèêà?');
- @define('PLUGIN_EVENT_STATISTICS_EXT_ALL_DESC', 'Óñòàíîâåòå \'íå\' çà äà ïîêàçâàòå ñàìî ñòàòèñòèêàòà çà ïîñåòèòåëèòå');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_ALL', 'Óñòàíîâåòå \'íå\' çà äà ïîêàçâàòå ñàìî ñòàòèñòèêàòà çà ïîñåòèòåëèòå');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_ALL_DESC', 'Ïîêàçâàíå íà âñè÷êî? (ïî ïîäðàçáèðàíå: íå)');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL1', 'Íå, ñêðèâàíå íà âñè÷êî îñâåí áðîÿ÷èòå');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL2', 'Ïúëíà ñòàòèñòèêà');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISITORS', 'Áðîé íà ïîñåòèòåëèòå');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL1', 'Nein, alles außer dem Zähler verbergen.');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL2', 'Ja, alle Statistiken anzeigen!');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISITORS', 'Anzahl der Besucher');
- @define('PLUGIN_EVENT_STATISTICS_EXT_VISTODAY', 'Anzahl der Besucher heute');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_HITSTODAY', 'Aufrufe heute');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_HITSTOTAL', 'Aufrufe gesamt');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_VISTODAY', 'Besucher heute');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISTOTAL', 'Besucher gesamt');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISSINCE', 'Die erweiterte Besucherstatistik hat seit folgendem Zeitpunkt Daten gesammelt:');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_COUNTDESC','Die Zahl der Aufrufe kann sehr groß werden, liefert jedoch einen Wert bezüglich der einzelnen Seitenanfragen. Diese Zahl erhöht sich deshalb mit JEDEM Seitenaufruf sowie jeder Aktualisierung der Seite und kann damit NICHT als Besucherzähler verstanden werden.');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISLATEST', 'Letzte Besucher');
@define('PLUGIN_EVENT_STATISTICS_EXT_TOPREFS', 'Top-Referrer');
@define('PLUGIN_EVENT_STATISTICS_EXT_TOPREFS_NONE', 'Bisher wurden keine Referrer registriert.');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_DAYGRAPH', 'Aufrufe, auf den Tag bezogen');
+ @define('PLUGIN_EVENT_STATISTICS_EXT_MONTHGRAPH', 'Aufrufe, auf den Monat bezogen');
@define('PLUGIN_EVENT_STATISTICS_OUT_EXT_STATISTICS', 'Erweiterte Besucherstatistik');
@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS1', 'Aktivieren, keine Robots zählen');
@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS2', 'Nein, Robots bitte mitzählen');
@define('PLUGIN_EVENT_STATISTICS_EXT_OPT1', 'No!');
@define('PLUGIN_EVENT_STATISTICS_EXT_OPT2', 'Yes, at the bottom of the page');
@define('PLUGIN_EVENT_STATISTICS_EXT_OPT3', 'Yes, at the top of the page');
-@define('PLUGIN_EVENT_STATISTICS_EXT_ALL', 'Show all statistics?');
-@define('PLUGIN_EVENT_STATISTICS_EXT_ALL_DESC', 'Set to \'no\' to only show visitor stats');
+@define('PLUGIN_EVENT_STATISTICS_EXT_ALL', 'Set to \'no\' to show only visitor stats');
+@define('PLUGIN_EVENT_STATISTICS_EXT_ALL_DESC', 'Show everything? (default: no)');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL1', 'No, hide everything but the counter.');
@define('PLUGIN_EVENT_STATISTICS_EXT_ALL2', 'Yes, show me all statistics!');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISITORS', 'Individual counters');
@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS1', 'Enable, do not count bots');
@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS2', 'Disable, please count bots');
@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS', 'Robot count protection');
-@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS_DESC', 'Set to \'yes\' to not count robots. Set to \'no\' to count robots. Currently over 25 bots are banned.');
+@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS_DESC', 'Set to \'yes\' to not count robots. set to \'no\' to count robots. Currently over 25 bots are banned.');
@define('PLUGIN_EVENT_STATISTICS_SHOW_LASTENTRY', 'Show date of last entry');
@define('PLUGIN_EVENT_STATISTICS_SHOW_ENTRYCOUNT', 'Show number of entries');
die ("Don't hack!");
}
-
// Probe for a language include with constants. Still include defines later on, if some constants were missing
$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php';
if (file_exists($probelang)) {
$propbag->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');
- $propbag->add('version', '1.47');
+ $propbag->add('author', 'Arnan de Gans, Garvin Hicking, Fredrik Sandberg, kalkin');
+ $propbag->add('version', '1.48');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
// excludelist botagents
$banned_array = array(
'1' => "unknown",
- '2' => "Yahoo! Slurp",
+ '2' => "bot",
'3' => "slurpy",
'4' => "agent 007",
'5' => "ichiro",
'25' => "Dumbot",
'26' => "GeoBot",
'27' => "DigExt",
- '28' => "Feedfetcher-Google",
+ '28' => "Jeeves/Teoma",
'29' => "FeedBurner",
- '30' => "Jeeves/Teoma",
- '31' => "FeedBurner/1.0(http://www.FeedBurner.com)",
- '32' => "Technorati Feed Engine/0.01 (Java 1.4.2_07 Sun Microsystems Inc./Linux 2.6.9-22.0.1.ELsmp)",
- '33' => "Java/1.5.0_10",
- '34' => "Java/1.5.0_06",
- '35' => "MarsEdit",
- '36' => "Blogslive (info@blogslive.com)",
- '37' => "XMLRPCCocoa",
- '38' => "Feedfetcher-Google; (+www.google.com/feedfetcher.html)",
- '39' => "YahooFeedSeeker/2.0 (compatible; Mozilla 4.0; MSIE 5.5; http://publisher.yahoo.com/rssguide)",
- '40' => "Mediapartners-Google/2.1",
- '41' => "MagpieRSS/0.61 (+http://magpierss.sf.net)",
- '42' => "www.google.com/feedfetcher.html)",
- '43' => "Sphere Scout&v4.0 (beta)- scout at sphere dot com",
- '44' => "Mozilla 5.0(BlogCorpusReader 1.4142)",
- '45' => "libwww-perl/5.76",
- '46' => "Mozilla 5.0(BlogCorpusReader 1.4142)",
- '48' => "WordPress/2.0.5",
- '49' => "Incutio XML-RPC -- WordPress/2.0.5",
- '50' => "-- WordPress/2.1-alpha3",
- '51' => "WordPress/2.1.1",
- '52' => "WordPress/2.1",
- '53' => "ping.wordblog.de/ping/1.0",
- '54' => "PEAR HTTP_Request class (http://pear.php.net/ )",
- '55' => "Java/1.5.0_07",
- '56' => "Mozilla 5.0(BlogCorpusReader 1.4142)",
- '57' => "BlogPulseLive(support@blogpulse.com)"
+ '30' => "Technorati",
+ '31' => "Java/1.5.0_10",
+ '32' => "Java/1.5.0_06",
+ '33' => "MarsEdit",
+ '34' => "Blogslive",
+ '35' => "XMLRPCCocoa",
+ '36' => "Google",
+ '37' => "MagpieRSS",
+ '38' => "Sphere Scout",
+ '39' => "BlogCorpusReader",
+ '41' => "libwww-perl",
+ '42' => "WordPress",
+ '43' => "ping.wordblog.de",
+ '44' => "PEAR HTTP_Request",
+ '45' => "Java/1.5.0_07",
+ '46' => "BlogPulseLive(support@blogpulse.com)",
+ '47' => "TrackBack",
+ '48' => "Blogdimension",
+ '49' => "Yahoo"
);
foreach($banned_array AS $ban) {
- if (stristr($useragent, $ban)) {
+ if (stripos($useragent, $ban) !== false) {
$found = 1;
break;
}
}
$num = $this->statistics_getmonthlystats($i, $visitors_count[0]);
+ $rep = $num;
+ rsort($rep);
+ $maxVisHeigh = 100/$rep[0]*2;
echo '<td class="'.$color.'" width="8%" align="center" valign="bottom"><small>' . $num[$i];
- $num[$i] = ($num[$i] / 100) * 20 + 1;
echo '<br /><img src="plugins/serendipity_event_statistics/';
- if ($num[$i] < 10) {
+ if ($num[$i]*$maxVisHeigh/2 <= 33) {
echo 'red.png';
- } else if ($num[$i] >= 11 && $num[$i] < 30) {
+ } else if ($num[$i]*$maxVisHeigh/2 > 33 && $num[$i]*$maxVisHeigh/2 < 66) {
echo 'yellow.png';
} else {
echo 'green.png';
}
- echo '" width="8" alt="" align="bottom" height="'.$num[$i].'" />';
+ echo '" width="8" alt="" align="bottom" height="'.round($num[$i]*$maxVisHeigh).'" />';
echo '<br /></small></td>';
} ?>
</tr><tr>
}
$num = $this->statistics_getdailystats($i, $visitors_count[0]);
+ $rep = $num;
+ rsort($rep);
+ $maxVisHeigh = 100/$rep[0]*2;
echo '<td class="'.$color.'" width="3%" align="center" valign="bottom"><small>' . $num[$i];
- $num[$i] = ($num[$i] / 100) * 40 + 1;
echo '<br /><img src="plugins/serendipity_event_statistics/';
- if ($num[$i] < 20) {
+ if ($num[$i]*$maxVisHeigh/2 <= 33) {
echo 'red.png';
- } else if ($num[$i] >= 21 && $num[$i] < 40) {
+ } else if ($num[$i]*$maxVisHeigh/2 > 33 && $num[$i]*$maxVisHeigh/2 < 66) {
echo 'yellow.png';
} else {
echo 'green.png';
}
- echo '" width="8" alt="" align="bottom" height="'.$num[$i].'" />';
+ echo '" width="8" alt="" align="bottom" height="'.round($num[$i]*$maxVisHeigh).'" />';
echo '<br /></small></td>';
}
?>