diff --git a/semmelstatzR-statz.php b/semmelstatzR-statz.php index d281f23..68defac 100644 --- a/semmelstatzR-statz.php +++ b/semmelstatzR-statz.php @@ -147,7 +147,7 @@ function sem_draw24HoursGoo() { print "
"; if(empty($results)) { - print '... '. semr_i18n("no entries at all").'
'; + print '... '. semr_i18n("no entries at all").''; print "
"; return; } @@ -223,19 +223,21 @@ function sem_draw24HoursGoo() { AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE time >= CURDATE() - INTERVAL ".$daylimit." DAY GROUP BY date ORDER BY time DESC"); - print "
".$limit."-Tage-Statistik
"; + print '
'; + printf (semr_i18n("%s-Days-Statz"), $limit); + print '
'; if (empty($thedays)) { - print '... '. semr_i18n("no entries at all").''; + print '... '. semr_i18n("no entries at all").''; print "
"; return; } print ""; print ""; print ""; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; print ""; print ""; print ""; @@ -245,13 +247,13 @@ function sem_draw24HoursGoo() { $today = time(); $difference = ceil(($today - $date) / (60*60*24))-1; if($difference == 0) { - $date = "Heute"; + $date = semr_i18n("Today"); } elseif($difference == 1) { - $date = "Gestern"; + $date = semr_i18n("Yesterday"); } elseif($difference == 2) { - $date = "Vorgestern"; + $date = semr_i18n("2 days ago"); } else { $date = mysql2date("d.m.Y",$theday->date); @@ -267,7 +269,7 @@ function sem_draw24HoursGoo() { print ""; } print ""; - print ""; + print ""; print ""; print ""; print "
DatumBesucherHitsReferer".semr_i18n("Date")."".semr_i18n("Visitors")."".semr_i18n("Hits")."".semr_i18n("Referer")."
mehr...".semr_i18n("more")."...
"; @@ -284,17 +286,19 @@ function sem_draw24HoursGoo() { $lastreferers = $wpdb->get_results("SELECT DISTINCT referer, time FROM ".$wpdb->statz." WHERE referer NOT LIKE '".$homehost."' ORDER BY time DESC LIMIT 0, ".$limit); - print "
Die letzten ".$limit." Referer
"; + print "
"; + printf (semr_i18n("The last %s Referrer"), $limit); + print "
"; if (empty($lastreferers)) { - print '... '. semr_i18n("no entries at all").''; + print '... '. semr_i18n("no entries at all").''; print "
"; return; } print ""; print ""; print ""; - print ""; - print ""; + print ""; + print ""; print ""; print ""; print ""; @@ -324,29 +328,31 @@ function sem_draw24HoursGoo() { } function sem_showKeyword() { - global $wpdb; + global $wpdb; + + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $limit = $sem_options["statz_keyword_limit"]; + + $results = $wpdb->get_results("SELECT referer, time, ip FROM $wpdb->statz WHERE referer != 'NULL' ORDER BY time DESC"); - $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen - $limit = $sem_options["statz_keyword_limit"]; - - $results = $wpdb->get_results("SELECT referer, time, ip FROM $wpdb->statz WHERE referer != 'NULL' ORDER BY time DESC"); - - print "
Die letzten $limit Suchbegriffe
"; - if (empty($results)) { - print '... '. semr_i18n("no entries at all").''; - print "
"; - return; - } - print "
ZeitReferer".semr_i18n("Time")."".semr_i18n("Referrer")."
"; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - $i=0; + print "
"; + printf(semr_i18n("The last %s search terms"), $limit); + print "
"; + if (empty($results)) { + print '... '. semr_i18n("no entries at all").''; + print "
"; + return; + } + print "
ZeitSuchbegriffTCP/IP
"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + $i=0; foreach($results as $result) { $referer = $result->referer; $keyword = sem_getKeyword($referer); @@ -382,58 +388,61 @@ function sem_draw24HoursGoo() { COUNT(".$wpdb->statz.".page) AS count FROM ".$wpdb->posts.", ".$wpdb->statz." WHERE ".$wpdb->statz.".page = ".$wpdb->posts.".ID AND time >= '$today' GROUP BY postid ORDER BY count DESC LIMIT 10"); - print "
Die Top10 aller Posts & Pages heute
"; + print "
"; + print semr_i18n("Top 10 of todays posts & pages")."
"; if (empty($topreads)) { - print '... '. semr_i18n("no entries at all").''; + print '... '. semr_i18n("no entries at all").''; print "
"; return; } print "
".semr_i18n("Time")."".semr_i18n("search term")."".semr_i18n("TCP/IP")."
"; print ""; print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; print ""; print ""; print ""; - foreach ($topreads as $key=>$topread) { - $posttitle = $topread->posttitle; - $postname = $topread->postname; - $postid = $topread->postid; - $count = $topread->count; - print ""; - print ""; - print ""; - print ""; - print ""; - } + foreach ($topreads as $key=>$topread) { + $posttitle = $topread->posttitle; + $postname = $topread->postname; + $postid = $topread->postid; + $count = $topread->count; + print ""; + print ""; + print ""; + print ""; + print ""; + } print ""; print "
Post/PagePostnameHits".semr_i18n("Post/Page")."".semr_i18n("Postname")."".semr_i18n("Hits")."
".$posttitle."".$postname."".$count."
".$posttitle."".$postname."".$count."
"; - print "
"; + print "
"; } function sem_showTopReads() { global $wpdb; - - $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen $limit = $sem_options["statz_topreads_limit"]; $topreads = $wpdb->get_results("SELECT post_title AS posttitle, post_name as postname, guid AS postid, hits AS count FROM ".$wpdb->posts." WHERE hits != '0' GROUP BY postid ORDER BY hits DESC LIMIT 0, ".$limit); - print "
Die Top".$limit." aller Posts & Pages
"; + print "
"; + printf (semr_i18n("Top %s of all posts & pages"), $limit); + print "
"; if (empty($topreads)) { - print '... '. semr_i18n("no entries at all").''; + print '... '. semr_i18n("no entries at all").''; print "
"; return; } print ""; print ""; print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; print ""; print ""; print ""; @@ -450,7 +459,7 @@ function sem_draw24HoursGoo() { } print ""; print "
Post/PagePostnameHits".semr_i18n("Post/Page")."".semr_i18n("Postname")."".semr_i18n("Hits")."
"; - print "
"; + print "
"; } function sem_showWhoWasOnlineToday() { @@ -463,14 +472,14 @@ function sem_draw24HoursGoo() { print semr_i18n("Known visitors today"); print ''; if (empty($todaysonlineusers)) { - print '... '. semr_i18n("no entries at all").''; + print '... '. semr_i18n("no entries at all").''; print "
"; return; } print ""; print ""; print ""; - print ""; + print ""; print ""; print ""; print ""; @@ -483,7 +492,7 @@ function sem_draw24HoursGoo() { } print ""; print "
Besucher (Hits)".semr_i18n("Visitor (Hits)")."
"; - print "
"; + print "
"; } function sem_showTopCommented() { @@ -492,35 +501,35 @@ function sem_draw24HoursGoo() { ".$wpdb->comments.",". $wpdb->posts." WHERE comment_approved = '1' AND comment_post_id = id GROUP BY guid ORDER BY count DESC LIMIT 0, 10"); - print "
Die Top10 aller kommentierter Posts
"; + print "
"; + print semr_i18n("Top 10 of all commented posts")."
"; if (empty($topcommentedposts)) { - print "... noch keine Einträge"; - print "
"; + print '... '. semr_i18n("no entries at all").''; + print "
"; return; } print ""; print ""; print ""; - print ""; - print ""; + print ""; + print ""; print ""; print ""; print ""; - foreach ($topcommentedposts as $key => $topcommentedpost) { - $posttitle = $topcommentedpost->post_title; - $count = $topcommentedpost->count; - $postid = $topcommentedpost->guid; - print ""; - print ""; - print ""; - print ""; - } - + foreach ($topcommentedposts as $key => $topcommentedpost) { + $posttitle = $topcommentedpost->post_title; + $count = $topcommentedpost->count; + $postid = $topcommentedpost->guid; + print ""; + print ""; + print ""; + print ""; + } print ""; print "
Post/PageKommentare".semr_i18n("Post/Page")."".semr_i18n("Comments")."
 ".$posttitle."".$count."
 ".$posttitle."".$count."
