217 Zeilen
7,7 KiB
PHP
217 Zeilen
7,7 KiB
PHP
|
<?php
|
|||
|
|
|||
|
/***********************************************
|
|||
|
* *
|
|||
|
* semmelstatz_templates.php v3.3 *
|
|||
|
* Copyright: <EFBFBD> 2005-2009 kopfhoch-studio *
|
|||
|
* *
|
|||
|
***********************************************/
|
|||
|
|
|||
|
if(!current_user_can('manage_statz')) {
|
|||
|
die('Zugriff verweigert');
|
|||
|
}
|
|||
|
|
|||
|
### TEMPLATES
|
|||
|
|
|||
|
$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();
|
|||
|
|
|||
|
### DIE ANZEIGE
|
|||
|
|
|||
|
print "<form>";
|
|||
|
print "<div class='wrap'>";
|
|||
|
print "<div id='icon-template' class='icon32'><br /></div>";
|
|||
|
print "<h2>Semmelstatz › 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>";
|
|||
|
|
|||
|
?>
|