1
0
Fork 0

Commits vergleichen

..

1 Commit

Autor SHA1 Nachricht Datum
Oldperl
fdb8779d8e tagged first beta 2011-11-14 16:05:49 +00:00
28 geänderte Dateien mit 1352 neuen und 8954 gelöschten Zeilen

Datei anzeigen

@ -1,53 +0,0 @@
/**
* file CHANGELOG
*
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-3.0.html
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* $Id$
*
*/
Release 1.0.0 (initial release)
------------------------------------------------------------------------------
** Bug
** Improvement
* cleanup for templates section, now an array is used for entries
* added pot-file for further translations
** New Feature
* added tracker image for use with cache plugins
* added agent class using an ini-file
* replace Google-charts with lib pChart
* add class upgrademe for upgrade notifications in plugin admin area
* add help section (only for wp<3.3 right now), help content has to be written
* added localization and semr functions to wrap wp-functions
* added notification feature for admin if beta or rc version is used
** Task
* transleted gettext for de_DE using generated pot-file
Semmelstatz 3.3
------------------------------------------------------------------------------
Original of plugin and startpoint of fork for semmelstatzR(eloaded)

94
README
Datei anzeigen

@ -1,94 +0,0 @@
/**
* file README
*
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0
* @author SEM-Team
* @copyright (c)2011-2014 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-3.0.html
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* $Id$
*
*/
*****************************************************************************************************************
Welcome to semmelstatzReloaded (semmelstatzR). :)
SemmelstatzR is a statistic plugin for wordpress 2.8 or newer, based on the well known wp-plugin semmelstatz by
Andreas 'Redunzl' Mueller.
** Installation **
Unzip and upload all files into your wordpress plugins folder. Log into wordpress admin area and choose
the plugins button in menu. If there were no problems you will find an entry for semmelstatzReloaded in
the pluginlist where you can activate semmelstatzR. SemmelstatzR will write some tables to your db.
If you have activeted the plugin, you will get a new submenu for semmelstatzR in the mainmenu.
Visit the Options-entry to do some configuration stuff.
Ad: If you will see an error-msg instead of charts, you probably have to add a cache directory to your
wp-content folder and give writeaccess to it.
** Update/Upgrade **
First make a backup of your db, esspecially from your statz tables. Then go to pluginslist in the admin
area and deactivate the old semmelstatzR version. Delete or Move all files in the plugins/semmelstatzR folder,
then unzip package semmelstatzR with the new version and upload all files into folder plugins/semmelstatzR.
If you are upgrading from a previous version of the original semmelstatz plugin please note that the name of
the pluginfolder has changed from 'semmelstatz' to 'semmelstatzR'.
There a no db changes in semR version 1.0.0 to previous semmelstatz 3.3. But if you are upgrading from an older
version of semmelstatz please update first to semmelstatz 3.3 before performing an upgrade to semmelstatzR 1.0.0.
Now you may reactivate the plugin in the plugins admin area.
Done, have fun. :)
** Usage **
In the future we will provide a webside at sf.net with documentation, faq and some tips.
The easiest way to lern how semmelstatzR can help you is going threw the menu in the admin area.
** libraries, extensions, helpers and licenses **
pChart - a PHP Charting library
Version: 2.1.3
License: http://www.gnu.org/licenses/gpl-3.0.html
Author: Jean-Damien POGOLOTTI
Homepage: http://www.pchart.net/
class upgrademe for wordpress (just the class, not as plugin)
Version: 0.2
License: http://www.gnu.org/licenses/gpl.html
Author: Meglio (Anton Andriyevskyy)
Plugin URI: https://github.com/meglio/wp-upgrademe
useragent ini file
Version: uas_20140127-01.ini
Homepage: http://user-agent-string.info
We want to say thank you to the following people for ideas, help and testing
silberling <silberling@pochta.ru>
Carsten <info@carsten-hoppe.de>
** Translations **
english SEM-Team (default)
german SEM-Team
If you want to translate semmelstatzR into a language not listed yet, we're pleased and we will
add your translation files (.mo and .po). Please contact us via sf.net or use our forums there.

Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist

Datei anzeigen

