i18n standard entries
Dieser Commit ist enthalten in:
Ursprung
f2f5f2be85
Commit
4e8dfa09aa
2 geänderte Dateien mit 76 neuen und 204 gelöschten Zeilen
|
@ -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';
|
||||
|
|
|
@ -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<br/>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<br/>CSS_ID: #lastposts"), "n/a"),
|
||||
array("sem_showMostReads", "10", semr_i18n("Formatted list"), semr_i18n("'n' most readed posts/pages with hits in brackets<br/>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 "<form>";
|
||||
print "<div class='wrap'>";
|
||||
print "<div id='icon-template' class='icon32'><br /></div>";
|
||||
print "<h2>SemmelstatzR > ".semr_i18n("Template-Functions")."</h2>";
|
||||
print "<br />";
|
||||
print "<table class='statzelement'>";
|
||||
print "<thead>";
|
||||
print "<tr>";
|
||||
print "<th style='text-align:left;'>".semr_i18n("Function")."</th>";
|
||||
print "<th style='text-align:left;width:26em;'>".semr_i18n("Syntax")."</th>";
|
||||
print "<th style='text-align:left;'>".semr_i18n("Returns")."</th>";
|
||||
print "<th style='text-align:left;'>".semr_i18n("Example")."</th>";
|
||||
print "<th style='text-align:left;'>".semr_i18n("Remarks")."</th>";
|
||||
print "</tr>";
|
||||
print "</thead>";
|
||||
print "<tbody>";
|
||||
|
||||
### DIE ANZEIGE
|
||||
|
||||
print "<form>";
|
||||
print "<div class='wrap'>";
|
||||
print "<div id='icon-template' class='icon32'><br /></div>";
|
||||
print "<h2>SemmelstatzR › Template-Funktionen</h2>";
|
||||
print "<br />";
|
||||
print "<table class='statzelement'>";
|
||||
print "<thead>";
|
||||
print "<tr>";
|
||||
print "<th style='text-align:left;'>Funktion</th>";
|
||||
print "<th style='text-align:left;width:26em;'>Syntax</th>";
|
||||
print "<th style='text-align:left;'>Rückgabewert</th>";
|
||||
print "<th style='text-align:left;'>Hier</th>";
|
||||
print "<th style='text-align:left;'>Bemerkung</th>";
|
||||
print "</tr>";
|
||||
print "</thead>";
|
||||
print "<tbody>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showTotalPosts</td>";
|
||||
print "<td><input type='text' value='<?php sem_showTotalPosts(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Ganzzahl</td>";
|
||||
print "<td>$totalposts</td>";
|
||||
print "<td>Anzahl aller Beiträge</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showTotalComments</td>";
|
||||
print "<td><input type='text' value='<?php sem_showTotalComments(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Ganzzahl</td>";
|
||||
print "<td>$totalcomments</td>";
|
||||
print "<td>Anzahl aller Kommentare</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showTotalUsers</td>";
|
||||
print "<td><input type='text' value='<?php sem_showTotalUsers(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Ganzzahl</td>";
|
||||
print "<td>$totalusers</td>";
|
||||
print "<td>Gesamtzahl aller Besucher seit Statistikaufzeichnung</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showAverageUserPerDay</td>";
|
||||
print "<td><input type='text' value='<?php sem_showAverageUserPerDay(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Dezimal</td>";
|
||||
print "<td>$averageuserperday</td>";
|
||||
print "<td>Durchschnittliche Anzahl der täglichen Besucher</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showFirstPostDate</td>";
|
||||
print "<td><input type='text' value='<?php sem_showFirstPostDate(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Datum (d.m.y)</td>";
|
||||
print "<td>$firstpostdate</td>";
|
||||
print "<td>Datum des 1. Posts</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showPostDays</td>";
|
||||
print "<td><input type='text' value='<?php sem_showPostDays(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Ganzzahl</td>";
|
||||
print "<td>$postdays</td>";
|
||||
print "<td>Zeitraum in Tagen seit 1. Beitrag</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>em_showFirstCommentDate</td>";
|
||||
print "<td><input type='text' value='<?php sem_showFirstCommentDate(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Datum (d.m.y)</td>";
|
||||
print "<td>$firstcommentdate</td>";
|
||||
print "<td>Datum des 1. Kommentars</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showCommentDays</td>";
|
||||
print "<td><input type='text' value='<?php sem_showCommentDays(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Ganzzahl</td>";
|
||||
print "<td>$commentdays</td>";
|
||||
print "<td>Zeitraum in Tagen seit 1. Kommentar</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showPostsPerDay</td>";
|
||||
print "<td><input type='text' value='<?php sem_showPostsPerDay(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Dezimal</td>";
|
||||
print "<td>$postsperday</td>";
|
||||
print "<td>Durchschnittliche Anzahl der Beiträge pro Tag</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showCommentsPerDay</td>";
|
||||
print "<td><input type='text' value='<?php sem_showCommentsPerDay(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Dezimal</td>";
|
||||
print "<td>$commentsperday</td>";
|
||||
print "<td>Durchschnittliche Anzahl der Kommentare pro Tag</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<td>sem_showNumCommenters</td>";
|
||||
print "<td><input type='text' value='<?php sem_showNumCommenters(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Ganzzahl</td>";
|
||||
print "<td>$numcommenters</td>";
|
||||
print "<td>Gesamtzahl aller Kommentierer</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showStatzStartDate</td>";
|
||||
print "<td><input type='text' value='<?php sem_showStatzStartDate(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Datum (d.m.y)</td>";
|
||||
print "<td>$statzstartdate</td>";
|
||||
print "<td>Beginn der Statistik</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showStatzDays</td>";
|
||||
print "<td><input type='text' value='<?php sem_showStatzDays(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Ganzzahl</td>";
|
||||
print "<td>$statzdays</td>";
|
||||
print "<td>Zeitraum der Statistik in Tagen</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showNumUsersOnline</td>";
|
||||
print "<td><input type='text' value='<?php sem_showNumUsersOnline(); ?>' class='regular-text' /></td>";
|
||||
print "<td>Ganzzahl</td>";
|
||||
print "<td>$numusersonline</td>";
|
||||
print "<td>User Online</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showLastComments</td>";
|
||||
print "<td><input type='text' value='<?php sem_showLastComments(10); ?>' class='regular-text' /></td>";
|
||||
print "<td>Formatierte Liste</td>";
|
||||
print "<td>n/a</td>";
|
||||
print "<td>Die neusten 'n' Kommentare mit Autor, Post, abwärts sortiert nach Datum<br />CSS-ID: #lastcomments</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showLastPosts</td>";
|
||||
print "<td><input type='text' value='<?php sem_showLastPosts(10); ?>' class='regular-text' /></td>";
|
||||
print "<td>Formatierte Liste</td>";
|
||||
print "<td>n/a</td>";
|
||||
print "<td>Die neusten 'n' Posts mit Titel, abwärts sortiert nach Datum<br />CSS-ID: #lastposts</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showMostReads</td>";
|
||||
print "<td><input type='text' value='<?php sem_showMostReads(10); ?>' class='regular-text' /></td>";
|
||||
print "<td>Formatierte Liste</td>";
|
||||
print "<td>n/a</td>";
|
||||
print "<td>Die 'n' meist gelesenen Post/Pages mit Hits in Klammern<br />CSS-ID: #mostreads</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>sem_showPostHitsInLoop</td>";
|
||||
print "<td><input type='text' value='<?php sem_showPostHitsInLoop(get_the_ID()); ?>' class='regular-text' /></td>";
|
||||
print "<td>Ganzzahl</td>";
|
||||
print "<td>Nur im Loop</td>";
|
||||
print "<td>Zeigt die Anzahl der Hits eines Posts an. Funktioniert nur im LOOP.</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td colspan='5'>";
|
||||
print "Sämtliche Funktionen (bis auf die letzte) sind außerhalb des LOOPS zu verwenden. Wird
|
||||
SEMMELSTATZ deaktiviert, und die Verfügbarkeit der Templatefunktion ist nicht mittels
|
||||
<code>if (function_exists...</code> sichergestellt, wird die Indexseite des Blogs fehlerhaft bzw.
|
||||
überhaupt nicht dargestellt.";
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>";
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "</tbody>";
|
||||
print "</table>";
|
||||
print "<hr />";
|
||||
|
||||
if (function_exists('sem_showCopyright')) sem_showCopyright();
|
||||
|
||||
print "</div>";
|
||||
|
||||
print "</form>";
|
||||
|
||||
// loop the functions array
|
||||
foreach ($aTemplates as $value) {
|
||||
if(empty($value[4])) {
|
||||
$funcret = call_user_func($value[0]);
|
||||
} else {
|
||||
$funcret = $value[4];
|
||||
}
|
||||
print "<tr>";
|
||||
print "<td>$value[0]</td>";
|
||||
print "<td><input type='text' value='<?php $value[0]($value[1]); ?>' class='regular-text' /></td>";
|
||||
print "<td>$value[2]</td>";
|
||||
print "<td>$funcret</td>";
|
||||
print "<td>$value[3]</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
print "<tr>";
|
||||
print "<td colspan='5'>";
|
||||
print semr_i18n("All functions (except the last one) you have to use outside the LOOP.
|
||||
Display of blog index page will be incorrect if semmelstatzR is deactivated and
|
||||
if you do not check for the existence of the templatefunctions
|
||||
using <code>if (function_exists...</code>");
|
||||
/*
|
||||
print "Sämtliche Funktionen (bis auf die letzte) sind außerhalb des LOOPS zu verwenden. Wird
|
||||
SEMMELSTATZ deaktiviert, und die Verfügbarkeit der Templatefunktion ist nicht mittels
|
||||
<code>if (function_exists...</code> sichergestellt, wird die Indexseite des Blogs fehlerhaft bzw.
|
||||
überhaupt nicht dargestellt.";
|
||||
*
|
||||
*/
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
print "</tbody>";
|
||||
print "</table>";
|
||||
print "<hr />";
|
||||
if (function_exists('sem_showCopyright')) sem_showCopyright();
|
||||
print "</div>";
|
||||
print "</form>";
|
||||
?>
|
Laden …
In neuem Issue referenzieren