diff --git a/trunk/semmelstatzR-statz.php b/trunk/semmelstatzR-statz.php
index d281f23..68defac 100644
--- a/trunk/semmelstatzR-statz.php
+++ b/trunk/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 "Datum | ";
- print "Besucher | ";
- print "Hits | ";
- print "Referer | ";
+ print "".semr_i18n("Date")." | ";
+ print "".semr_i18n("Visitors")." | ";
+ print "".semr_i18n("Hits")." | ";
+ print "".semr_i18n("Referer")." | ";
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 "mehr... | ";
+ print "".semr_i18n("more")."... | ";
print "
";
print "";
print "
";
@@ -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 "Zeit | ";
- print "Referer | ";
+ print "".semr_i18n("Time")." | ";
+ print "".semr_i18n("Referrer")." | ";
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 "";
- print "";
- print "";
- print "Zeit | ";
- print "Suchbegriff | ";
- print "TCP/IP | ";
- 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 "";
+ print "";
+ print "";
+ print "".semr_i18n("Time")." | ";
+ print "".semr_i18n("search term")." | ";
+ print "".semr_i18n("TCP/IP")." | ";
+ 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 "";
print "";
print "";
- print "Post/Page | ";
- print "Postname | ";
- print "Hits | ";
+ print "".semr_i18n("Post/Page")." | ";
+ print "".semr_i18n("Postname")." | ";
+ print "".semr_i18n("Hits")." | ";
print "
";
print "";
print "";
- foreach ($topreads as $key=>$topread) {
- $posttitle = $topread->posttitle;
- $postname = $topread->postname;
- $postid = $topread->postid;
- $count = $topread->count;
- print "";
- print "".$posttitle." | ";
- print "".$postname." | ";
- print "".$count." | ";
- print "
";
- }
+ foreach ($topreads as $key=>$topread) {
+ $posttitle = $topread->posttitle;
+ $postname = $topread->postname;
+ $postid = $topread->postid;
+ $count = $topread->count;
+ print "";
+ print "".$posttitle." | ";
+ print "".$postname." | ";
+ print "".$count." | ";
+ print "
";
+ }
print "";
print "
";
- 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 "Post/Page | ";
- print "Postname | ";
- print "Hits | ";
+ print "".semr_i18n("Post/Page")." | ";
+ print "".semr_i18n("Postname")." | ";
+ print "".semr_i18n("Hits")." | ";
print "
";
print "";
print "";
@@ -450,7 +459,7 @@ function sem_draw24HoursGoo() {
}
print "";
print "
";
- 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 "Besucher (Hits) | ";
+ print "".semr_i18n("Visitor (Hits)")." | ";
print "
";
print "";
print "";
@@ -483,7 +492,7 @@ function sem_draw24HoursGoo() {
}
print "";
print "
";
- 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 "Post/Page | ";
- print "Kommentare | ";
+ print "".semr_i18n("Post/Page")." | ";
+ print "".semr_i18n("Comments")." | ";
print "
";
print "";
print "";
- foreach ($topcommentedposts as $key => $topcommentedpost) {
- $posttitle = $topcommentedpost->post_title;
- $count = $topcommentedpost->count;
- $postid = $topcommentedpost->guid;
- print "";
- print " ".$posttitle." | ";
- print "".$count." | ";
- print "
";
- }
-
+ foreach ($topcommentedposts as $key => $topcommentedpost) {
+ $posttitle = $topcommentedpost->post_title;
+ $count = $topcommentedpost->count;
+ $postid = $topcommentedpost->guid;
+ print "";
+ print " ".$posttitle." | ";
+ print "".$count." | ";
+ print "
";
+ }
print "";
print "
";
- 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 "User | ";
- print "Email | ";
- print "Homepage | ";
- print "Kommentare | ";
+ print "".semr_i18n("User")." | ";
+ print "".semr_i18n("Email")." | ";
+ print "".semr_i18n("Homepage")." | ";
+ print "".semr_i18n("Comments")." | ";
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 "".$commenter." | ";
- print "".$email." | ";
- print "".$homepage." | ";
- print "".$count." | ";
- 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 "".$commenter." | ";
+ print "".$email." | ";
+ print "".$homepage." | ";
+ print "".$count." | ";
+ print "
";
+ }
print "";
print "
";
- 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();