From 4e8dfa09aa9032aa6a77e3fb8ad458b8103f9d38 Mon Sep 17 00:00:00 2001
From: Oldperl <44996956+oldperl@users.noreply.github.com>
Date: Sat, 17 Dec 2011 23:28:39 +0000
Subject: [PATCH] i18n standard entries
---
semmelstatzR-history.php | 4 +-
semmelstatzR-templates.php | 276 ++++++++++---------------------------
2 files changed, 76 insertions(+), 204 deletions(-)
diff --git a/semmelstatzR-history.php b/semmelstatzR-history.php
index cc4f2a4..3c14c7c 100644
--- a/semmelstatzR-history.php
+++ b/semmelstatzR-history.php
@@ -45,8 +45,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
- if(!current_user_can('manage_statz')) {
- die('Zugriff verweigert');
+if(!current_user_can('manage_statz')) {
+ die(semr_i18n("Restricted Area"));
}
include_once plugin_dir_path(__FILE__).'includes/pChart/class/pData.class.php';
diff --git a/semmelstatzR-templates.php b/semmelstatzR-templates.php
index 5361a3a..19c01ba 100644
--- a/semmelstatzR-templates.php
+++ b/semmelstatzR-templates.php
@@ -46,210 +46,82 @@
*/
if(!current_user_can('manage_statz')) {
- die('Zugriff verweigert');
+ die(semr_i18n("Restricted Area"));
}
-### TEMPLATES
+// entry format: functionname, needed param, type of return, remarks, manual example (no function call)
+$aTemplates = array(
+ array("sem_showTotalPosts", "", semr_i18n("Integer"), semr_i18n("Number of all Posts"), ""),
+ array("sem_showTotalComments", "", semr_i18n("Integer"), semr_i18n("Number of all Comments"), ""),
+ array("sem_showTotalUsers", "", semr_i18n("Integer"), semr_i18n("Total Number of all visitors since statistics started"), ""),
+ array("sem_showAverageUserPerDay", "", semr_i18n("Decimal"), semr_i18n("Average of daily visitors"), ""),
+ array("sem_showFirstPostDate", "", semr_i18n("Date (d.m.y)"), semr_i18n("Date of the first post"), ""),
+ array("sem_showPostDays", "", semr_i18n("Integer"), semr_i18n("Days since first post"), ""),
+ array("sem_showFirstCommentDate", "", semr_i18n("Date (d.m.y)"), semr_i18n("Date of the first comment"), ""),
+ array("sem_showCommentDays", "", semr_i18n("Integer"), semr_i18n("Days since first comment"), ""),
+ array("sem_showPostsPerDay", "", semr_i18n("Decimal"), semr_i18n("Average of posts per day"), ""),
+ array("sem_showCommentsPerDay", "", semr_i18n("Decimal"), semr_i18n("Average of comments per day"), ""),
+ array("sem_showNumCommenters", "", semr_i18n("Integer"), semr_i18n("Total of all commentators"), ""),
+ array("sem_showStatzStartDate", "", semr_i18n("Date (d.m.y)"), semr_i18n("Date of commencement of statistics"), ""),
+ array("sem_showStatzDays", "", semr_i18n("Integer"), semr_i18n("Period of the statistics in days"), ""),
+ array("sem_showNumUsersOnline", "", semr_i18n("Integer"), semr_i18n("Number of users online"), ""),
+ array("sem_showLastComments", "10", semr_i18n("Formatted list"), semr_i18n("The 'n' newest comments with author, post, sorted by date desc
CSS-ID: #lastcomments"), "n/a"),
+ array("sem_showLastPosts", "10", semr_i18n("Formatted list"), semr_i18n("The 'n' newest posts with title, sorted bei date desc
CSS_ID: #lastposts"), "n/a"),
+ array("sem_showMostReads", "10", semr_i18n("Formatted list"), semr_i18n("'n' most readed posts/pages with hits in brackets
CSS-ID: #mostreads"), "n/a"),
+ array("sem_showPostHitsInLoop", "get_the_ID()", semr_i18n("Integer"), semr_i18n("Shows count of hits of a post. Only works in the LOOP"), "only in LOOP")
+);
- $totalposts = sem_showTotalPosts();
- $totalcomments = sem_showTotalComments();
- $totalusers = sem_showTotalUsers();
- $averageuserperday = sem_showAverageUserPerDay();
- $firstpostdate = sem_showFirstPostDate();
- $postdays = sem_showPostDays();
- $firstcommentdate = sem_showFirstCommentDate();
- $commentdays = sem_showCommentDays();
- $postsperday = sem_showPostsPerDay();
- $commentsperday = sem_showCommentsPerDay();
- $numcommenters = sem_showNumCommenters();
- $statzstartdate = sem_showStatzStartDate();
- $statzdays = sem_showStatzDays();
- $numusersonline = sem_showNumUsersOnline();
+print "