"; - print "
"; + print "
"; } function sem_showCommenters() { @@ -533,43 +542,45 @@ function sem_draw24HoursGoo() { comment_author_email AS email, comment_author_url AS homepage FROM " .$wpdb->comments . " WHERE comment_approved = '1' GROUP BY comment_author ORDER BY count DESC LIMIT 0, ".$limit); - print "
Die Top".$limit." aller Kommentierer
"; + print "
"; + printf(semr_i18n("Top %s of all commentators"), $limit); + print "
"; if (empty($topcommenters)) { - print "... noch keine Einträge"; - print "
"; + print '... '. semr_i18n("no entries at all").''; + print "
"; return; } print ""; print ""; print ""; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; print ""; print ""; print ""; - foreach ($topcommenters as $key=>$topcommenter) { - $commenter = $topcommenter->commenter; - $email = $topcommenter->email; - $homepage = $topcommenter->homepage; - if($homepage=="http://") $homepage=""; - $url=parse_url($homepage); - $homepage = $url['host']; - $count = $topcommenter->count; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - } + foreach ($topcommenters as $key=>$topcommenter) { + $commenter = $topcommenter->commenter; + $email = $topcommenter->email; + $homepage = $topcommenter->homepage; + if($homepage=="http://") $homepage=""; + $url=parse_url($homepage); + $homepage = $url['host']; + $count = $topcommenter->count; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + } print ""; print "
UserEmailHomepageKommentare".semr_i18n("User")."".semr_i18n("Email")."".semr_i18n("Homepage")."".semr_i18n("Comments")."
".$commenter."".$email."".$homepage."".$count."
".$commenter."".$email."".$homepage."".$count."
"; - print "
"; + print "
"; } ### AKTUELL Anzeige @@ -577,7 +588,7 @@ function sem_draw24HoursGoo() { print "
"; print "
"; print "

"; - print "

SemmelstatzR › Aktuell

"; + print "

SemmelstatzR > ".semr_i18n("Current Statz")."

"; $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen if ($sem_options["statz_show_useronline"]) sem_showWhoIsOnline(); sem_draw24HoursGoo();