1
0
Fork 0

i18n standard entries

Dieser Commit ist enthalten in:
Oldperl 2011-12-17 16:26:57 +00:00
Ursprung d8042b4e52
Commit 844bf08a42
1 geänderte Dateien mit 116 neuen und 105 gelöschten Zeilen

Datei anzeigen

@ -147,7 +147,7 @@ function sem_draw24HoursGoo() {
print "<div align='left'>";
if(empty($results)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>';
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
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 "<div class='statz'>".$limit."-Tage-Statistik</div>";
print '<div class="statz">';
printf (semr_i18n("%s-Days-Statz"), $limit);
print '</div>';
if (empty($thedays)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>';
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align:left;'>Datum</th>";
print "<th style='width: 15%;text-align:center;'>Besucher</th>";
print "<th style='width: 15%;text-align:center;'>Hits</th>";
print "<th style='width: 15%;text-align:center;'>Referer</th>";
print "<th style='text-align:left;'>".semr_i18n("Date")."</th>";
print "<th style='width: 15%;text-align:center;'>".semr_i18n("Visitors")."</th>";
print "<th style='width: 15%;text-align:center;'>".semr_i18n("Hits")."</th>";
print "<th style='width: 15%;text-align:center;'>".semr_i18n("Referer")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
@ -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 "</tr>";
}
print "<tr>";
print "<td style='text-align:left;'><a href='".get_option('siteurl')."/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-history.php'>mehr...</a></td>";
print "<td style='text-align:left;'><a href='".get_option('siteurl')."/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-history.php'>".semr_i18n("more")."...</a></td>";
print "</tr>";
print "</tbody>";
print "</table>";
@ -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 "<div class='statz'>Die letzten ".$limit." Referer</div>";
print "<div class='statz'>";
printf (semr_i18n("The last %s Referrer"), $limit);
print "</div>";
if (empty($lastreferers)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>';
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align:center;width:12%;'>Zeit</th>";
print "<th style='text-align:left;'>Referer</th>";
print "<th style='text-align:center;width:12%;'>".semr_i18n("Time")."</th>";
print "<th style='text-align:left;'>".semr_i18n("Referrer")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
@ -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 "<div class='statz'>Die letzten $limit Suchbegriffe</div>";
if (empty($results)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: center;width:12%;'>Zeit</th>";
print "<th style='text-align:left;width:70%;'>Suchbegriff</th>";
print "<th style='text-align:left;'>TCP/IP</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
$i=0;
print "<div class='statz'>";
printf(semr_i18n("The last %s search terms"), $limit);
print "</div>";
if (empty($results)) {
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: center;width:12%;'>".semr_i18n("Time")."</th>";
print "<th style='text-align:left;width:70%;'>".semr_i18n("search term")."</th>";
print "<th style='text-align:left;'>".semr_i18n("TCP/IP")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
$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 "<div class='statz'>Die Top10 aller Posts & Pages heute</div>";
print "<div class='statz'>";
print semr_i18n("Top 10 of todays posts &amp; pages")."</div>";
if (empty($topreads)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>';
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 45%;'>Post/Page</th>";
print "<th style='text-align: left; width: 45%;'>Postname</th>";
print "<th style='text-align: center; width: 10%;'>Hits</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Post/Page")."</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Postname")."</th>";
print "<th style='text-align: center; width: 10%;'>".semr_i18n("Hits")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
foreach ($topreads as $key=>$topread) {
$posttitle = $topread->posttitle;
$postname = $topread->postname;
$postid = $topread->postid;
$count = $topread->count;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'><a target='_blank' href='$postid'>".$posttitle."</a></td>";
print "<td style='text-align: left;'>".$postname."</td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
foreach ($topreads as $key=>$topread) {
$posttitle = $topread->posttitle;
$postname = $topread->postname;
$postid = $topread->postid;
$count = $topread->count;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'><a target='_blank' href='$postid'>".$posttitle."</a></td>";
print "<td style='text-align: left;'>".$postname."</td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
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 "<div class='statz'>Die Top".$limit." aller Posts & Pages</div>";
print "<div class='statz'>";
printf (semr_i18n("Top %s of all posts &amp; pages"), $limit);
print "</div>";
if (empty($topreads)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>';
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 45%;'>Post/Page</th>";
print "<th style='text-align: left; width: 45%;'>Postname</th>";
print "<th style='text-align: center; width: 10%;'>Hits</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Post/Page")."</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Postname")."</th>";
print "<th style='text-align: center; width: 10%;'>".semr_i18n("Hits")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
@ -450,7 +459,7 @@ function sem_draw24HoursGoo() {
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
function sem_showWhoWasOnlineToday() {
@ -463,14 +472,14 @@ function sem_draw24HoursGoo() {
print semr_i18n("Known visitors today");
print '</div>';
if (empty($todaysonlineusers)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>';
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 80%;'>Besucher (Hits)</th>";
print "<th style='text-align: left; width: 80%;'>".semr_i18n("Visitor (Hits)")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
@ -483,7 +492,7 @@ function sem_draw24HoursGoo() {
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
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 "<div class='statz'>Die Top10 aller kommentierter Posts</div>";
print "<div class='statz'>";
print semr_i18n("Top 10 of all commented posts")."</div>";
if (empty($topcommentedposts)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 80%;'>Post/Page</th>";
print "<th style='text-align: center; width: 20%;'>Kommentare</th>";
print "<th style='text-align: left; width: 80%;'>".semr_i18n("Post/Page")."</th>";
print "<th style='text-align: center; width: 20%;'>".semr_i18n("Comments")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
foreach ($topcommentedposts as $key => $topcommentedpost) {
$posttitle = $topcommentedpost->post_title;
$count = $topcommentedpost->count;
$postid = $topcommentedpost->guid;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'><a target='_blank' href='".$postid."'>&nbsp;".$posttitle."</a></td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
foreach ($topcommentedposts as $key => $topcommentedpost) {
$posttitle = $topcommentedpost->post_title;
$count = $topcommentedpost->count;
$postid = $topcommentedpost->guid;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'><a target='_blank' href='".$postid."'>&nbsp;".$posttitle."</a></td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
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 "<div class='statz'>Die Top".$limit." aller Kommentierer</div>";
print "<div class='statz'>";
printf(semr_i18n("Top %s of all commentators"), $limit);
print "</div>";
if (empty($topcommenters)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 20%;'>User</th>";
print "<th style='text-align: left; width: 30%;'>Email</th>";
print "<th style='text-align: left; width: 40%;'>Homepage</th>";
print "<th style='text-align: center; width: 10%;'>Kommentare</th>";
print "<th style='text-align: left; width: 20%;'>".semr_i18n("User")."</th>";
print "<th style='text-align: left; width: 30%;'>".semr_i18n("Email")."</th>";
print "<th style='text-align: left; width: 40%;'>".semr_i18n("Homepage")."</th>";
print "<th style='text-align: center; width: 10%;'>".semr_i18n("Comments")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
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 "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'>".$commenter."</td>";
print "<td style='text-align: left;'><a href='mailto:".$email."'>".$email."</a></td>";
print "<td style='text-align: left;'><a target='_blank' href='http://".$homepage."'>".$homepage."</a></td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
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 "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'>".$commenter."</td>";
print "<td style='text-align: left;'><a href='mailto:".$email."'>".$email."</a></td>";
print "<td style='text-align: left;'><a target='_blank' href='http://".$homepage."'>".$homepage."</a></td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
### AKTUELL Anzeige
@ -577,7 +588,7 @@ function sem_draw24HoursGoo() {
print "<div class='wrap'>";
print "<div><a name='top'></a></div>";
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &rsaquo; Aktuell</h2>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("Current Statz")."</h2>";
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
if ($sem_options["statz_show_useronline"]) sem_showWhoIsOnline();
sem_draw24HoursGoo();