@ -1,34 +0,0 @@
{
"new_version": "1.2.0",
"url": "http://sourceforge.net/projects/semmelstatz",
"package": "http://sourceforge.net/projects/semmelstatz/files/latest/download",
"info":{
"name": "semmelstatzR",
"author": "<a href='http://sourceforge.net/projects/semmelstatz'>SEM-Team</a>",
"author_profile": "",
"requires": "2.8",
"tested": "3.3.2",
"compatibility":{
"2.8.2":{
"1.1.0":[0,0,0]
},
"3.3.2":{
"1.2.0":[0,0,0]
}
},
"rating": 99,
"num_ratings": 253,
"downloaded": 466,
"last_upated": "2012-05-21",
"added": "2010-04-01",
"homepage": "http://sourceforge.net/projects/semmelstatz",
"tags": {"wordpress":"wordpress","statistic":"upgrade","update":"update","wp":"wp","repository":"repsitory","plugins":"plugins"},
"sections":{
"description": "<h3>SemmelstatzR(eloaded), the next generation of the statistic-fetisch for Wordpress.</h3>If you don't wanna use automatic installer or it won't work you should download update for plugin directly and install manually using this <a href=\"http://sourceforge.net/projects/semmelstatz/files/latest/download\" target=\"_blank\">Link<\/a>",
"installation": "See README",
"screenshots":"",
"changelog":"We have changed a lot of stuff :)",
"faq":"No FAQ since now. If you have any question use our forums on sf.net."
}
}
}

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -192,7 +192,7 @@ class Agents {
} }
private function _getIniFile($sFile = null) { private function _getIniFile($sFile = null) {
if(is_null($sFile)) $sFile = dirname(__FILE__)."/data/uas_20140127-01.ini"; // default ini if(is_null($sFile)) $sFile = dirname(__FILE__)."/data/uas_20110628-02.ini"; // default ini
if(is_file($sFile) && is_readable($sFile)) { if(is_file($sFile) && is_readable($sFile)) {
$aTmpIni = parse_ini_file($sFile, true); $aTmpIni = parse_ini_file($sFile, true);

Datei anzeigen

@ -2,11 +2,9 @@
/** /**
* File: class.semmelstatzR.php * File: class.semmelstatzR.php
* *
* NOT USED RIGHT NOW
*
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since this class isn't used right now but it is decided to handle all semmelstatzR in the future * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/

Datei anzeigen

@ -10,7 +10,8 @@ Plugin URI: https://github.com/meglio/wp-upgrademe
if (!class_exists('Upgrademe')) { if (!class_exists('Upgrademe')) {
class Upgrademe { class Upgrademe
{
/** /**
* Stores parsed and validated data returned by unofficial APIs. * Stores parsed and validated data returned by unofficial APIs.
* @var array * @var array

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -69,7 +69,7 @@
} }
} }
### Auslesen der h<EFBFBD>chsten Post-ID ### Auslesen der höchsten Post-ID
function sem_getMaxPostID() { function sem_getMaxPostID() {
global $wpdb; global $wpdb;
$maxpostid = $wpdb->get_var("SELECT MAX(ID) FROM ".$wpdb->posts." LIMIT 0,1"); $maxpostid = $wpdb->get_var("SELECT MAX(ID) FROM ".$wpdb->posts." LIMIT 0,1");
@ -117,12 +117,7 @@ function sem_AreYouBot($user_agent) {
return $oCheckAgent->isBot(); return $oCheckAgent->isBot();
} }
/** ### Referer nach Suchmaschinen-Queries und interner Suche prüfen und Suchstring extrahieren
* Referer nach Suchmaschinen-Queries und interner Suche prüfen und Suchstring extrahieren
*
* @param string $referer
* @return string name of searchengine and keywords
*/
function sem_getKeyword($referer) { function sem_getKeyword($referer) {
if(empty($referer)) return false; if(empty($referer)) return false;
$homehost = '%'.(substr($_SERVER['SERVER_NAME'],0,4) == 'www.')? $homehost = '%'.(substr($_SERVER['SERVER_NAME'],0,4) == 'www.')?
@ -226,14 +221,14 @@ function sem_getKeyword($referer) {
elseif (preg_match("/".$homehost."/i", $keyword["host"])) { elseif (preg_match("/".$homehost."/i", $keyword["host"])) {
parse_str($keyword["query"],$q); parse_str($keyword["query"],$q);
$keyword = $q["s"]; $keyword = $q["s"];
if($keyword == "") return; return semr_i18n("Internal search: ").$keyword; if($keyword == "") return; return "Interne Suche: ".$keyword;
} }
else { else {
return; return;
} }
} }
### Anzahl der Datens<EFBFBD>tze in der statz-Tabelle ### Anzahl der Datensätze in der statz-Tabelle
function sem_showNumStatzEntries() { function sem_showNumStatzEntries() {
global $wpdb; global $wpdb;
$numstatzentries = $wpdb->get_var("SELECT COUNT(id) FROM ".$wpdb->statz); $numstatzentries = $wpdb->get_var("SELECT COUNT(id) FROM ".$wpdb->statz);
@ -264,41 +259,27 @@ function sem_getKeyword($referer) {
} }
} }
/** ### Zeigt Copyright-Notiz an
* prints a copyright notiz
*/
function sem_showCopyright() { function sem_showCopyright() {
print "<p class='copyright'>semmelstatzR ". SEMMELSTATZR_VERSION . print "<p class='copyright'>semmelstatzR ". SEMMELSTATZR_VERSION . " happily coded by <a target='_blank' href='http://semmelstatz.sourceforge.net/'>SEM-Team<br />
" happily coded by <a target='_blank' href='http://semmelstatz.sourceforge.net/'>SEM-Team<br />
<a target='_blank' style='border:none;' href='http://sourceforge.net/projects/semmelstatz/'> <a target='_blank' style='border:none;' href='http://sourceforge.net/projects/semmelstatz/'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/statzR.png' /></a></p>"; <img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/statzR.png' /></a></p>";
} }
/** ### statz-Tabelle leeren (NICHT LÖSCHEN!!!)
* empty statz table
*
* @global type $wpdb
* @return bool
*/
function sem_truncateStatzTable() { function sem_truncateStatzTable() {
global $wpdb; global $wpdb, $userip;
$wpdb->query('TRUNCATE TABLE '.$wpdb->statz); $wpdb->query('TRUNCATE TABLE '.$wpdb->statz);
sem_optStatzTable(); sem_optStatzTable();
return ($wpdb->query("INSERT INTO `$wpdb->statz`(ip, time, referer, page, username) VALUES('127.0.0.1', NOW(),NULL,0,'statz-Tabelle geleert')"))?true:false; return $wpdb->query("INSERT INTO `$wpdb->statz`(ip, time, referer, page, username) VALUES('127.0.0.1', NOW(),NULL,0,'statz-Tabelle geleert')");
} }
/** ### Obsolet, bleibt aber aus Kompatibilitätsgründen zu SEMMELSTATZ_DELETE
*
* @deprecated no need to hold unused functions in semR
* @todo remove in next major release
* @param int $days
* @return boolean
*/
function sem_delOldRecords($days) { function sem_delOldRecords($days) {
return true; return true;
} }
### simpleEncoding f<EFBFBD>r die GoogleChartAPI ### simpleEncoding für die GoogleChartAPI
function sem_encodeChartData($values) { function sem_encodeChartData($values) {
$maxValue = max($values); $maxValue = max($values);
@ -317,7 +298,7 @@ function sem_delOldRecords($days) {
return $chartData; return $chartData;
} }
### Datens<EFBFBD>tze <20>lter als statz_recdays_limit-Tage l<>schen ### Datensätze älter als statz_recdays_limit-Tage löschen
function sem_delOutOfLimit() { function sem_delOutOfLimit() {
global $wpdb; global $wpdb;
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
@ -328,7 +309,7 @@ function sem_delOldRecords($days) {
sem_optStatzTable(); sem_optStatzTable();
} }
### Wenn AUTOMATISCHES LIMIT aktiviert, dann LIMITIERE und erh<EFBFBD>he NEXT_CRON ### Wenn AUTOMATISCHES LIMIT aktiviert, dann LIMITIERE und erhöhe NEXT_CRON
function sem_doCronStatzLimit() { function sem_doCronStatzLimit() {
sem_delOutOfLimit(); sem_delOutOfLimit();
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
@ -349,10 +330,6 @@ function sem_delOldRecords($days) {
} }
### Unter bestimmten Voraussetzungen den Vortag in die statzhist-Tabelle schreiben ### Unter bestimmten Voraussetzungen den Vortag in die statzhist-Tabelle schreiben
/**
* @todo add action cache so we don't need to do it with every call
* @global type $wpdb
*/
function sem_writeYesterdayToHist() { function sem_writeYesterdayToHist() {
global $wpdb; global $wpdb;
if(!$wpdb->get_var("SELECT date FROM ".$wpdb->statzhist." WHERE substring(date,1,10) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)")) { if(!$wpdb->get_var("SELECT date FROM ".$wpdb->statzhist." WHERE substring(date,1,10) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)")) {
@ -402,10 +379,7 @@ VALUES('$date', $referers, $visitors, $hits)");
/** /**
* translate and return a string * translate and return a string
*
* @uses wp-function __() and prefilled plugin gettextdomain * @uses wp-function __() and prefilled plugin gettextdomain
* @author Ortwin Pinke
* @since 1.0.0
* *
* @param string $sValue string to translate * @param string $sValue string to translate
* @param string $sDomain gettextdomain * @param string $sDomain gettextdomain
@ -417,10 +391,7 @@ function semr_i18n($sValue, $sDomain = "semmelstatzR") {
/** /**
* translate and echo a string * translate and echo a string
*
* @uses wp-function _e() and prefilled plugin gettextdomain * @uses wp-function _e() and prefilled plugin gettextdomain
* @author Ortwin Pinke
* @since 1.0.0
* *
* @param string $sValue * @param string $sValue
* @param string $sDomain * @param string $sDomain
@ -432,10 +403,7 @@ function semr_i18ne($sValue, $sDomain = "semmelstatzR") {
/** /**
* translate and return a plural or singular string based on an amount * translate and return a plural or singular string based on an amount
*
* @uses wp-function _n() and prefilled plugin gettextdomain * @uses wp-function _n() and prefilled plugin gettextdomain
* @author Ortwin Pinke
* @since 1.0.0
* *
* @param string $sSingular * @param string $sSingular
* @param string $sPlural * @param string $sPlural
@ -447,61 +415,5 @@ function semr_i18np($sSingular, $sPlural, $iNumber, $sDomain = "semmelstatzR") {
return _n($sSingular, $sPlural, $iNumber, $sDomain); return _n($sSingular, $sPlural, $iNumber, $sDomain);
} }
/**
*
* @author anyexample.com
* @license modified MIT see http://www.anyexample.com/license/
* @link http://www.anyexample.com/programming/php/php_convert_rgb_from_to_html_hex_color.xml
* @since 1.0.0
*
* @param string $color
* @return array
*/
function semr_hex2rgb($color) {
if ($color[0] == '#')
$color = substr($color, 1);
if (strlen($color) == 6)
list($r, $g, $b) = array($color[0].$color[1],
$color[2].$color[3],
$color[4].$color[5]);
elseif (strlen($color) == 3)
list($r, $g, $b) = array($color[0].$color[0], $color[1].$color[1], $color[2].$color[2]);
else
return false;
$r = hexdec($r); $g = hexdec($g); $b = hexdec($b);
return array($r, $g, $b);
}
/**
*
* @author anyexample.com
* @license modified MIT see http://www.anyexample.com/license/
* @link http://www.anyexample.com/programming/php/php_convert_rgb_from_to_html_hex_color.xml
* @since 1.0.0
*
* @param int $r
* @param int $g
* @param int $b
* @return string
*/
function semr_rgb2hex($r, $g=-1, $b=-1) {
if (is_array($r) && sizeof($r) == 3)
list($r, $g, $b) = $r;
$r = intval($r); $g = intval($g);
$b = intval($b);
$r = dechex($r<0?0:($r>255?255:$r));
$g = dechex($g<0?0:($g>255?255:$g));
$b = dechex($b<0?0:($b>255?255:$b));
$color = (strlen($r) < 2?'0':'').$r;
$color .= (strlen($g) < 2?'0':'').$g;
$color .= (strlen($b) < 2?'0':'').$b;
return '#'.$color;
}
############################################## Ende SEMMELSTATZ-interne Funktionen ############################################## Ende SEMMELSTATZ-interne Funktionen
?> ?>

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -166,7 +166,7 @@
print "</div>"; print "</div>";
} }
### Zeigt einen Z<EFBFBD>hler der Hits im jeweiligen Post. ACHTUNG: FUNKTIONIERT NUR IM LOOP (index.php, single.php) ### Zeigt einen Zähler der Hits im jeweiligen Post. ACHTUNG: FUNKTIONIERT NUR IM LOOP (index.php, single.php)
function sem_showPostHitsInLoop($postid) { function sem_showPostHitsInLoop($postid) {
global $wpdb; global $wpdb;
$hits = $wpdb->get_var("SELECT hits FROM $wpdb->posts WHERE ID = $postid LIMIT 0,1"); $hits = $wpdb->get_var("SELECT hits FROM $wpdb->posts WHERE ID = $postid LIMIT 0,1");

Datei anzeigen

@ -1,133 +0,0 @@
<?php
/**
* File: start.php
*
* Startfile for help system, uses contextual help tab in admin area
* @todo write help tpl-files for default and german translation
*
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0 Beta
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-3.0.html
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* $Id$
*
*/
/**
* gives a hint for admins in admin area
*
* @author Ortwin Pinke
* @since 1.0.1 Beta
* @uses wp add_filter()
*/
function semr_admin_notice(){
if(!function_exists("get_user_meta") || !strstr($_GET['page'], "semmelstatzR")) return;
global $current_user ;
$user_id = $current_user->ID;
if(get_user_meta($user_id, 'semr_ignore_notice')) return;
if(strstr(SEMMELSTATZR_VERSION, "Beta") !== false) {
printf('<div class="updated">
<p>You are using a beta-version of semmelstatzReloaded.
We will notify you for any newer version or a final release.</p>
<a href="%1$s">Hide Notice</a>
</div>', '?page='.$_GET['page'].'&amp;semr_ignore_notice=0');
} else if(strstr(SEMMELSTATZR_VERSION, "RC") !== false) {
echo '<div class="updated">
<p>You are using a rc-version of semmelstatzReloaded.
We will notify you for any newer version or a final release.</p>
</div>';
}
}
add_filter('admin_notices', 'semr_admin_notice');
function semr_ignore_notice() {
global $current_user;
/* If user clicks to ignore the notice, add that to their user meta */
if ( isset($_GET['semr_ignore_notice']) && '0' == $_GET['semr_ignore_notice'] ) {
add_user_meta($current_user->ID, 'semr_ignore_notice', 'true', true);
}
}
add_action('admin_init', 'semr_ignore_notice');
function semr_show_notice() {
global $current_user;
/* If user clicks to ignore the notice, add that to their user meta */
if ( isset($_GET['semr_ignore_notice']) && '1' == $_GET['semr_ignore_notice'] ) {
//add_user_meta($current_user->ID, 'semr_ignore_notice', 'false', true);
delete_user_meta($current_user->ID, 'semr_ignore_notice');
}
}
add_action('admin_init', 'semr_show_notice');
/*
// just for debugging on local machines
function check_current_screen() {
echo '<div class="updated"><pre>';
if( !is_admin() ) return;
global $current_screen;
print_r( $current_screen );
echo '</pre></div>';
}
add_filter('admin_notices', 'check_current_screen');
*/
/**
* bind the help files with contextual help area of wp
*
* @author Ortwin Pinke
* @since 1.0.0
* @uses wp add_filter()
*
* @global array $semr_hook
* @global string $wp_version
* @param string $contextual_help
* @param string $screen_id
* @param array $screen
* @return string
*/
function semmelstatzR_help($contextual_help, $screen_id, $screen) {
global $semr_hook, $wp_version;
$semrContextHelp = '';
$sLang = (defined(WPLANG) && WPLANG != '')?WPLANG.DIRECTORY_SEPARATOR:'';
$aScreenId = explode("-", $screen_id);
if(is_array($semr_hook) && key_exists($aScreenId[1], $semr_hook)) {
if(version_compare($wp_version, "3.3", "<")) {
$sHelpPathDefault = SEMMELSTATZR_SRVPATH."includes/help/v32/default/".$aScreenId[1].".tpl";
$sHelpPathLang = SEMMELSTATZR_SRVPATH."includes/help/v32/".$sLang.$aScreenId[1].".tpl";
$sHelpFile = '';
if(file_exists($sHelpPathLang)) {
$sHelpFile = $sHelpPathLang;
} else if(file_exists($sHelpPathDefault)) {
$sHelpFile = $sHelpPathDefault;
}
if(!empty($sHelpFile)) $semrContextHelp = file_get_contents($sHelpFile);
} else {
include_once SEMMELSTATZR_SRVPATH."includes/help/v33/test.php";
return;
}
}
return $semrContextHelp.$contextual_help;
}
add_filter('contextual_help', 'semmelstatzR_help', 10, 3);
?>

Datei anzeigen

@ -1,14 +0,0 @@
<?php
function semmelstatzR_contextual_help($contextual_help, $screen_id, $screen) {
// replace edit with the base of the page you're adding the help info to
if (strcmp($screen->base, 'semmelstatzR/semmelstatzR-statz') == 0 ) {
$customized_help = $contextual_help . 'Here is some very useful information...';
return $customized_help;
}
// Let the default WP Dashboard help stuff through on other Admin pages
return $contextual_help;
}
add_action('contextual_help', 'semmelstatzR_contextual_help', 10, 3);
?>

Datei anzeigen

@ -1,4 +0,0 @@
<div>
<h3>Semmelstatz Help</h3>
<p>Here we have to write some context help for semmelstatzR. :)</p>
</div>

Datei anzeigen

@ -1,82 +0,0 @@
<?php
/*
Plugin Name: Sample 3.3 Help Tabs Plugins
Plugin URI: http://pippinsplugins.com/
Description: Put custom functions in this plugin
Author: Pippin Williamson
Author URI: http://pippinsplugins.com
Version: 1.0
*/
add_action('admin_menu', 'pippin_admin_add_page');
function pippin_admin_add_page() {
global $pippin_options_page;
$pippin_options_page = add_options_page(__('Sample Help Tabs', 'pippin'), __('Sample help Tabs', 'pippin'), 'manage_options', 'options-test', 'pippin_options_page');
add_action("load-$pippin_options_page", 'pippin_plugin_help_tabs');
}
function pippin_plugin_help_tabs() {
global $pippin_options_page;
$screen = get_current_screen();
if($screen->id != $pippin_options_page)
return;
$screen->add_help_tab(array(
'id' => 'pippins-usage',
'title' => __('Using the Plugin', 'pippin'),
'content' => pippin_help_tab_content('pippin-usage')
));
$screen->add_help_tab(array(
'id' => 'pippins-settings',
'title' => __('Plugin Settings', 'pippin'),
'content' => pippin_help_tab_content('pippin-settings')
));
$screen->add_help_tab(array(
'id' => 'pippins-css',
'title' => __('Custom CSS', 'pippin'),
'content' => pippin_help_tab_content('pippin-css')
));
}
function pippin_help_tab_content($tab = 'pippin-usage') {
if($tab == 'pippin-usage') {
ob_start(); ?>
<h3><?php _e('Using the plugin', 'pippin'); ?></h3>
<p>In scelerisque, placerat nec urna in pulvinar rhoncus vut dolor tincidunt dapibus in ac massa sit tristique egestas? Non, integer dis massa egestas eros! Elementum vel rhoncus! Et lorem sed lundium nascetur amet! Et scelerisque sit. Egestas tincidunt, quis enim urna arcu mattis rhoncus nisi nec enim tincidunt! Augue magnis.</p>
<p>In scelerisque, placerat nec urna in pulvinar rhoncus vut dolor tincidunt dapibus in ac massa sit tristique egestas? Non, integer dis massa egestas eros! Elementum vel rhoncus! Et lorem sed lundium nascetur amet! Et scelerisque sit. Egestas tincidunt, quis enim urna arcu mattis rhoncus nisi nec enim tincidunt! Augue magnis.</p>
<?php
return ob_get_clean();
} elseif ($tab == 'pippin-settings') {
ob_start(); ?>
<h3><?php _e('Plugin Settings', 'pippin'); ?></h3>
<p>In scelerisque, placerat nec urna in pulvinar rhoncus vut dolor tincidunt dapibus in ac massa sit tristique egestas? Non, integer dis massa egestas eros! Elementum vel rhoncus! Et lorem sed lundium nascetur amet! Et scelerisque sit. Egestas tincidunt, quis enim urna arcu mattis rhoncus nisi nec enim tincidunt! Augue magnis.</p>
<?php
return ob_get_clean();
} elseif ($tab == 'pippin-css') {
ob_start(); ?>
<h3><?php _e('Custom CSS', 'pippin'); ?></h3>
<p>In scelerisque, placerat nec urna in pulvinar rhoncus vut dolor tincidunt dapibus in ac massa sit tristique egestas? Non, integer dis massa egestas eros! Elementum vel rhoncus! Et lorem sed lundium nascetur amet! Et scelerisque sit. Egestas tincidunt, quis enim urna arcu mattis rhoncus nisi nec enim tincidunt! Augue magnis.</p>
<ul>
<li>List Item Sample</li>
<li>List Item Sample</li>
<li>List Item Sample</li>
<li>List Item Sample</li>
</ul>
<?php
return ob_get_clean();
}
}
function pippin_options_page() {
ob_start(); ?>
<div class="wrap">
<h2><?php _e('Sample Help Tab', 'pippin'); ?></h2>
<p>This is out settings page content. Click the "Help" menu above to see the new help tabs.</p>
</div>
<?php
echo ob_get_clean();
}
?>

Datei anzeigen

@ -1,17 +0,0 @@
<?php
$aArgs1 = array(
'title'=>'Options',
'id'=>1,
'content'=>'Dies ist ein Tescht'
);
$aArgs2 = array(
'title'=>'Table Stuff',
'id'=>2,
'content'=>'Dies ist ein Tescht'
);
if(strstr($semr_hook['options'], get_current_screen()->id)) {
get_current_screen()->add_help_tab($aArgs1);
get_current_screen()->add_help_tab($aArgs2);
}
?>

Binäre Datei nicht angezeigt.

Datei anzeigen

@ -1,534 +1,90 @@
# This is the pot-file to translate semmelstatzR into your preferred language.
# Copyright (C) 2011 SEM-TEAM
# This file is distributed under the same license as the semmelstatzR package.
# Ortwin Pinke <me@ortwinpinke.de>, 2011.
#
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: semmelstatzR 1.0.0\n" "Project-Id-Version: semmelstatzR\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-12-19 19:10+0100\n" "POT-Creation-Date: 2011-08-23 18:59+0100\n"
"PO-Revision-Date: 2013-08-27 17:36+0100\n" "PO-Revision-Date: 2011-08-23 18:59+0100\n"
"Last-Translator: Ortwin Pinke <translation@dceonline.de>\n" "Last-Translator: Ortwin Pinke <translation@dceonline.de>\n"
"Language-Team: SEM-Team <semr@ortwinpinke.de>\n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_c;_ngettext:1,2;_x:2c,1;semr_i18n\n"
"X-Poedit-Basepath: ../../\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n" "Plural-Forms: nplurals=2; plural=n != 1;\n"
"Language: de_DE\n" "X-Poedit-Language: German\n"
"X-Generator: Poedit 1.5.7\n" "X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Country: GERMANY\n"
"X-Poedit-SearchPath-0: semmelstatzR\n"
#: semmelstatzR-statz.php:71 #: semmelstatzR/semmelstatzR.php:96
msgid "Visitor online"
msgid_plural "Visitors online"
msgstr[0] "Besucher online"
msgstr[1] "Besucher online"
#: semmelstatzR-statz.php:72 semmelstatzR-statz.php:250
msgid "Today"
msgstr "Heute"
#: semmelstatzR-statz.php:75 semmelstatzR-history.php:76
#: semmelstatzR-history.php:139 semmelstatzR-history.php:203
#: semmelstatzR-history.php:258
msgid "no entries"
msgstr "Keine Eintr&auml;ge"
#: semmelstatzR-statz.php:82 semmelstatzR-log.php:79
msgid "Username"
msgstr "Benutzername"
#: semmelstatzR-statz.php:83 semmelstatzR-statz.php:401
#: semmelstatzR-statz.php:443 semmelstatzR-statz.php:515
#: semmelstatzR-log.php:78
msgid "Post/Page"
msgstr "Post/Seite"
#: semmelstatzR-statz.php:84 semmelstatzR-statz.php:351
#: semmelstatzR-log.php:75
msgid "TCP/IP"
msgstr "TCP/IP"
#: semmelstatzR-statz.php:85 semmelstatzR-statz.php:300
#: semmelstatzR-statz.php:349
msgid "Time"
msgstr "Zeit"
#: semmelstatzR-statz.php:94
msgid "startpage"
msgstr "Startseite"
#: semmelstatzR-statz.php:102
msgid "no page"
msgstr "keine Seite"
#: semmelstatzR-statz.php:146
msgid "Visitors: Last 24 hours"
msgstr "Besucher: Letzte 24 Stunden"
#: semmelstatzR-statz.php:150 semmelstatzR-statz.php:230
#: semmelstatzR-statz.php:293 semmelstatzR-statz.php:342
#: semmelstatzR-statz.php:394 semmelstatzR-statz.php:436
#: semmelstatzR-statz.php:475 semmelstatzR-statz.php:507
#: semmelstatzR-statz.php:549 semmelstatzR-log.php:67
msgid "no entries at all"
msgstr "Noch keine Eintr&auml;ge"
#: semmelstatzR-statz.php:206 semmelstatzR-history.php:110
#: semmelstatzR-history.php:173 semmelstatzR-history.php:236
msgid "No Chart: Cannot find cache-folder!"
msgstr "Keine Chartanzeige: Kann den Cache-Ordner nicht finden!"
#: semmelstatzR-statz.php:208 semmelstatzR-history.php:112
#: semmelstatzR-history.php:175 semmelstatzR-history.php:238
msgid "No Chart: Missing rights for cache-folder!"
msgstr "Keine Chartanzeige: Fehlende Zugriffsrechte f&uuml;r den Cache-Ordner"
#: semmelstatzR-statz.php:227
#, php-format
msgid "%s-Days-Statz"
msgstr "%s-Tage-Statistik"
#: semmelstatzR-statz.php:237 semmelstatzR-history.php:264
#: semmelstatzR-log.php:74
msgid "Date"
msgstr "Datum"
#: semmelstatzR-statz.php:238 semmelstatzR-history.php:265
msgid "Visitors"
msgstr "Besucher"
#: semmelstatzR-statz.php:239 semmelstatzR-statz.php:403
#: semmelstatzR-statz.php:445 semmelstatzR-history.php:266
msgid "Hits"
msgstr "Zugriffe"
#: semmelstatzR-statz.php:240
msgid "Referer"
msgstr "Referrer"
#: semmelstatzR-statz.php:253
msgid "Yesterday"
msgstr "Gestern"
#: semmelstatzR-statz.php:256
msgid "2 days ago"
msgstr "Vorgestern"
#: semmelstatzR-statz.php:272
msgid "more"
msgstr "mehr"
#: semmelstatzR-statz.php:290
#, php-format
msgid "The last %s Referrer"
msgstr "Die letzten %s Referrer"
#: semmelstatzR-statz.php:301 semmelstatzR-history.php:267
#: semmelstatzR-log.php:76
msgid "Referrer"
msgstr "Referrer"
#: semmelstatzR-statz.php:339
#, php-format
msgid "The last %s search terms"
msgstr "Die letzten %s Suchbegriffe"
#: semmelstatzR-statz.php:350
msgid "search term"
msgstr "Suchbegriff"
#: semmelstatzR-statz.php:392
msgid "Top 10 of todays posts &amp; pages"
msgstr "Top 10 der Posts &amp; Seiten Heute"
#: semmelstatzR-statz.php:402 semmelstatzR-statz.php:444
msgid "Postname"
msgstr "Postname"
#: semmelstatzR-statz.php:433
#, php-format
msgid "Top %s of all posts &amp; pages"
msgstr "Top %s aller Posts &amp; Seiten"
#: semmelstatzR-statz.php:472
msgid "Known visitors today"
msgstr "Bekannte Besucher heute"
#: semmelstatzR-statz.php:482
msgid "Visitor (Hits)"
msgstr "Besucher (Zugriffe)"
#: semmelstatzR-statz.php:505
msgid "Top 10 of all commented posts"
msgstr "Top 10 aller kommentierten Posts"
#: semmelstatzR-statz.php:516 semmelstatzR-statz.php:560
msgid "Comments"
msgstr "Kommentare"
#: semmelstatzR-statz.php:546
#, php-format
msgid "Top %s of all commentators"
msgstr "Top %s aller Kommentatoren"
#: semmelstatzR-statz.php:557
msgid "User"
msgstr "Benutzer"
#: semmelstatzR-statz.php:558
msgid "Email"
msgstr "E-Mail"
#: semmelstatzR-statz.php:559
msgid "Homepage"
msgstr "Homepage"
#: semmelstatzR-statz.php:591 semmelstatzR.php:96
msgid "Current Statz" msgid "Current Statz"
msgstr "Aktuelle Statistik" msgstr "Aktuell"
#: semmelstatzR-history.php:49 semmelstatzR-templates.php:49 #: semmelstatzR/semmelstatzR.php:97
#: semmelstatzR-log.php:49
msgid "Restricted Area"
msgstr "Zugriff verboten"
#: semmelstatzR-history.php:72
msgid "Visitors: Last 30 days"
msgstr "Besucher: Die letzten 30 Tage"
#: semmelstatzR-history.php:133
#, php-format
msgid "Visitors: Last %s month"
msgid_plural "Visitors: Last %s month"
msgstr[0] "Besucher: Letzter Monat"
msgstr[1] "Besucher: Letzte %s Monate"
#: semmelstatzR-history.php:198
#, php-format
msgid "Visitors: %s day back"
msgid_plural "Visitors: %s days back"
msgstr[0] "Besucher: seit %s Tag "
msgstr[1] "Besucher: seit %s Tagen "
#: semmelstatzR-history.php:255
#, php-format
msgid "Last %s day"
msgid_plural "Last %s days"
msgstr[0] "Vergangener Tag"
msgstr[1] "Vergangene %s Tage"
#: semmelstatzR-history.php:294 semmelstatzR-database.php:105
msgid "Total"
msgstr "Gesamt"
#: semmelstatzR-history.php:300
msgid "Average"
msgstr "Durchschnitt"
#: semmelstatzR-history.php:315 semmelstatzR.php:99
msgid "History" msgid "History"
msgstr "Historie" msgstr "Historie"
#: includes/functions.semr.php:229 #: semmelstatzR/semmelstatzR.php:98
msgid "Internal search: "
msgstr "Interne Suche:"
#: semmelstatzR-options.php:78
msgid "Options saved"
msgstr "Einstellungen gespeichert"
#: semmelstatzR-options.php:83
msgid "<i>statz</i>-table emptied succesfully."
msgstr "<i>statz</i>-Tabelle erfolgreich geleert."
#: semmelstatzR-options.php:126 semmelstatzR.php:111
msgid "Options"
msgstr "Einstellungen"
#: semmelstatzR-options.php:128
msgid "Save Changes"
msgstr "&Auml;nderungen speichern"
#: semmelstatzR-options.php:133
msgid "Use tracking image"
msgstr "Tracking Image benutzen"
#: semmelstatzR-options.php:137
msgid ""
"Use a pixelimage in the footer to track visitors. Only needed with some "
"cache-plugins. - (Default: Off)"
msgstr ""
"Benutze ein Pixel-Bild im Footer der Seite um Besuche zu z&auml;hlen. Muss "
"nur bei einigen Cache-Plugins verwendet werden. - (default: Aus)"
#: semmelstatzR-database.php:57 semmelstatzR-database.php:59
#: semmelstatzR.php:105
msgid "Database"
msgstr "Datenbank"
#: semmelstatzR-database.php:62
msgid "No."
msgstr "Nr."
#: semmelstatzR-database.php:63
msgid "Tables"
msgstr "Tabellen"
#: semmelstatzR-database.php:64
msgid "Records"
msgstr "Datens&auml;tze"
#: semmelstatzR-database.php:65 semmelstatzR-database.php:67
msgid "Data"
msgstr "Daten"
#: semmelstatzR-database.php:66 semmelstatzR-database.php:67
msgid "Index"
msgstr "Index"
#: semmelstatzR-database.php:68
msgid "Overhang"
msgstr "&Uuml;berhang"
#: semmelstatzR-database.php:115
#, php-format
msgid ""
"Only the WORDPRESS tables belonging to the blog <b>%s</b> will be shown."
msgstr ""
"Es werden ausschlie&szlig;lich die WORDPRESS-Tabellen angezeigt, die zum "
"Blog '<b>%s</b>' geh&ouml;ren."
#: semmelstatzR-templates.php:54 semmelstatzR-templates.php:55
#: semmelstatzR-templates.php:56 semmelstatzR-templates.php:59
#: semmelstatzR-templates.php:61 semmelstatzR-templates.php:64
#: semmelstatzR-templates.php:66 semmelstatzR-templates.php:67
#: semmelstatzR-templates.php:71
msgid "Integer"
msgstr "Ganzzahl"
#: semmelstatzR-templates.php:54
msgid "Number of all Posts"
msgstr "Anzahl aller Posts"
#: semmelstatzR-templates.php:55
msgid "Number of all Comments"
msgstr "Anzahl aller Kommentare"
#: semmelstatzR-templates.php:56
msgid "Total Number of all visitors since statistics started"
msgstr "Gesamtzahl aller Besucher seit dem Start der Statistik"
#: semmelstatzR-templates.php:57 semmelstatzR-templates.php:62
#: semmelstatzR-templates.php:63
msgid "Decimal"
msgstr "Dezimal"
#: semmelstatzR-templates.php:57
msgid "Average of daily visitors"
msgstr "Durchschnitt der t&auml;glichen Besucher"
#: semmelstatzR-templates.php:58 semmelstatzR-templates.php:60
#: semmelstatzR-templates.php:65
msgid "Date (d.m.y)"
msgstr "Datum (d.m.y)"
#: semmelstatzR-templates.php:58
msgid "Date of the first post"
msgstr "Datum des 1. Posts"
#: semmelstatzR-templates.php:59
msgid "Days since first post"
msgstr "Vergange Tage seit dem 1. Post"
#: semmelstatzR-templates.php:60
msgid "Date of the first comment"
msgstr "Datum des 1. Kommentar"
#: semmelstatzR-templates.php:61
msgid "Days since first comment"
msgstr "Vergange Tage seit dem 1. Kommentar"
#: semmelstatzR-templates.php:62
msgid "Average of posts per day"
msgstr "Durchschnittliche Anzahl Posts pro Tag"
#: semmelstatzR-templates.php:63
msgid "Average of comments per day"
msgstr "Durchschnittliche Anzahl Kommentare pro Tag"
#: semmelstatzR-templates.php:64
msgid "Total of all commentators"
msgstr "Gesamtzahl aller Kommentatoren"
#: semmelstatzR-templates.php:65
msgid "Date of commencement of statistics"
msgstr "Datum des Beginns der Statistik"
#: semmelstatzR-templates.php:66
msgid "Period of the statistics in days"
msgstr "Zeitraum der Statistik in Tagen"
#: semmelstatzR-templates.php:67
msgid "Number of users online"
msgstr "Anzahl Benutzer online"
#: semmelstatzR-templates.php:68 semmelstatzR-templates.php:69
#: semmelstatzR-templates.php:70
msgid "Formatted list"
msgstr "Formatierte Liste"
#: semmelstatzR-templates.php:68
msgid ""
"The 'n' newest comments with author, post, sorted by date desc<br/>CSS-ID: "
"#lastcomments"
msgstr ""
"Die 'n' neuesten Kommentare mit Autor, Post, absteigend sortiert nach dem "
"Datum.<br/>CSS-ID: #lastcomments"
#: semmelstatzR-templates.php:69
msgid ""
"The 'n' newest posts with title, sorted bei date desc<br/>CSS_ID: #lastposts"
msgstr ""
"Die 'n' neuesten Posts mit Titel, absteigend sortiert nach Datum.<br/>CSS-"
"ID: #lastposts"
#: semmelstatzR-templates.php:70
msgid ""
"'n' most readed posts/pages with hits in brackets<br/>CSS-ID: #mostreads"
msgstr ""
"Die 'n' meistgelesenen Posts/Seiten mit Zugriffen in Klammern.<br/>CSS-ID: "
"#mostreads"
#: semmelstatzR-templates.php:71
msgid "Shows count of hits of a post. Only works in the LOOP"
msgstr "Zeigt die Anzahl der Zugriffe eines Post. Funktioniert nur im LOOP."
#: semmelstatzR-templates.php:77
msgid "Template-Functions"
msgstr "Template-Funktionen"
#: semmelstatzR-templates.php:82
msgid "Function"
msgstr "Funktion"
#: semmelstatzR-templates.php:83
msgid "Syntax"
msgstr "Syntax"
#: semmelstatzR-templates.php:84
msgid "Returns"
msgstr "R&uuml;ckgabewert"
#: semmelstatzR-templates.php:85
msgid "Example"
msgstr "Aktuell / Hier"
#: semmelstatzR-templates.php:86
msgid "Remarks"
msgstr "Bemerkung"
#: semmelstatzR-templates.php:108
msgid ""
"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>"
msgstr ""
"S&auml;mtliche Funktionen (bis auf die letzte) sind au&szlig;erhalb des "
"LOOPS zu verwenden. Wird SEMMELSTATZ deaktiviert, und die Verf&uuml;gbarkeit "
"der Templatefunktion ist nicht mittels <code>if (function_exists...</code> "
"sichergestellt, wird die Indexseite des Blogs fehlerhaft bzw. &uuml;berhaupt "
"nicht dargestellt."
#: semmelstatzR-log.php:61 semmelstatzR.php:102
msgid "Log" msgid "Log"
msgstr "Log" msgstr "Log"
#: semmelstatzR-log.php:63 #: semmelstatzR/semmelstatzR.php:99
#, php-format msgid "Database"
msgid "The %s newest records" msgstr "Datenbank"
msgstr "Die %s neuesten Eintr&auml;ge"
#: semmelstatzR-log.php:77 #: semmelstatzR/semmelstatzR.php:100
msgid "Search term"
msgstr "Suchbegriff"
#: semmelstatzR.php:108
msgid "Templates" msgid "Templates"
msgstr "Templates" msgstr "Templates"
#: semmelstatzR.php:178 #: semmelstatzR/semmelstatzR.php:101
msgid "" msgid "Options"
"Cannot find <i>wp-admin/upgrade-functions.php</i> and <i>wp-admin/includes/" msgstr "Optionen"
"upgrade.php</i>!"
msgstr ""
"Kann <i>wp-admin/upgrade-functions.php</i> und <i>wp-admin/includes/upgrade."
"php</i> nicht finden!"
#: semmelstatzR.php:292 #: semmelstatzR/semmelstatzR.php:273
#, php-format #, php-format
msgid "%d Visitor online" msgid "%d Visitor online"
msgid_plural "%d Visitors online" msgid_plural "%d Visitors online"
msgstr[0] "%d Besucher online" msgstr[0] "%d Besucher online"
msgstr[1] "%d Besucher online" msgstr[1] "%d Besucher online"
#: semmelstatzR.php:294 #: semmelstatzR/semmelstatzR.php:275
#, php-format #, php-format
msgid "Today: %s" msgid "Today: %s"
msgstr "Heute: %s" msgstr "Heute: %s"
#: semmelstatzR.php:295 #: semmelstatzR/semmelstatzR.php:276
msgid "more..." msgid "more..."
msgstr "mehr..." msgstr "mehr..."
#: semmelstatzR.php:299 #: semmelstatzR/semmelstatzR.php:296
#, php-format
msgid "This blog is online since %s that are %s days.<br>"
msgstr "Dieser Blog ist seit %s, das sind %s Tage.<br/>"
#: semmelstatzR.php:302
#, php-format
msgid "SemmelstatzR collects the statistics since %s."
msgstr "SemmelstatzR sammelt die Statistik seit %s."
#: semmelstatzR.php:335
msgid "Show semR Info:"
msgstr "semR-Info anzeigen:"
#: semmelstatzR.php:337
msgid "Number of Items (max. 10):" msgid "Number of Items (max. 10):"
msgstr "Anzahl der Eintr&auml;ge (max. 10):" msgstr "Anzahl der Einträge (max. 20):"
#: semmelstatzR.php:372 #: semmelstatzR/semmelstatzR.php:319
msgid "... no entries" msgid "... no entries"
msgstr "... keine Eintr&auml;ge" msgstr "... keine Einträge"
#: semmelstatzR.php:380 #: semmelstatzR/semmelstatzR.php:327
#, php-format #, php-format
msgid "%d Visitor" msgid "%d Visitor"
msgid_plural "%d Visitors" msgid_plural "%d Visitors"
msgstr[0] "%d Besucher" msgstr[0] "%d Besucher"
msgstr[1] "%d Besucher" msgstr[1] "%d Besucher"
#: semmelstatzR.php:381 #: semmelstatzR/semmelstatzR.php:328
#, php-format #, php-format
msgid "%d Hit" msgid "%d Hit"
msgid_plural "%d Hits" msgid_plural "%d Hits"
msgstr[0] "%d Zugriff" msgstr[0] "%d Aufruf"
msgstr[1] "%d Zugriffe" msgstr[1] "%d Aufrufe"
#: semmelstatzR.php:382 #: semmelstatzR/semmelstatzR.php:329
#, php-format #, php-format
msgid "%d Referer" msgid "%d Referrer"
msgid_plural "%d Referers" msgid_plural "%d Referrers"
msgstr[0] "%d Referrer" msgstr[0] "%d Referer"
msgstr[1] "%d Referrer" msgstr[1] "%d Referer"
#: semmelstatzR.php:5 #~ msgid "Number of Whatever:"
msgid "" #~ msgstr "Anzahl von Was auch immer:"
"Visitorstatistic for Wordpress, based upon the original wp-plugin "
"semmelstatz by Andreas 'Redunzl' Mueller (http://www.kopfhoch-studio.de)"
msgstr ""
"Besucherstatistik f&uuml;r Wordpress, auf Grundlage des original Wordpress-"
"Plugins von Andreas 'Redunzl' Mueller (http://www.kopfhoch-studio.de)"

Datei anzeigen

@ -1,508 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-12-19 19:10+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: semmelstatzR-statz.php:71
msgid "Visitor online"
msgid_plural "Visitors online"
msgstr[0] ""
msgstr[1] ""
#: semmelstatzR-statz.php:72 semmelstatzR-statz.php:250
msgid "Today"
msgstr ""
#: semmelstatzR-statz.php:75 semmelstatzR-history.php:76
#: semmelstatzR-history.php:139 semmelstatzR-history.php:203
#: semmelstatzR-history.php:258
msgid "no entries"
msgstr ""
#: semmelstatzR-statz.php:82 semmelstatzR-log.php:79
msgid "Username"
msgstr ""
#: semmelstatzR-statz.php:83 semmelstatzR-statz.php:401
#: semmelstatzR-statz.php:443 semmelstatzR-statz.php:515
#: semmelstatzR-log.php:78
msgid "Post/Page"
msgstr ""
#: semmelstatzR-statz.php:84 semmelstatzR-statz.php:351
#: semmelstatzR-log.php:75
msgid "TCP/IP"
msgstr ""
#: semmelstatzR-statz.php:85 semmelstatzR-statz.php:300
#: semmelstatzR-statz.php:349
msgid "Time"
msgstr ""
#: semmelstatzR-statz.php:94
msgid "startpage"
msgstr ""
#: semmelstatzR-statz.php:102
msgid "no page"
msgstr ""
#: semmelstatzR-statz.php:146
msgid "Visitors: Last 24 hours"
msgstr ""
#: semmelstatzR-statz.php:150 semmelstatzR-statz.php:230
#: semmelstatzR-statz.php:293 semmelstatzR-statz.php:342
#: semmelstatzR-statz.php:394 semmelstatzR-statz.php:436
#: semmelstatzR-statz.php:475 semmelstatzR-statz.php:507
#: semmelstatzR-statz.php:549 semmelstatzR-log.php:67
msgid "no entries at all"
msgstr ""
#: semmelstatzR-statz.php:206 semmelstatzR-history.php:110
#: semmelstatzR-history.php:173 semmelstatzR-history.php:236
msgid "No Chart: Cannot find cache-folder!"
msgstr ""
#: semmelstatzR-statz.php:208 semmelstatzR-history.php:112
#: semmelstatzR-history.php:175 semmelstatzR-history.php:238
msgid "No Chart: Missing rights for cache-folder!"
msgstr ""
#: semmelstatzR-statz.php:227
#, php-format
msgid "%s-Days-Statz"
msgstr ""
#: semmelstatzR-statz.php:237 semmelstatzR-history.php:264
#: semmelstatzR-log.php:74
msgid "Date"
msgstr ""
#: semmelstatzR-statz.php:238 semmelstatzR-history.php:265
msgid "Visitors"
msgstr ""
#: semmelstatzR-statz.php:239 semmelstatzR-statz.php:403
#: semmelstatzR-statz.php:445 semmelstatzR-history.php:266
msgid "Hits"
msgstr ""
#: semmelstatzR-statz.php:240
msgid "Referer"
msgstr ""
#: semmelstatzR-statz.php:253
msgid "Yesterday"
msgstr ""
#: semmelstatzR-statz.php:256
msgid "2 days ago"
msgstr ""
#: semmelstatzR-statz.php:272
msgid "more"
msgstr ""
#: semmelstatzR-statz.php:290
#, php-format
msgid "The last %s Referrer"
msgstr ""
#: semmelstatzR-statz.php:301 semmelstatzR-history.php:267
#: semmelstatzR-log.php:76
msgid "Referrer"
msgstr ""
#: semmelstatzR-statz.php:339
#, php-format
msgid "The last %s search terms"
msgstr ""
#: semmelstatzR-statz.php:350
msgid "search term"
msgstr ""
#: semmelstatzR-statz.php:392
msgid "Top 10 of todays posts &amp; pages"
msgstr ""
#: semmelstatzR-statz.php:402 semmelstatzR-statz.php:444
msgid "Postname"
msgstr ""
#: semmelstatzR-statz.php:433
#, php-format
msgid "Top %s of all posts &amp; pages"
msgstr ""
#: semmelstatzR-statz.php:472
msgid "Known visitors today"
msgstr ""
#: semmelstatzR-statz.php:482
msgid "Visitor (Hits)"
msgstr ""
#: semmelstatzR-statz.php:505
msgid "Top 10 of all commented posts"
msgstr ""
#: semmelstatzR-statz.php:516 semmelstatzR-statz.php:560
msgid "Comments"
msgstr ""
#: semmelstatzR-statz.php:546
#, php-format
msgid "Top %s of all commentators"
msgstr ""
#: semmelstatzR-statz.php:557
msgid "User"
msgstr ""
#: semmelstatzR-statz.php:558
msgid "Email"
msgstr ""
#: semmelstatzR-statz.php:559
msgid "Homepage"
msgstr ""
#: semmelstatzR-statz.php:591 semmelstatzR.php:96
msgid "Current Statz"
msgstr ""
#: semmelstatzR-history.php:49 semmelstatzR-templates.php:49
#: semmelstatzR-log.php:49
msgid "Restricted Area"
msgstr ""
#: semmelstatzR-history.php:72
msgid "Visitors: Last 30 days"
msgstr ""
#: semmelstatzR-history.php:133
#, php-format
msgid "Visitors: Last %s month"
msgid_plural "Visitors: Last %s month"
msgstr[0] ""
msgstr[1] ""
#: semmelstatzR-history.php:198
#, php-format
msgid "Visitors: %s day back"
msgid_plural "Visitors: %s days back"
msgstr[0] ""
msgstr[1] ""
#: semmelstatzR-history.php:255
#, php-format
msgid "Last %s day"
msgid_plural "Last %s days"
msgstr[0] ""
msgstr[1] ""
#: semmelstatzR-history.php:294 semmelstatzR-database.php:105
msgid "Total"
msgstr ""
#: semmelstatzR-history.php:300
msgid "Average"
msgstr ""
#: semmelstatzR-history.php:315 semmelstatzR.php:99
msgid "History"
msgstr ""
#: includes/functions.semr.php:229
msgid "Internal search: "
msgstr ""
#: semmelstatzR-options.php:78
msgid "Options saved"
msgstr ""
#: semmelstatzR-options.php:83
msgid "<i>statz</i>-table emptied succesfully."
msgstr ""
#: semmelstatzR-options.php:126 semmelstatzR.php:111
msgid "Options"
msgstr ""
#: semmelstatzR-options.php:128
msgid "Save Changes"
msgstr ""
#: semmelstatzR-options.php:133
msgid "Use tracking image"
msgstr ""
#: semmelstatzR-options.php:137
msgid ""
"Use a pixelimage in the footer to track visitors. Only needed with some "
"cache-plugins. - (Default: Off)"
msgstr ""
#: semmelstatzR-database.php:57 semmelstatzR-database.php:59
#: semmelstatzR.php:105
msgid "Database"
msgstr ""
#: semmelstatzR-database.php:62
msgid "No."
msgstr ""
#: semmelstatzR-database.php:63
msgid "Tables"
msgstr ""
#: semmelstatzR-database.php:64
msgid "Records"
msgstr ""
#: semmelstatzR-database.php:65 semmelstatzR-database.php:67
msgid "Data"
msgstr ""
#: semmelstatzR-database.php:66 semmelstatzR-database.php:67
msgid "Index"
msgstr ""
#: semmelstatzR-database.php:68
msgid "Overhang"
msgstr ""
#: semmelstatzR-database.php:115
#, php-format
msgid ""
"Only the WORDPRESS tables belonging to the blog <b>%s</b> will be shown."
msgstr ""
#: semmelstatzR-templates.php:54 semmelstatzR-templates.php:55
#: semmelstatzR-templates.php:56 semmelstatzR-templates.php:59
#: semmelstatzR-templates.php:61 semmelstatzR-templates.php:64
#: semmelstatzR-templates.php:66 semmelstatzR-templates.php:67
#: semmelstatzR-templates.php:71
msgid "Integer"
msgstr ""
#: semmelstatzR-templates.php:54
msgid "Number of all Posts"
msgstr ""
#: semmelstatzR-templates.php:55
msgid "Number of all Comments"
msgstr ""
#: semmelstatzR-templates.php:56
msgid "Total Number of all visitors since statistics started"
msgstr ""
#: semmelstatzR-templates.php:57 semmelstatzR-templates.php:62
#: semmelstatzR-templates.php:63
msgid "Decimal"
msgstr ""
#: semmelstatzR-templates.php:57
msgid "Average of daily visitors"
msgstr ""
#: semmelstatzR-templates.php:58 semmelstatzR-templates.php:60
#: semmelstatzR-templates.php:65
msgid "Date (d.m.y)"
msgstr ""
#: semmelstatzR-templates.php:58
msgid "Date of the first post"
msgstr ""
#: semmelstatzR-templates.php:59
msgid "Days since first post"
msgstr ""
#: semmelstatzR-templates.php:60
msgid "Date of the first comment"
msgstr ""
#: semmelstatzR-templates.php:61
msgid "Days since first comment"
msgstr ""
#: semmelstatzR-templates.php:62
msgid "Average of posts per day"
msgstr ""
#: semmelstatzR-templates.php:63
msgid "Average of comments per day"
msgstr ""
#: semmelstatzR-templates.php:64
msgid "Total of all commentators"
msgstr ""
#: semmelstatzR-templates.php:65
msgid "Date of commencement of statistics"
msgstr ""
#: semmelstatzR-templates.php:66
msgid "Period of the statistics in days"
msgstr ""
#: semmelstatzR-templates.php:67
msgid "Number of users online"
msgstr ""
#: semmelstatzR-templates.php:68 semmelstatzR-templates.php:69
#: semmelstatzR-templates.php:70
msgid "Formatted list"
msgstr ""
#: semmelstatzR-templates.php:68
msgid ""
"The 'n' newest comments with author, post, sorted by date desc<br/>CSS-ID: "
"#lastcomments"
msgstr ""
#: semmelstatzR-templates.php:69
msgid ""
"The 'n' newest posts with title, sorted bei date desc<br/>CSS_ID: #lastposts"
msgstr ""
#: semmelstatzR-templates.php:70
msgid ""
"'n' most readed posts/pages with hits in brackets<br/>CSS-ID: #mostreads"
msgstr ""
#: semmelstatzR-templates.php:71
msgid "Shows count of hits of a post. Only works in the LOOP"
msgstr ""
#: semmelstatzR-templates.php:77
msgid "Template-Functions"
msgstr ""
#: semmelstatzR-templates.php:82
msgid "Function"
msgstr ""
#: semmelstatzR-templates.php:83
msgid "Syntax"
msgstr ""
#: semmelstatzR-templates.php:84
msgid "Returns"
msgstr ""
#: semmelstatzR-templates.php:85
msgid "Example"
msgstr ""
#: semmelstatzR-templates.php:86
msgid "Remarks"
msgstr ""
#: semmelstatzR-templates.php:108
msgid ""
"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>"
msgstr ""
#: semmelstatzR-log.php:61 semmelstatzR.php:102
msgid "Log"
msgstr ""
#: semmelstatzR-log.php:63
#, php-format
msgid "The %s newest records"
msgstr ""
#: semmelstatzR-log.php:77
msgid "Search term"
msgstr ""
#: semmelstatzR.php:108
msgid "Templates"
msgstr ""
#: semmelstatzR.php:178
msgid ""
"Cannot find <i>wp-admin/upgrade-functions.php</i> and <i>wp-admin/includes/"
"upgrade.php</i>!"
msgstr ""
#: semmelstatzR.php:292
#, php-format
msgid "%d Visitor online"
msgid_plural "%d Visitors online"
msgstr[0] ""
msgstr[1] ""
#: semmelstatzR.php:294
#, php-format
msgid "Today: %s"
msgstr ""
#: semmelstatzR.php:295
msgid "more..."
msgstr ""
#: semmelstatzR.php:299
#, php-format
msgid "This blog is online since %s that are %s days.<br>"
msgstr ""
#: semmelstatzR.php:302
#, php-format
msgid "SemmelstatzR collects the statistics since %s."
msgstr ""
#: semmelstatzR.php:335
msgid "Show semR Info:"
msgstr ""
#: semmelstatzR.php:337
msgid "Number of Items (max. 10):"
msgstr ""
#: semmelstatzR.php:372
msgid "... no entries"
msgstr ""
#: semmelstatzR.php:380
#, php-format
msgid "%d Visitor"
msgid_plural "%d Visitors"
msgstr[0] ""
msgstr[1] ""
#: semmelstatzR.php:381
#, php-format
msgid "%d Hit"
msgid_plural "%d Hits"
msgstr[0] ""
msgstr[1] ""
#: semmelstatzR.php:382
#, php-format
msgid "%d Referer"
msgid_plural "%d Referers"
msgstr[0] ""
msgstr[1] ""

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -54,18 +54,18 @@ if(current_user_can('manage_statz')) {
print "<div class='wrap'>"; print "<div class='wrap'>";
print "<div><a name='top'></a></div>"; print "<div><a name='top'></a></div>";
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>"; print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("Database")."</h2>"; print "<h2>SemmelstatzR &rsaquo; Datenbank</h2>";
print "<div class='statz'>".semr_i18n("Database")."</div>"; print "<div class='statz'>Datenbank</div>";
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<tr>"; print "<tr>";
print "<th style='text-align:center;width:6%'>".semr_i18n("No.")."</th>"; print "<th style='text-align:center;width:6%'>Nr.</th>";
print "<th style='text-align:left;width:20%'>".semr_i18n("Tables")."</th>"; print "<th style='text-align:left;width:20%'>Tabellen</th>";
print "<th style='text-align:right;width:10%'>".semr_i18n("Records")."</th>"; print "<th style='text-align:right;width:10%'>Datens&auml;tze</th>";
print "<th style='text-align:right;width:10%'>".semr_i18n("Data")."</th>"; print "<th style='text-align:right;width:10%'>Daten</th>";
print "<th style='text-align:right;width:10%'>".semr_i18n("Index")."</th>"; print "<th style='text-align:right;width:10%'>Index</th>";
print "<th style='text-align:right;width:10%'>".semr_i18n("Data")." &amp; ".semr_i18n("Index")."</th>"; print "<th style='text-align:right;width:10%'>Daten & Index</th>";
print "<th style='text-align:right;width:7%'>".semr_i18n("Overhang")."</th>"; print "<th style='text-align:right;width:7%'>&Uuml;berhang</th>";
$row_usage = 0; $row_usage = 0;
$data_usage = 0; $data_usage = 0;
@ -102,7 +102,7 @@ if(current_user_can('manage_statz')) {
} }
print "<tr>"; print "<tr>";
print "<th style='text-align:center;'>".semr_i18n("Total")."</th>"; print "<th style='text-align:center;'>Gesamt</th>";
print "<th style='text-align:left;'>&nbsp;</th>"; print "<th style='text-align:left;'>&nbsp;</th>";
print "<th style='text-align:right;'>".number_format($row_usage,0,',','.')."</th>"; print "<th style='text-align:right;'>".number_format($row_usage,0,',','.')."</th>";
print "<th style='text-align:right;'>".number_format($data_usage/1024,0,',','.')."&nbsp;kb</th>"; print "<th style='text-align:right;'>".number_format($data_usage/1024,0,',','.')."&nbsp;kb</th>";
@ -111,9 +111,8 @@ if(current_user_can('manage_statz')) {
print "<th style='color:#ff0000;text-align:right;'>".number_format($overhead_usage/1024,2,',','.')."&nbsp;kb</th>"; print "<th style='color:#ff0000;text-align:right;'>".number_format($overhead_usage/1024,2,',','.')."&nbsp;kb</th>";
print "</tr>"; print "</tr>";
print "<tr><td colspan='7'><p align='right'>"; print "<tr><td colspan='7'><p align='right'>Es werden ausschlie&szlig;lich die WORDPRESS-Tabellen angezeigt, die zum Blog <b>'".get_option('blogname')."'</b> geh&ouml;ren.</p></td></tr>";
printf(semr_i18n("Only the WORDPRESS tables belonging to the blog <b>%s</b> will be shown."), get_option('blogname'));
print "</p></td></tr>";
print "</table>"; print "</table>";
print "<hr />"; print "<hr />";

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -46,34 +46,24 @@
*/ */
if(!current_user_can('manage_statz')) { if(!current_user_can('manage_statz')) {
die(semr_i18n("Restricted Area")); die('Zugriff verweigert');
} }
include_once plugin_dir_path(__FILE__).'includes/pChart/class/pData.class.php'; include_once plugin_dir_path(__FILE__).'includes/pChart/class/pData.class.php';
include_once plugin_dir_path(__FILE__).'includes/pChart/class/pDraw.class.php'; include_once plugin_dir_path(__FILE__).'includes/pChart/class/pDraw.class.php';
include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php'; include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
/**
* chart for last 30 days
*
* @uses pChart
* @since 1.0.0
* @todo use own semR chart class
*
* @global wpdb $wpdb
* @return void
*/
function sem_drawLast30DaysGoo() { function sem_drawLast30DaysGoo() {
global $wpdb; global $wpdb;
//$sql = $wpdb->get_results("ALTER TABLE ".$wpdb->statzhist." ORDER BY date ASC"); //$sql = $wpdb->get_results("ALTER TABLE ".$wpdb->statzhist." ORDER BY date ASC");
$results = $wpdb->get_results("SELECT DAY(date) as days, visitors FROM ".$wpdb->statzhist." WHERE date >= NOW() - INTERVAL 31 DAY ORDER BY date ASC"); $results = $wpdb->get_results("SELECT DAY(date) as days, visitors FROM ".$wpdb->statzhist." WHERE date >= NOW() - INTERVAL 31 DAY ORDER BY date ASC");
print "<div class='statz'>".semr_i18n("Visitors: Last 30 days")."</div>"; print "<div class='statz'>Besucher: Die letzten 30 Tage</div>";
print "<div align='left'>"; print "<div align='left'>";
if (empty($results)) { if (empty($results)) {
print "<small>... ".semr_i18n("no entries")."</small></div>"; print "<small>... noch keine Eintr&auml;ge</small></div>";
return; return;
} }
@ -117,26 +107,19 @@ function sem_drawLast30DaysGoo() {
print "<hr />"; print "<hr />";
} }
/** ### HISTORY Monatsgrafik GOOGLE-API
* chart of all month
*
* @global wpdb $wpdb
* @return void
*/
function sem_drawAllMonthGoo() { function sem_drawAllMonthGoo() {
global $wpdb; global $wpdb;
$nummonths = $wpdb->get_var("SELECT MONTH(date) FROM ".$wpdb->statzhist); $nummonths = $wpdb->get_var("SELECT MONTH(date) FROM ".$wpdb->statzhist);
$results = $wpdb->get_results("SELECT MONTH(date) as months, SUM(visitors) as visitors FROM ".$wpdb->statzhist." GROUP BY months ORDER BY date ASC"); $results = $wpdb->get_results("SELECT MONTH(date) as months, SUM(visitors) as visitors FROM ".$wpdb->statzhist." GROUP BY months ORDER BY date ASC");
print "<div class='statz'>"; print "<div class='statz'>Besucher: Die letzten ".$nummonths." Monate</div>";
printf(semr_i18np("Visitors: Last %s month", "Visitors: Last %s month", $nummonths), $nummonths);
print "</div>";
print "<div align='left'>"; print "<div align='left'>";
if (empty($results)) { if (empty($results)) {
print "<small>... ".semr_i18n("no entries")."</small></div>"; print "<small>... noch keine Eintr&auml;ge</small></div>";
return; return;
} }
@ -180,12 +163,10 @@ function sem_drawAllMonthGoo() {
print "<hr />"; print "<hr />";
} }
/** ### HISTORY ALLE historischen Tage
*
* @global wpdb $wpdb
* @return void
*/
function sem_drawAllDaysGoo() { function sem_drawAllDaysGoo() {
/* @var $wpdb wpdb */
global $wpdb; global $wpdb;
$numdays = $wpdb->get_var("SELECT COUNT(date) FROM ".$wpdb->statzhist); $numdays = $wpdb->get_var("SELECT COUNT(date) FROM ".$wpdb->statzhist);
@ -194,13 +175,11 @@ function sem_drawAllDaysGoo() {
FROM ".$wpdb->statzhist." GROUP BY date ORDER BY date ASC"); FROM ".$wpdb->statzhist." GROUP BY date ORDER BY date ASC");
print "<div class='statz'>"; print "<div class='statz'>Besucher: ".$numdays." Tage zur&uuml;ck</div>";
printf(semr_i18np("Visitors: %s day back", "Visitors: %s days back", $numdays), $numdays);
print "</div>";
print "<div align='left'>"; print "<div align='left'>";
if (empty($results)) { if (empty($results)) {
print "<small>... ".semr_i18n("no entries")."</small></div>"; print "<small>... noch keine Eintr&auml;ge</small></div>";
return; return;
} }
@ -251,20 +230,18 @@ function sem_drawAllDaysGoo() {
$results = $wpdb->get_results("SELECT referers, visitors, hits, substring(date,1,10) AS date $results = $wpdb->get_results("SELECT referers, visitors, hits, substring(date,1,10) AS date
FROM ".$wpdb->statzhist." GROUP BY date ORDER BY date DESC"); FROM ".$wpdb->statzhist." GROUP BY date ORDER BY date DESC");
print "<div class='statz'>"; print "<div class='statz'>Die letzten ".$numdays." Tage</div>";
printf(semr_i18np("Last %s day", "Last %s days", $numdays), $numdays);
print "</div>";
if (empty($results)) { if (empty($results)) {
print "<small>... ".semr_i18n("no entries")."</small></div>"; print "<small>... noch keine Eintr&auml;ge</small>";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='width:15%;text-align:center;'>".semr_i18n("Date")."</th>"; print "<th style='width:15%;text-align:center;'>Datum</th>";
print "<th style='width:10%;text-align:right;'>".semr_i18n("Visitors")."</th>"; print "<th style='width:10%;text-align:right;'>Besucher</th>";
print "<th style='width:10%;text-align:right;'>".semr_i18n("Hits")."</th>"; print "<th style='width:10%;text-align:right;'>Hits</th>";
print "<th style='width:10%;text-align:right;'>".semr_i18n("Referrer")."</th>"; print "<th style='width:10%;text-align:right;'>Referer</th>";
print "<th style='text-align:right;'>&nbsp;</th>"; print "<th style='text-align:right;'>&nbsp;</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
@ -291,13 +268,13 @@ function sem_drawAllDaysGoo() {
print "<tr><td>&nbsp;</td></tr>"; print "<tr><td>&nbsp;</td></tr>";
print "<tr class='alternate'"; print ">"; print "<tr class='alternate'"; print ">";
print "<td style='text-align:center;'><b>".semr_i18n("Total")."</b></td>"; print "<td style='text-align:center;'><b>Gesamt</b></td>";
print "<td style='text-align:right;'><b>".$sum_visitors."</b></td>"; print "<td style='text-align:right;'><b>".$sum_visitors."</b></td>";
print "<td style='text-align:right;'><b>".$sum_hits."</b></td>"; print "<td style='text-align:right;'><b>".$sum_hits."</b></td>";
print "<td style='text-align:right;'><b>".$sum_referers."</b></td>"; print "<td style='text-align:right;'><b>".$sum_referers."</b></td>";
print "</tr>"; print "</tr>";
print "<tr>"; print "<tr>";
print "<td style='text-align:center;'><b>".semr_i18n("Average")."</b></td>"; print "<td style='text-align:center;'><b>Durchschnitt</b></td>";
print "<td style='text-align:right;'>".ceil($sum_visitors / $numdays)."</td>"; print "<td style='text-align:right;'>".ceil($sum_visitors / $numdays)."</td>";
print "<td style='text-align:right;'>".ceil($sum_hits / $numdays)."</td>"; print "<td style='text-align:right;'>".ceil($sum_hits / $numdays)."</td>";
print "<td style='text-align:right;'>".ceil($sum_referers / $numdays)."</td>"; print "<td style='text-align:right;'>".ceil($sum_referers / $numdays)."</td>";
@ -312,7 +289,7 @@ function sem_drawAllDaysGoo() {
print "<div class='wrap'>"; print "<div class='wrap'>";
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>"; print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("History")."</h2>"; print "<h2>SemmelstatzR &rsaquo; Historie</h2>";
sem_drawLast30DaysGoo(); sem_drawLast30DaysGoo();
sem_drawAllMonthGoo(); sem_drawAllMonthGoo();

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -46,37 +46,37 @@
*/ */
if(!current_user_can('manage_statz')) { if(!current_user_can('manage_statz')) {
die(semr_i18n("Restricted Area")); die('Zugriff verweigert');
} }
### ANZEIGE LOG
global $wpdb; global $wpdb;
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
$limit = $sem_options["statz_datarecs_limit"]; $mask = $sem_options["statz_mask_referer"]; $limit = $sem_options["statz_datarecs_limit"]; $mask = $sem_options["statz_mask_referer"];
$completerecords = $wpdb->get_results("SELECT id, ip, time, referer, page, username FROM ". $completerecords =
$wpdb->statz." ORDER BY time DESC LIMIT 0, ".$limit); $wpdb->get_results("SELECT id, ip, time, referer, page, username FROM ".$wpdb->statz." ORDER BY time DESC LIMIT 0, ".$limit);
print "<div class='wrap'>"; print "<div class='wrap'>";
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>"; print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("Log")."</h2>"; print "<h2>SemmelstatzR &rsaquo; Log</h2>";
print "<div class='statz'>"; print "<div class='statz'>Die neuesten ".$limit." Datens&auml;tze</div>";
printf(semr_i18n("The %s newest records"), $limit);
print "</div>";
if ($completerecords == NULL) { if ($completerecords == NULL) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small>";
return; return;
} }
print "<table cellpadding='5' style='text-align:center; width:100%;'>"; print "<table cellpadding='5' style='text-align:center; width:100%;'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align:center;width:110px;'><small>".semr_i18n("Date")."</small></th>"; print "<th style='text-align:center;width:110px;'><small>Datum</small></th>";
print "<th style='text-align:center;width:80px;'><small>".semr_i18n("TCP/IP")."</small></th>"; print "<th style='text-align:center;width:80px;'><small>TCP/IP</small></th>";
print "<th style='text-align:left;'><small>".semr_i18n("Referrer")."</small></th>"; print "<th style='text-align:left;'><small>Referer</small></th>";
print "<th style='text-align:left;'><small>".semr_i18n("Search term")."</small></th>"; print "<th style='text-align:left;'><small>Suchbegriff</small></th>";
print "<th style='text-align:left;'><small>".semr_i18n("Post/Page")."</small></th>"; print "<th style='text-align:left;'><small>Post/Page</small></th>";
print "<th style='text-align:left;'><small>".semr_i18n("Username")."</small></th>"; print "<th style='text-align:left;'><small>Username</small></th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -46,7 +46,7 @@
*/ */
if(!current_user_can('manage_statz')) { if(!current_user_can('manage_statz')) {
die('Acces denied!!!'); die('Zugriff verweigert');
} }
if(isset($_POST['options_save'])) { if(isset($_POST['options_save'])) {
@ -90,17 +90,17 @@ if(!current_user_can('manage_statz')) {
if($sem_options["statz_recdays_limit"] < 1 || (!is_numeric($sem_options["statz_recdays_limit"]))) $sem_options["statz_recdays_limit"] = 1; if($sem_options["statz_recdays_limit"] < 1 || (!is_numeric($sem_options["statz_recdays_limit"]))) $sem_options["statz_recdays_limit"] = 1;
update_option("semmelstatzR_options", $sem_options); update_option("semmelstatzR_options", $sem_options);
echo "<div class='updated fade'><p>".semr_i18n("Successfully saved limit value.")."</p></div>"; echo "<div class='updated fade'><p>Der Wert f&uuml;r das Limit wurde erfolgreich gespeichert.</p></div>";
} }
if(isset($_POST['limit_execute'])) { if(isset($_POST['limit_execute'])) {
$days = $sem_options["statz_recdays_limit"]; $days = $sem_options["statz_recdays_limit"];
if(($days >= sem_showStatzDays()) || (!is_numeric($days))) { if(($days >= sem_showStatzDays()) || (!is_numeric($days))) {
echo "<div class='error fade'><p>".semr_i18n("Given value is no number or to big!")."</p></div>"; echo "<div class='error fade'><p>Der eingegebene Wert ist keine Zahl oder zu gro&szlig;!</p></div>";
} }
else { else {
if ($result == sem_delOutOfLimit()) { if ($result == sem_delOutOfLimit()) {
echo "<div class='updated fade'>".sprintf(semr_i18n("Successfully shortened <i>statz</i>-table to %s days."), $days)."</p></div>"; echo "<div class='updated fade'><p>Die <i>statz</i>-Tabelle wurde erfolgreich auf ".$days." Tage gek&uuml;rzt.</p></div>";
} }
} }
} }
@ -134,56 +134,57 @@ if(!current_user_can('manage_statz')) {
<td><input name="statz_use_img" type="checkbox" id="statz_write_admins" value="statz_use_img" <td><input name="statz_use_img" type="checkbox" id="statz_write_admins" value="statz_use_img"
<?php if($sem_options["statz_use_img"] == TRUE) {?> checked="checked" <?php } ?> /> <?php if($sem_options["statz_use_img"] == TRUE) {?> checked="checked" <?php } ?> />
</td> </td>
<td><?php echo semr_i18n('Use a pixelimage in the footer to track visitors. Only needed with some cache-plugins. - (default: off)'); ?></td> <td><?php echo semr_i18n('Use a pixelimage in the footer to track visitors. Only needed with some cache-plugins. - (Default: Off)'); ?></td>
</tr> </tr>
<tr style="background:#eee;" valign="middle"> <tr style="background:#eee;" valign="middle">
<th><?php echo semr_i18n('Log blog administrators'); ?></th> <th>Blog-Administratoren aufzeichnen</th>
<td><input name="statz_write_admins" type="checkbox" id="statz_write_admins" value="statz_write_admins" <td><input name="statz_write_admins" type="checkbox" id="statz_write_admins" value="statz_write_admins"
<?php if($sem_options["statz_write_admins"] == TRUE) {?> checked="checked" <?php } ?> /> <?php if($sem_options["statz_write_admins"] == TRUE) {?> checked="checked" <?php } ?> />
</td> </td>
<td><?php echo semr_i18n('All frontend hits of blog-admin(s) are tracked - (default: off)'); ?></td> <td>Trackt alle Zugriffe des/der Blog-Admins im Frontend des Blogs - (default: AUS)</td>
</tr> </tr>
<tr valign="middle"> <tr valign="middle">
<th><?php echo semr_i18n('Log blog-user'); ?></th> <th>Blog-User aufzeichnen</th>
<td><input name="statz_write_users" type="checkbox" id="statz_write_users" value="statz_write_users" <td><input name="statz_write_users" type="checkbox" id="statz_write_users" value="statz_write_users"
<?php if($sem_options["statz_write_users"] == TRUE) {?> checked="checked" <?php } ?> /> <?php if($sem_options["statz_write_users"] == TRUE) {?> checked="checked" <?php } ?> />
</td> </td>
<td><?php echo semr_i18n('All frontend hits of registered blog-users are tracked - (default: off)'); ?></td> <td>Trackt alle Zugriffe der registrierten Blog-User im Frontend des Blogs - (default: AUS)</td>
</tr> </tr>
<tr style="background:#eee;" valign="middle"> <tr style="background:#eee;" valign="middle">
<th><?php echo semr_i18n('Disguised record of IP addresses'); ?></th> <th>IP-Adressen codiert aufzeichnen</th>
<td><input name="statz_encode_ip" type="checkbox" id="statz_encode_ip" value="statz_encode_ip" <td><input name="statz_encode_ip" type="checkbox" id="statz_encode_ip" value="statz_encode_ip"
<?php if($sem_options["statz_encode_ip"] == TRUE) {?> checked="checked" <?php } ?> /> <?php if($sem_options["statz_encode_ip"] == TRUE) {?> checked="checked" <?php } ?> />
</td> </td>
<td><?php echo semr_i18n('In some countries there are restrictions by law to use and/or store an IP address <td>Der Gesetzgeber verbietet die Aufzeichnung der IP-Adresse eines Besuchers &uuml;ber dessen
longer than the time of visit. If you activate this option SEMMELSTATZ will hide IP by a simple arithmetical process. zeitlichen Verbleib auf einer Webseite hinaus. Nach Aktivierung dieser Option rechnet SEMMELSTATZ
Therefor no readable IP address will be stored to <i>statz</i>-table - (default: off)'); ?></td> die IP-Adresse des Besuchers nach einem simplen arithmetischen Verfahren um. Somit schreibt
SEMMELSTATZ keine IP-Adressen im Klartext in die <i>statz</i>-Tabelle - (default: AUS)</td>
</tr> </tr>
<tr valign="middle"> <tr valign="middle">
<th><?php echo sprintf(semr_i18np('Show statz of last <input name="statz_days_limit" type="text" id="statz_days_limit" <th>Statz der letzten <input name="statz_days_limit" type="text" id="statz_days_limit"
value="%s" style="text-align:center;" size="2" maxlength="2" /> day', value="<?php echo $sem_options["statz_days_limit"]; ?>" style="text-align:center;" size="2" maxlength="2" />
'Show statz of last <input name="statz_days_limit" type="text" id="statz_days_limit" Tage anzeigen
value="%s" style="text-align:center;" size="2" maxlength="2" /> days', </th>
$sem_options["statz_days_limit"]), $sem_options["statz_days_limit"])?></th>
<td><input name="statz_show_dailystatz" type="checkbox" id="statz_show_dailystatz" value="statz_show_dailystatz" <td><input name="statz_show_dailystatz" type="checkbox" id="statz_show_dailystatz" value="statz_show_dailystatz"
<?php if($sem_options["statz_show_dailystatz"] == TRUE) {?> checked="checked" <?php } ?> /> <?php if($sem_options["statz_show_dailystatz"] == TRUE) {?> checked="checked" <?php } ?> />
</td> </td>
<td><?php echo semr_i18n('Daily visitor/hits/referer in absolute terms, with descending date - (default: 7 , on)'); ?></td> <td>Tages&uuml;bersicht Besucher-Hits-Referer in absoluten Zahlen mit absteigendem Datum - (default: 7, AN)</td>
</tr> </tr>
<tr style="background:#eee;" valign="middle"> <tr style="background:#eee;" valign="middle">
<th><?php echo sprintf(semr_i18n('Show %s referer'), <th><input name="statz_referer_limit" type="text" id="statz_referer_limit"
'<input name="statz_referer_limit" type="text" id="statz_referer_limit" value="<?php echo $sem_options["statz_referer_limit"]; ?>" style="text-align:center;" size="2" maxlength="2" />
value="'.$sem_options["statz_referer_limit"].'" style="text-align:center;" size="2" maxlength="2" />'); ?></th> Referer anzeigen
</th>
<td><input name="statz_show_referers" type="checkbox" id="statz_show_referers" value="statz_show_referers" <td><input name="statz_show_referers" type="checkbox" id="statz_show_referers" value="statz_show_referers"
<?php if($sem_options["statz_show_referers"] == TRUE) {?> checked="checked" <?php } ?> /> <?php if($sem_options["statz_show_referers"] == TRUE) {?> checked="checked" <?php } ?> />
</td> </td>
<td><?php echo sprintf(semr_i18n('List of %s links to websites which backlink to this blog - (default: 10, on)'), <td>Listet <?php echo $sem_options["statz_referer_limit"]; ?> Links auf Webseiten, die auf dieses Blog
$sem_options["statz_referer_limit"]); ?></td> verweisen - (default: 10, AN)</td>
</tr> </tr>
<tr valign="middle"> <tr valign="middle">

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -60,79 +60,57 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
$onlinetime = $sem_options["statz_online_time"]; $onlinetime = $sem_options["statz_online_time"];
/** @todo add show_vars to semr-config */
$sem_options['show_utrace'] = $sem_options['show_whois'] = $sem_options['show_arin'] = true;
$onlineusers = $wpdb->get_results("SELECT DISTINCT username, page, ip, time $onlineusers = $wpdb->get_results("SELECT DISTINCT username, page, ip, time
FROM ".$wpdb->statz." WHERE time > Now() - INTERVAL ".$onlinetime." SECOND GROUP BY ip ORDER BY page DESC"); FROM ".$wpdb->statz." WHERE time > Now() - INTERVAL ".$onlinetime." SECOND GROUP BY ip ORDER BY page DESC");
print "<div class='statz'>"; print "<div class='statz'>".sem_showNumUsersOnline()." Besucher online - Heute: ".sem_showTodayStatz()."</div>";
$iUsersOnline = (int) sem_showNumUsersOnline();
printf("%s ".semr_i18np("Visitor online", "Visitors online", $iUsersOnline), $iUsersOnline);
print " - ".semr_i18n("Today").": ".sem_showTodayStatz()."</div>";
if (empty($onlineusers)) { if (empty($onlineusers)) {
print "<small>... ".semr_i18n("no entries")."</small>"; print "<small>... keine Eintr&auml;ge</small>";
print "<hr />"; print "<hr />";
return; return;
} }
print '<table class="statzelement">'; print "<table class='statzelement'>";
print '<thead>'; print "<thead>";
print '<tr>'; print "<tr>";
print '<th style="text-align:left;">'.semr_i18n("Username").'</th>'; print "<th style='text-align:left;'>Username</th>";
print '<th style="text-align:left;">'.semr_i18n("Post/Page").'</th>'; print "<th style='text-align:left;'>Post/Page</th>";
print '<th style="text-align:left;">'.semr_i18n("TCP/IP").'</th>'; print "<th style='text-align:left;'>TCP/IP</th>";
print '<th style="text-align:center;">'.semr_i18n("Time").'</th>'; print "<th style='text-align:center;'>Zeit</th>";
print '</tr>'; print "</tr>";
print '</thead>'; print "</thead>";
print '<tbody>'; print "<tbody>";
foreach ($onlineusers as $key=>$onlineuser) { foreach ($onlineusers as $key=>$onlineuser) {
$username = $onlineuser->username; $username = $onlineuser->username;
$page = $onlineuser->page; $page = $onlineuser->page;
if ($page == 0) { if ($page == 0) {
$link = get_option('siteurl'); $link = get_option('siteurl');
$title = semr_i18n("startpage"); $title = 'startseite'; //oder wie auch immer
} else {
$link = get_permalink($page);
$title = get_post($page);
if(is_array($title)) {
$title = $title->post_title;
} else {
$link = null;
$title = semr_i18n("no page");
} }
else {
$link = get_permalink($page);
$title = get_post($page); // muss so sein, da get_post = ARRAY
$title = $title->post_title; // sonst könnte man gleich diese Zeile nehmen
} }
$ip = $onlineuser->ip; $ip = $onlineuser->ip;
if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip); if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip);
$time = mysql2date("H:i",$onlineuser->time); $time = mysql2date("H:i",$onlineuser->time);
print '<tr'.((1&$key)?' class="alternate">':'>'); print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print '<td style="text-align:left;">'.$username.'</td>'; print "<td style='text-align:left;'>".$username."</td>";
print '<td style="text-align:left;">'; print "<td style='text-align:left;'><a target='_blank' href=".$link.">".$title."</td>";
print (is_null($link))?$title:'<a target="_blank" href="'.$link.'">'.$title.'</a>'; print "<td style='white-space:nowrap;text-align:left;'>
print '</td>'; <a target='_blank' style='border:none;' href='http://ws.arin.net/whois/?queryinput=".$ip."'>
print '<td style="white-space:nowrap;text-align:left;">'; <img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/arin.png' /></a>&nbsp;
if($sem_options['show_arin']) { <a target='_blank' style='border:none;' href='http://www.ripe.net/whois?searchtext=".$ip."'>
print '<a target="_blank" href="http://ws.arin.net/whois/?queryinput='.$ip.'">'; <img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/ripe.png' /></a>&nbsp;
print '<img src="'.SEMMELSTATZR_HTML_RELPATH.'img/arin.png" alt="" />'; <a target='_blank' style='border:none;' href='http://www.utrace.de/?query=".$ip."'>
print '</a>&nbsp;'; <img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/utrace.png' /></a></td>";
print "<td style='text-align:center;'>$time</td>";
print "</tr>";
} }
if($sem_options['show_whois']) { print "</tbody>";
print '<a target="_blank" href="http://www.ripe.net/whois?searchtext='.$ip.'">'; print "</table>";
print '<img src="'.SEMMELSTATZR_HTML_RELPATH.'img/ripe.png" alt="" />';
print '</a>&nbsp;';
}
if($sem_options['show_utrace']) {
print '<a target="_blank" href="http://www.utrace.de/?query='.$ip.'">';
print '<img src="'.SEMMELSTATZR_HTML_RELPATH.'img/utrace.png" alt="" />';
print '</a>&nbsp;';
}
print '</td>';
print '<td style="text-align:center;">'.$time.'</td>';
print '</tr>';
}
print '</tbody>';
print '</table>';
print "<hr />"; print "<hr />";
} }
@ -142,63 +120,37 @@ function sem_draw24HoursGoo() {
$results = $wpdb->get_results("SELECT time as hours, COUNT(DISTINCT ip) as visitors $results = $wpdb->get_results("SELECT time as hours, COUNT(DISTINCT ip) as visitors
FROM ".$wpdb->statz." WHERE time >= NOW() - INTERVAL 23 HOUR GROUP BY HOUR(time) ORDER BY time ASC"); FROM ".$wpdb->statz." WHERE time >= NOW() - INTERVAL 23 HOUR GROUP BY HOUR(time) ORDER BY time ASC");
print '<div class="statz">'; print "<div class='statz'>Besucher: Die letzten 24 Stunden</div>";
print semr_i18n("Visitors: Last 24 hours").'</div>';
print "<div align='left'>"; print "<div align='left'>";
if (empty($results)) { if (empty($results)) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small></div>";
print "<hr />"; print "<hr />";
return; return;
} }
$aHours = array(); foreach ($results as $result) {
$aVisitors = array(); $visitors[] = $result->visitors;
$iInterval = 86400-7200; $hours[] = mysql2date('H', $result->hours);
for($i=0;$i<24;$i++) {
$aHours[$i] = date("H", time() - $iInterval);
$iInterval = $iInterval - 3600;
$aVisitors[$i] = VOID;
}
$iCount = 0;
$bFirst = true;
$atemp = array();
foreach($results as $aResult) {
$iDbHour = mysql2date('H', $aResult->hours);
$iKey = array_search($iDbHour, $aHours);
$aVisitors[$iKey] = $aResult->visitors;
} }
$MyData = new pData(); $MyData = new pData();
$MyData->addPoints($aVisitors,"Visitors"); $MyData->addPoints($visitors,"Visitors");
$MyData->setAxisName(0,"Visitors"); $MyData->setAxisName(0,"Visitors");
$MyData->addPoints($aHours,"Hours"); $MyData->addPoints($hours,"Hours");
$MyData->setAbscissa("Hours"); $MyData->setAbscissa("Hours");
$myPicture = new pImage(780,150,$MyData); $myPicture = new pImage(780,150,$MyData);
$myPicture->Antialias = true; $myPicture->Antialias = FALSE;
$myPicture->drawRectangle(0,0,779,149,array("R"=>0,"G"=>0,"B"=>0)); $myPicture->drawRectangle(0,0,779,149,array("R"=>0,"G"=>0,"B"=>0));
$myPicture->setFontProperties(array("FontName"=>plugin_dir_path(__FILE__)."includes/pChart/fonts/Bedizen.ttf","FontSize"=>8)); $myPicture->setFontProperties(array("FontName"=>plugin_dir_path(__FILE__)."includes/pChart/fonts/Bedizen.ttf","FontSize"=>8));
$myPicture->setGraphArea(30,20,760,130); $myPicture->setGraphArea(30,20,760,130);
$scaleSettings = array( $scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200);
//"DrawSubTicks"=>TRUE,
"GridR"=>200,
"GridG"=>200,
"GridB"=>200
);
$myPicture->drawScale($scaleSettings); $myPicture->drawScale($scaleSettings);
$myPicture->drawBarChart(array("DisplayValues"=>true,"DisplayColor"=>DISPLAY_MANUAL,"DisplayPos"=>LABEL_POS_OUTSIDE)); $myPicture->drawBarChart();
//$myPicture->drawSplineChart();
$TextSettings = array("R"=>100,"G"=>100,"B"=>100,"FontSize"=>8,"Align"=>TEXT_ALIGN_TOPRIGHT);
$myPicture->drawText(770,5,"(c) 2011 semmelstatzR",$TextSettings);
@$myPicture->Render(WP_CONTENT_DIR."/cache/24HourGoo.png"); @$myPicture->Render(WP_CONTENT_DIR."/cache/24HourGoo.png");
print '<div class="chart">'; print "<div class='chart'>";
if(is_readable(WP_CONTENT_DIR."/cache/24HourGoo.png")) { if(is_readable(WP_CONTENT_DIR."/cache/24HourGoo.png")) {
print '<img src="'.WP_CONTENT_URL.'/cache/24HourGoo.png" />'; print '<img src="'.WP_CONTENT_URL.'/cache/24HourGoo.png" />';
@ -223,21 +175,19 @@ function sem_draw24HoursGoo() {
AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE time >= CURDATE() - INTERVAL ".$daylimit." DAY AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE time >= CURDATE() - INTERVAL ".$daylimit." DAY
GROUP BY date ORDER BY time DESC"); GROUP BY date ORDER BY time DESC");
print '<div class="statz">'; print "<div class='statz'>".$limit."-Tage-Statistik</div>";
printf (semr_i18n("%s-Days-Statz"), $limit);
print '</div>';
if (empty($thedays)) { if (empty($thedays)) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align:left;'>".semr_i18n("Date")."</th>"; print "<th style='text-align:left;'>Datum</th>";
print "<th style='width: 15%;text-align:center;'>".semr_i18n("Visitors")."</th>"; print "<th style='width: 15%;text-align:center;'>Besucher</th>";
print "<th style='width: 15%;text-align:center;'>".semr_i18n("Hits")."</th>"; print "<th style='width: 15%;text-align:center;'>Hits</th>";
print "<th style='width: 15%;text-align:center;'>".semr_i18n("Referer")."</th>"; print "<th style='width: 15%;text-align:center;'>Referer</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -247,13 +197,13 @@ function sem_draw24HoursGoo() {
$today = time(); $today = time();
$difference = ceil(($today - $date) / (60*60*24))-1; $difference = ceil(($today - $date) / (60*60*24))-1;
if($difference == 0) { if($difference == 0) {
$date = semr_i18n("Today"); $date = "Heute";
} }
elseif($difference == 1) { elseif($difference == 1) {
$date = semr_i18n("Yesterday"); $date = "Gestern";
} }
elseif($difference == 2) { elseif($difference == 2) {
$date = semr_i18n("2 days ago"); $date = "Vorgestern";
} }
else { else {
$date = mysql2date("d.m.Y",$theday->date); $date = mysql2date("d.m.Y",$theday->date);
@ -269,7 +219,7 @@ function sem_draw24HoursGoo() {
print "</tr>"; print "</tr>";
} }
print "<tr>"; print "<tr>";
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 "<td style='text-align:left;'><a href='".get_option('siteurl')."/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-history.php'>mehr...</a></td>";
print "</tr>"; print "</tr>";
print "</tbody>"; print "</tbody>";
print "</table>"; print "</table>";
@ -286,24 +236,22 @@ function sem_draw24HoursGoo() {
$lastreferers = $wpdb->get_results("SELECT DISTINCT referer, time FROM ".$wpdb->statz." WHERE referer $lastreferers = $wpdb->get_results("SELECT DISTINCT referer, time FROM ".$wpdb->statz." WHERE referer
NOT LIKE '".$homehost."' ORDER BY time DESC LIMIT 0, ".$limit); NOT LIKE '".$homehost."' ORDER BY time DESC LIMIT 0, ".$limit);
print "<div class='statz'>"; print "<div class='statz'>Die letzten ".$limit." Referer</div>";
printf (semr_i18n("The last %s Referrer"), $limit);
print "</div>";
if (empty($lastreferers)) { if (empty($lastreferers)) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align:center;width:12%;'>".semr_i18n("Time")."</th>"; print "<th style='text-align:center;width:12%;'>Zeit</th>";
print "<th style='text-align:left;'>".semr_i18n("Referrer")."</th>"; print "<th style='text-align:left;'>Referer</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
foreach ($lastreferers as $key=>$lastreferer) { foreach ($lastreferers as $key=>$lastreferer) {
$referer = strip_tags($lastreferer->referer); $referer = $lastreferer->referer;
if(strlen($referer) >= 120) { if(strlen($referer) >= 120) {
$printreferer = substr($referer, 0, 120)." ..."; $printreferer = substr($referer, 0, 120)." ...";
} }
@ -335,20 +283,18 @@ function sem_draw24HoursGoo() {
$results = $wpdb->get_results("SELECT referer, time, ip FROM $wpdb->statz WHERE referer != 'NULL' ORDER BY time DESC"); $results = $wpdb->get_results("SELECT referer, time, ip FROM $wpdb->statz WHERE referer != 'NULL' ORDER BY time DESC");
print "<div class='statz'>"; print "<div class='statz'>Die letzten $limit Suchbegriffe</div>";
printf(semr_i18n("The last %s search terms"), $limit);
print "</div>";
if (empty($results)) { if (empty($results)) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: center;width:12%;'>".semr_i18n("Time")."</th>"; print "<th style='text-align: center;width:12%;'>Zeit</th>";
print "<th style='text-align:left;width:70%;'>".semr_i18n("search term")."</th>"; print "<th style='text-align:left;width:70%;'>Suchbegriff</th>";
print "<th style='text-align:left;'>".semr_i18n("TCP/IP")."</th>"; print "<th style='text-align:left;'>TCP/IP</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -388,19 +334,18 @@ function sem_draw24HoursGoo() {
COUNT(".$wpdb->statz.".page) AS count FROM ".$wpdb->posts.", ".$wpdb->statz." WHERE 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"); ".$wpdb->statz.".page = ".$wpdb->posts.".ID AND time >= '$today' GROUP BY postid ORDER BY count DESC LIMIT 10");
print "<div class='statz'>"; print "<div class='statz'>Die Top10 aller Posts & Pages heute</div>";
print semr_i18n("Top 10 of todays posts &amp; pages")."</div>";
if (empty($topreads)) { if (empty($topreads)) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Post/Page")."</th>"; print "<th style='text-align: left; width: 45%;'>Post/Page</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Postname")."</th>"; print "<th style='text-align: left; width: 45%;'>Postname</th>";
print "<th style='text-align: center; width: 10%;'>".semr_i18n("Hits")."</th>"; print "<th style='text-align: center; width: 10%;'>Hits</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -429,20 +374,18 @@ function sem_draw24HoursGoo() {
$topreads = $wpdb->get_results("SELECT post_title AS posttitle, post_name as postname, guid AS postid, $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); hits AS count FROM ".$wpdb->posts." WHERE hits != '0' GROUP BY postid ORDER BY hits DESC LIMIT 0, ".$limit);
print "<div class='statz'>"; print "<div class='statz'>Die Top".$limit." aller Posts & Pages</div>";
printf (semr_i18n("Top %s of all posts &amp; pages"), $limit);
print "</div>";
if (empty($topreads)) { if (empty($topreads)) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Post/Page")."</th>"; print "<th style='text-align: left; width: 45%;'>Post/Page</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Postname")."</th>"; print "<th style='text-align: left; width: 45%;'>Postname</th>";
print "<th style='text-align: center; width: 10%;'>".semr_i18n("Hits")."</th>"; print "<th style='text-align: center; width: 10%;'>Hits</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -468,18 +411,16 @@ function sem_draw24HoursGoo() {
$todaysonlineusers = $wpdb->get_results("SELECT DISTINCT username, COUNT(username) as num FROM ".$wpdb->statz." WHERE $todaysonlineusers = $wpdb->get_results("SELECT DISTINCT username, COUNT(username) as num FROM ".$wpdb->statz." WHERE
time >= '$today' AND username != 'Gast' GROUP BY username ORDER BY num DESC"); time >= '$today' AND username != 'Gast' GROUP BY username ORDER BY num DESC");
print '<div class="statz">'; print "<div class='statz'>Bekannte Besucher heute</div>";
print semr_i18n("Known visitors today");
print '</div>';
if (empty($todaysonlineusers)) { if (empty($todaysonlineusers)) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 80%;'>".semr_i18n("Visitor (Hits)")."</th>"; print "<th style='text-align: left; width: 80%;'>Besucher (Hits)</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -501,10 +442,9 @@ function sem_draw24HoursGoo() {
".$wpdb->comments.",". $wpdb->posts." WHERE comment_approved = '1' AND comment_post_id = id ".$wpdb->comments.",". $wpdb->posts." WHERE comment_approved = '1' AND comment_post_id = id
GROUP BY guid ORDER BY count DESC LIMIT 0, 10"); GROUP BY guid ORDER BY count DESC LIMIT 0, 10");
print "<div class='statz'>"; print "<div class='statz'>Die Top10 aller kommentierter Posts</div>";
print semr_i18n("Top 10 of all commented posts")."</div>";
if (empty($topcommentedposts)) { if (empty($topcommentedposts)) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />"; print "<hr />";
return; return;
} }
@ -512,8 +452,8 @@ function sem_draw24HoursGoo() {
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 80%;'>".semr_i18n("Post/Page")."</th>"; print "<th style='text-align: left; width: 80%;'>Post/Page</th>";
print "<th style='text-align: center; width: 20%;'>".semr_i18n("Comments")."</th>"; print "<th style='text-align: center; width: 20%;'>Kommentare</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -527,6 +467,7 @@ function sem_draw24HoursGoo() {
print "<td style='text-align: center;'>".$count."</td>"; print "<td style='text-align: center;'>".$count."</td>";
print "</tr>"; print "</tr>";
} }
print "</tbody>"; print "</tbody>";
print "</table>"; print "</table>";
print "<hr />"; print "<hr />";
@ -542,11 +483,9 @@ function sem_draw24HoursGoo() {
comment_author_email AS email, comment_author_url AS homepage FROM " .$wpdb->comments . " WHERE 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); comment_approved = '1' GROUP BY comment_author ORDER BY count DESC LIMIT 0, ".$limit);
print "<div class='statz'>"; print "<div class='statz'>Die Top".$limit." aller Kommentierer</div>";
printf(semr_i18n("Top %s of all commentators"), $limit);
print "</div>";
if (empty($topcommenters)) { if (empty($topcommenters)) {
print '<small>... '. semr_i18n("no entries at all").'</small>'; print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />"; print "<hr />";
return; return;
} }
@ -554,10 +493,10 @@ function sem_draw24HoursGoo() {
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 20%;'>".semr_i18n("User")."</th>"; print "<th style='text-align: left; width: 20%;'>User</th>";
print "<th style='text-align: left; width: 30%;'>".semr_i18n("Email")."</th>"; print "<th style='text-align: left; width: 30%;'>Email</th>";
print "<th style='text-align: left; width: 40%;'>".semr_i18n("Homepage")."</th>"; print "<th style='text-align: left; width: 40%;'>Homepage</th>";
print "<th style='text-align: center; width: 10%;'>".semr_i18n("Comments")."</th>"; print "<th style='text-align: center; width: 10%;'>Kommentare</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -588,7 +527,7 @@ function sem_draw24HoursGoo() {
print "<div class='wrap'>"; print "<div class='wrap'>";
print "<div><a name='top'></a></div>"; print "<div><a name='top'></a></div>";
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>"; print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("Current Statz")."</h2>"; print "<h2>SemmelstatzR &rsaquo; Aktuell</h2>";
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
if ($sem_options["statz_show_useronline"]) sem_showWhoIsOnline(); if ($sem_options["statz_show_useronline"]) sem_showWhoIsOnline();
sem_draw24HoursGoo(); sem_draw24HoursGoo();

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -46,79 +46,210 @@
*/ */
if(!current_user_can('manage_statz')) { if(!current_user_can('manage_statz')) {
die(semr_i18n("Restricted Area")); die('Zugriff verweigert');
} }
// entry format: functionname, needed param, type of return, remarks, manual example (no function call) ### TEMPLATES
$aTemplates = array(
array("sem_showTotalPosts", "", semr_i18n("Integer"), semr_i18n("Number of all Posts"), ""), $totalposts = sem_showTotalPosts();
array("sem_showTotalComments", "", semr_i18n("Integer"), semr_i18n("Number of all Comments"), ""), $totalcomments = sem_showTotalComments();
array("sem_showTotalUsers", "", semr_i18n("Integer"), semr_i18n("Total Number of all visitors since statistics started"), ""), $totalusers = sem_showTotalUsers();
array("sem_showAverageUserPerDay", "", semr_i18n("Decimal"), semr_i18n("Average of daily visitors"), ""), $averageuserperday = sem_showAverageUserPerDay();
array("sem_showFirstPostDate", "", semr_i18n("Date (d.m.y)"), semr_i18n("Date of the first post"), ""), $firstpostdate = sem_showFirstPostDate();
array("sem_showPostDays", "", semr_i18n("Integer"), semr_i18n("Days since first post"), ""), $postdays = sem_showPostDays();
array("sem_showFirstCommentDate", "", semr_i18n("Date (d.m.y)"), semr_i18n("Date of the first comment"), ""), $firstcommentdate = sem_showFirstCommentDate();
array("sem_showCommentDays", "", semr_i18n("Integer"), semr_i18n("Days since first comment"), ""), $commentdays = sem_showCommentDays();
array("sem_showPostsPerDay", "", semr_i18n("Decimal"), semr_i18n("Average of posts per day"), ""), $postsperday = sem_showPostsPerDay();
array("sem_showCommentsPerDay", "", semr_i18n("Decimal"), semr_i18n("Average of comments per day"), ""), $commentsperday = sem_showCommentsPerDay();
array("sem_showNumCommenters", "", semr_i18n("Integer"), semr_i18n("Total of all commentators"), ""), $numcommenters = sem_showNumCommenters();
array("sem_showStatzStartDate", "", semr_i18n("Date (d.m.y)"), semr_i18n("Date of commencement of statistics"), ""), $statzstartdate = sem_showStatzStartDate();
array("sem_showStatzDays", "", semr_i18n("Integer"), semr_i18n("Period of the statistics in days"), ""), $statzdays = sem_showStatzDays();
array("sem_showNumUsersOnline", "", semr_i18n("Integer"), semr_i18n("Number of users online"), ""), $numusersonline = sem_showNumUsersOnline();
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"), ### DIE ANZEIGE
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")
);
print "<form>"; print "<form>";
print "<div class='wrap'>"; print "<div class='wrap'>";
print "<div id='icon-template' class='icon32'><br /></div>"; print "<div id='icon-template' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("Template-Functions")."</h2>"; print "<h2>SemmelstatzR &rsaquo; Template-Funktionen</h2>";
print "<br />"; print "<br />";
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align:left;'>".semr_i18n("Function")."</th>"; print "<th style='text-align:left;'>Funktion</th>";
print "<th style='text-align:left;width:26em;'>".semr_i18n("Syntax")."</th>"; print "<th style='text-align:left;width:26em;'>Syntax</th>";
print "<th style='text-align:left;'>".semr_i18n("Returns")."</th>"; print "<th style='text-align:left;'>R&uuml;ckgabewert</th>";
print "<th style='text-align:left;'>".semr_i18n("Example")."</th>"; print "<th style='text-align:left;'>Hier</th>";
print "<th style='text-align:left;'>".semr_i18n("Remarks")."</th>"; print "<th style='text-align:left;'>Bemerkung</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
// 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 "<tr>";
print "<td>$value[0]</td>"; print "<td>sem_showTotalPosts</td>";
print "<td><input type='text' value='<?php $value[0]($value[1]); ?>' class='regular-text' /></td>"; print "<td><input type='text' value='<?php sem_showTotalPosts(); ?>' class='regular-text' /></td>";
print "<td>$value[2]</td>"; print "<td>Ganzzahl</td>";
print "<td>$funcret</td>"; print "<td>$totalposts</td>";
print "<td>$value[3]</td>"; print "<td>Anzahl aller Beitr&auml;ge</td>";
print "</tr>"; 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&auml;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&auml;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&auml;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&auml;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 "<tr>";
print "<td colspan='5'>"; 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&auml;mtliche Funktionen (bis auf die letzte) sind au&szlig;erhalb des LOOPS zu verwenden. Wird print "S&auml;mtliche Funktionen (bis auf die letzte) sind au&szlig;erhalb des LOOPS zu verwenden. Wird
SEMMELSTATZ deaktiviert, und die Verf&uuml;gbarkeit der Templatefunktion ist nicht mittels SEMMELSTATZ deaktiviert, und die Verf&uuml;gbarkeit der Templatefunktion ist nicht mittels
<code>if (function_exists...</code> sichergestellt, wird die Indexseite des Blogs fehlerhaft bzw. <code>if (function_exists...</code> sichergestellt, wird die Indexseite des Blogs fehlerhaft bzw.
&uuml;berhaupt nicht dargestellt."; &uuml;berhaupt nicht dargestellt.";
*
*/
print "</td>"; print "</td>";
print "</tr>"; print "</tr>";
print "<tr>";
print "<td>";
print "</td>";
print "</tr>";
print "</tbody>"; print "</tbody>";
print "</table>"; print "</table>";
print "<hr />"; print "<hr />";
if (function_exists('sem_showCopyright')) sem_showCopyright(); if (function_exists('sem_showCopyright')) sem_showCopyright();
print "</div>"; print "</div>";
print "</form>"; print "</form>";
?> ?>

Datei anzeigen

@ -130,15 +130,3 @@ input.regular-text {
font-size: 11px; font-size: 11px;
width: 28em; width: 28em;
} }
span.rahmen {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:12px;
font-weight: bold;
color: #1172B9;
background-color: #E5E5E5;
padding: 0 4px 0 4px;
border-radius: 1em;
-moz-border-radius:4px;
-khtml-border-radius:4px;
}

Datei anzeigen

@ -2,9 +2,8 @@
/* /*
Plugin Name: semmelstatzR Plugin Name: semmelstatzR
Plugin URI: http://sourceforge.net/projects/semmelstatz/ Plugin URI: http://sourceforge.net/projects/semmelstatz/
Text Domain: semmelstatzR
Description: Visitorstatistic for Wordpress, based upon the original wp-plugin semmelstatz by Andreas 'Redunzl' Mueller (http://www.kopfhoch-studio.de) Description: Visitorstatistic for Wordpress, based upon the original wp-plugin semmelstatz by Andreas 'Redunzl' Mueller (http://www.kopfhoch-studio.de)
Version: 1.0.0 RC Version: 1.0.0 Beta
Author: SEM-Team Author: SEM-Team
Author URI: http://semmelstatz.sf.net Author URI: http://semmelstatz.sf.net
License: GPLv3 License: GPLv3
@ -15,9 +14,9 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.html
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011-2012 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-3.0.html * @license http://www.gnu.org/licenses/gpl-3.0.html
* *
@ -61,29 +60,13 @@ require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'semmelstatzR_startup.php';
if(is_admin() == true) { if(is_admin() == true) {
/*
add_filter('screen_settings', 'screen_options_demo', 10, 2);
function screen_options_demo($current, $screen){
$desired_screen = convert_to_screen('plugins.php');
if ( $screen->id == $desired_screen->id ){
$current .= "Hello WordPress!";
}
return $current;
}
*
*/
/** /**
* add CSS * add CSS
* *
* @uses wp add_action()
*
* @return void * @return void
*/ */
function semmelstatzR_css() { function semmelstatzR_css() {
print "<link rel='stylesheet' href='". print "<link rel='stylesheet' href='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/semmelstatzR.css' type='text/css' media='screen' />\n";
get_option('siteurl').
"/wp-content/plugins/semmelstatzR/semmelstatzR.css' type='text/css' media='screen' />\n";
} }
add_action('admin_head', 'semmelstatzR_css'); add_action('admin_head', 'semmelstatzR_css');
### End add CSS ### End add CSS
@ -91,46 +74,26 @@ if(is_admin() == true) {
/** /**
* add toplevel menu into admin * add toplevel menu into admin
* *
* @uses wp add_action() admin_menu * @todo localization
* *
* @return void * @return void
*/ */
function semmelstatzR_menu() { function semmelstatzR_menu() {
global $semr_hook;
if (function_exists('add_menu_page')) { if (function_exists('add_menu_page')) {
$semr_hook['semR'] = add_menu_page('SemmelstatzR','SemmelstatzR', add_menu_page('SemmelstatzR','SemmelstatzR', 'manage_statz', 'semmelstatzR/semmelstatzR-statz.php', '', plugins_url('semmelstatzR/img/statz_small.png'));
'manage_statz', 'semmelstatzR/semmelstatzR-statz.php', '',
plugins_url('semmelstatzR/img/statz_small.png'));
} }
if (function_exists('add_submenu_page')) { if (function_exists('add_submenu_page')) {
add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Current Statz'), semr_i18n('Current Statz'), 'manage_statz', 'semmelstatzR/semmelstatzR-statz.php');
add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('History'), semr_i18n('History'), 'manage_statz', 'semmelstatzR/semmelstatzR-history.php');
add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Log'), semr_i18n('Log'), 'manage_statz', 'semmelstatzR/semmelstatzR-log.php');
$semr_hook['statz'] = add_submenu_page('semmelstatzR/semmelstatzR-statz.php', add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Database'), semr_i18n('Database'), 'manage_statz', 'semmelstatzR/semmelstatzR-database.php');
semr_i18n('Current Statz'), semr_i18n('Current Statz'), add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Templates'), semr_i18n('Templates'), 'manage_statz', 'semmelstatzR/semmelstatzR-templates.php');
'manage_statz', 'semmelstatzR/semmelstatzR-statz.php'); add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Options'), semr_i18n('Options'), 'manage_statz', 'semmelstatzR/semmelstatzR-options.php');
$semr_hook['history'] = add_submenu_page('semmelstatzR/semmelstatzR-statz.php',
semr_i18n('History'), semr_i18n('History'), 'manage_statz',
'semmelstatzR/semmelstatzR-history.php');
$semr_hook['log'] = add_submenu_page('semmelstatzR/semmelstatzR-statz.php',
semr_i18n('Log'), semr_i18n('Log'), 'manage_statz',
'semmelstatzR/semmelstatzR-log.php');
$semr_hook['database'] = add_submenu_page('semmelstatzR/semmelstatzR-statz.php',
semr_i18n('Database'), semr_i18n('Database'), 'manage_statz',
'semmelstatzR/semmelstatzR-database.php');
$semr_hook['templates'] = add_submenu_page('semmelstatzR/semmelstatzR-statz.php',
semr_i18n('Templates'), semr_i18n('Templates'), 'manage_statz',
'semmelstatzR/semmelstatzR-templates.php');
$semr_hook['options'] = add_submenu_page('semmelstatzR/semmelstatzR-statz.php',
semr_i18n('Options'), semr_i18n('Options'), 'manage_statz',
'semmelstatzR/semmelstatzR-options.php');
} }
} }
add_action('admin_menu', 'semmelstatzR_menu'); add_action('admin_menu', 'semmelstatzR_menu');
### end add toplevel adminmenu ### end add toplevel adminmenu
// include context help system
include SEMMELSTATZR_SRVPATH."includes/help/start.php";
/** /**
@ -142,7 +105,7 @@ if(is_admin() == true) {
global $wpdb; global $wpdb;
if(get_option('statz_options')) { if(get_option('statz_options')) {
$wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'statz%';"); // delete old options $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'statz%';"); // Löschen der alten Optionen
} }
if(!get_option('semmelstatzR_options')) { if(!get_option('semmelstatzR_options')) {
@ -170,7 +133,7 @@ if(is_admin() == true) {
"statz_topreads_limit" => 10, "statz_topreads_limit" => 10,
"statz_write_admins" => false, "statz_write_admins" => false,
"statz_write_users" => false, "statz_write_users" => false,
"statz_use_img" => false "statz_use_img" => true
); );
add_option( 'semmelstatzR_options', $sem_options ); add_option( 'semmelstatzR_options', $sem_options );
} }
@ -181,7 +144,8 @@ if(is_admin() == true) {
} }
### Install db-tables, write default options ### Anlegen der Tabellen, Optionen schreiben
add_action('activate_semmelstatzR/semmelstatzR.php', 'sem_statzsetup');
function sem_statzsetup() { function sem_statzsetup() {
global $wpdb; global $wpdb;
if(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) { if(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) {
@ -189,7 +153,7 @@ function sem_statzsetup() {
} elseif(@is_file(ABSPATH.'/wp-admin/includes/upgrade.php')) { } elseif(@is_file(ABSPATH.'/wp-admin/includes/upgrade.php')) {
include_once(ABSPATH.'/wp-admin/includes/upgrade.php'); include_once(ABSPATH.'/wp-admin/includes/upgrade.php');
} else { } else {
die(semr_i18n('Cannot find <i>wp-admin/upgrade-functions.php</i> and <i>wp-admin/includes/upgrade.php</i>!')); die('Kann <i>wp-admin/upgrade-functions.php</i> und <i>wp-admin/includes/upgrade.php</i> nicht finden!');
} }
$create_table = array(); $create_table = array();
@ -230,7 +194,6 @@ function sem_statzsetup() {
$role->add_cap('manage_statz'); $role->add_cap('manage_statz');
} }
} }
add_action('activate_semmelstatzR/semmelstatzR.php', 'sem_statzsetup');
### Zugriff analysieren und in statz-Tabelle schreiben ### Zugriff analysieren und in statz-Tabelle schreiben
add_action('wp_footer', 'sem_writeStatz'); add_action('wp_footer', 'sem_writeStatz');
@ -242,7 +205,7 @@ function sem_writeStatz() {
// true === $sem_options['statz_use_img'] && // true === $sem_options['statz_use_img'] &&
if(true == $sem_options['statz_use_img'] && !defined('SEMMELSTATZR_STATZIMG')) { if(true == $sem_options['statz_use_img'] && !defined('SEMMELSTATZR_STATZIMG')) {
print '<img src="'.SEMMELSTATZR_HTML_RELPATH.'semr_image.php" alt="" />'; print '<img src="'.SEMMELSTATZR_HTML_RELPATH.'semr_image.php" alt="" />';
return; ### nothing else todo if stat image is used return; ### nothing todo if stat image is used
} }
sem_writeYesterdayToHist(); sem_writeYesterdayToHist();
@ -265,7 +228,8 @@ function sem_writeStatz() {
if (!empty($referer)) { if (!empty($referer)) {
if(get_option('blog_charset') == 'iso-8859-1') $referer = utf8_decode($referer); if(get_option('blog_charset') == 'iso-8859-1') $referer = utf8_decode($referer);
$referer = "'".$referer."'"; $referer = "'".$referer."'";
} else { }
else {
$referer = 'NULL'; $referer = 'NULL';
} }
@ -285,47 +249,24 @@ function sem_writeStatz() {
} }
### Zeitgesteuertes Limitieren der statz-Tabelle ### Zeitgesteuertes Limitieren der statz-Tabelle
// @todo add action cache // Wenn semmelKron JA UND statz_next_cron älter JETZT, dann...
// Wenn semmelKron JA UND statz_next_cron älter JETZT, dann...
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
if($sem_options['statz_do_cron'] == true && $sem_options['statz_next_cron'] < time()) { if($sem_options['statz_do_cron'] == true && $sem_options['statz_next_cron'] < time()) {
add_action('shutdown', 'sem_doCronStatzLimit'); // ...limitiere statz-Tabelle auf vorgegebenen Wert add_action('shutdown', 'sem_doCronStatzLimit'); // ...limitiere statz-Tabelle auf vorgegebenen Wert
} }
/** ### Rendert eine Mini-STATZ. Idee: René Tauchnitz
* renders a ministatz for dashboard
* Idee: René Tauchnitz
*
* @return void
*/
function sem_dashboardStatz_show() { function sem_dashboardStatz_show() {
$widget_options = get_option( 'dashboard_widget_options' ); $widgets = get_option( 'dashboard_widget_options' );
echo '<p>'; echo '<p>';
printf(semr_i18np("%d Visitor online", "%d Visitors online", sem_showNumUsersOnline()), sem_showNumUsersOnline()); printf(_n("%d Visitor online", "%d Visitors online", sem_showNumUsersOnline(), "semmelstatzR"), sem_showNumUsersOnline());
echo ' - '; echo ' - ';
printf(semr_i18n("Today: %s"),sem_showTodayStatz()); printf(__("Today: %s", "semmelstatzR"),sem_showTodayStatz());
echo ' <a title="'.semr_i18n("more...").'" href="'.get_option('siteurl') echo ' <a title="'.__("more...", "semmelstatzR").'" href="'.get_option('siteurl').'/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-statz.php">&raquo;&raquo;</a>';
.'/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-statz.php">&raquo;&raquo;</a>';
echo '</p>';
echo '<p style="line-height: 2.0em;">';
printf(semr_i18n("This blog is online since %s that are %s days.<br>"),
'<span class="rahmen">'.sem_showFirstPostDate()."</span>",
'<span class="rahmen">'.sem_showPostDays()."</span>");
printf(semr_i18n("SemmelstatzR collects the statistics since %s."),
'<span class="rahmen">'.sem_showStatzStartDate()."</span>");
echo '</p>'; echo '</p>';
} }
/**
* dashboard-control for ministatz
*
* @author Ortwin Pinke
* @since semR 1.0
*
* @return void
*/
function sem_dashboardStatz_control() { function sem_dashboardStatz_control() {
if ( !$widget_options = get_option( 'dashboard_widget_options' ) ) if ( !$widget_options = get_option( 'dashboard_widget_options' ) )
$widget_options = array(); $widget_options = array();
@ -337,17 +278,11 @@ function sem_dashboardStatz_control() {
$number = absint( $_POST['dashboard-sem-dashboardStatz']['items'] ); $number = absint( $_POST['dashboard-sem-dashboardStatz']['items'] );
$number = ($number > 20)?20:$number; $number = ($number > 20)?20:$number;
$widget_options['dashboard_sem_dashboardStatz']['items'] = $number; $widget_options['dashboard_sem_dashboardStatz']['items'] = $number;
$widget_options['dashboard_sem_dashboardStatz']['showinfo'] =
($_POST['dashboard-sem-dashboardStatz']['showinfo'] == true)?true:false;
update_option( 'dashboard_widget_options', $widget_options ); update_option( 'dashboard_widget_options', $widget_options );
} }
$number = isset( $widget_options['dashboard_sem_dashboardStatz']['items'] )? $number = isset( $widget_options['dashboard_sem_dashboardStatz']['items'] ) ? (int) $widget_options['dashboard_sem_dashboardStatz']['items'] : '';
(int) $widget_options['dashboard_sem_dashboardStatz']['items'] : '';
$checked = isset($widget_options['dashboard_sem_dashboardStatz']['showinfo'])?'checked="checked"':'';
echo '<p><label for="sem-info">' . semr_i18n('Show semR Info:').'</label>';
echo '<input id="sem-ninfo" name="dashboard-sem-dashboardStatz[showinfo]" type="checkbox" value="true"'.$checked.' /></p>';
echo '<p><label for="sem-number">' . semr_i18n('Number of Items (max. 10):') . '</label>'; echo '<p><label for="sem-number">' . semr_i18n('Number of Items (max. 10):') . '</label>';
echo '<input id="sem-number" name="dashboard-sem-dashboardStatz[items]" type="text" value="' . $number . '" size="3" /></p>'; echo '<input id="sem-number" name="dashboard-sem-dashboardStatz[items]" type="text" value="' . $number . '" size="3" /></p>';

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/
@ -45,8 +45,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
### constants ### constants
define('SEMMELSTATZR_VERSION', '1.0.0 RC'); define('SEMMELSTATZR_VERSION', '1.0.0 Beta');
define('SEMMELSTATZR_SRVPATH', dirname(__FILE__).DIRECTORY_SEPARATOR); define('SEMMELSTATZR_SRVPATH', dirname(__FILE__));
define('SEMMELSTATZR_HTML_RELPATH', WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__))); define('SEMMELSTATZR_HTML_RELPATH', WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)));
### Deklaration der Tabellennamen ### Deklaration der Tabellennamen
@ -68,27 +68,14 @@ if(!load_plugin_textdomain('semmelstatzR')) {
load_plugin_textdomain('semmelstatzR',null,$plugin_dir.'/locale/'); load_plugin_textdomain('semmelstatzR',null,$plugin_dir.'/locale/');
} }
// includes include_once SEMMELSTATZR_SRVPATH.'/includes/functions.semr.php';
include_once SEMMELSTATZR_SRVPATH.'includes/functions.semr.php'; include_once SEMMELSTATZR_SRVPATH.'/includes/functions.semr_template.php';
include_once SEMMELSTATZR_SRVPATH.'includes/functions.semr_template.php'; include_once SEMMELSTATZR_SRVPATH.'/includes/class.upgrademe.php';
include_once SEMMELSTATZR_SRVPATH.'includes/class.upgrademe.php';
// define some vars
$semr_hook = array();
// init upgrade stuff
if(class_exists("Upgrademe")) { if(class_exists("Upgrademe")) {
function semmelstatzR_upgrademe() { function semmelstatzR_upgrademe() {
// will be changed to sf.net soon as website is ready // will be changed to sf.net soon as website is ready
//return 'http://semmelstatz.sourceforge.net/semr_update.php'; //return 'http://semmelstatz.sourceforge.net/semr_update.php';
return 'http://www.php-backoffice.de/updates/test/semr_update.php'; return 'http://www.php-backoffice.de/updates/semr_update.php';
}
}
// function wrappers for older wp versions
if(!function_exists("plugin_dir_path")) {
function plugin_dir_path($file) {
return trailingslashit(dirname($file));
} }
} }
?> ?>

Datei anzeigen

@ -4,7 +4,7 @@
* *
* @package SemmelstatzR * @package SemmelstatzR
* @version $Rev$ * @version $Rev$
* @since 1.0.0 * @since 1.0.0 Beta
* @author SEM-Team * @author SEM-Team
* @copyright (c)2011 SEM-Team * @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/ * @link http://sourceforge.net/projects/semmelstatz/