1
0
Fork 0

Commits vergleichen

...

29 Commits

Autor SHA1 Nachricht Datum
Oldperl 68f571c13c fixed bug #8 2014-01-30 14:00:49 +00:00
Oldperl a81d809fd4 updated readme, del unused ua-ini-file 2014-01-28 11:49:37 +00:00
Oldperl 4e67df1308 updated useragents 2014-01-28 11:45:24 +00:00
Oldperl bba75e1a1a add wrapper for new functions due to compability on older wp 2013-08-29 11:58:40 +00:00
Oldperl 4f9fb51468 localization of plugin info in plugin area 2013-08-28 06:33:54 +00:00
Oldperl 5329bf5707 starting adding contextual help for wp >= 3.3, needs soe more work, started translation of options area 2012-05-21 18:30:41 +00:00
Oldperl 672ad385e3 changed version 2011-12-27 15:36:58 +00:00
Oldperl 7634f621e4 added changelog file 2011-12-19 19:07:15 +00:00
Oldperl 817d909524 added changelog file 2011-12-19 19:03:25 +00:00
Oldperl 9e5089ad21 updated agents.ini and stuff to release RC 2011-12-19 18:47:48 +00:00
Oldperl bc2bd5d4f1 actualize de_DE gettext files 2011-12-19 18:29:40 +00:00
Oldperl 9b35b6a58d actualize gettext files 2011-12-19 18:26:21 +00:00
Oldperl 4ab5af70a9 added new handling for admin notice 2011-12-19 17:48:13 +00:00
Oldperl 382f450506 documentation stuff 2011-12-19 16:29:24 +00:00
Oldperl 5d560a452d change formating of translatable textparts 2011-12-19 16:03:35 +00:00
Oldperl 6cef8597a2 actuell translation and pot-file 2011-12-19 16:02:08 +00:00
Oldperl 4d6c17de4c documentation stuff 2011-12-17 23:56:58 +00:00
Oldperl 4e8dfa09aa i18n standard entries 2011-12-17 23:28:39 +00:00
Oldperl f2f5f2be85 i18n standard entries 2011-12-17 17:26:27 +00:00
Oldperl 5749103a3e i18n standard entries 2011-12-17 17:02:05 +00:00
Oldperl f2e50a8402 i18n standard entries 2011-12-17 16:52:15 +00:00
Oldperl 844bf08a42 i18n standard entries 2011-12-17 16:26:57 +00:00
Oldperl d8042b4e52 some doc and cleanup stuff 2011-12-17 15:26:24 +00:00
Oldperl 7a4793f2fa localistation, chart view and added some functions 2011-12-01 17:40:57 +00:00
Oldperl c658ad64fd updated locale de_DE 2011-11-16 00:11:00 +00:00
Oldperl 97f9004713 enhancing dashboard widget part I 2011-11-15 23:36:35 +00:00
Oldperl 69af1567f5 edit: doc stuff 2011-11-15 16:54:13 +00:00
Oldperl 000bf6969f add: started with context help system
add: initial readme file
2011-11-15 16:44:14 +00:00
Oldperl 1587dc1989 add: started with context help system 2011-11-15 16:43:23 +00:00
28 geänderte Dateien mit 8954 neuen und 1352 gelöschten Zeilen

53
CHANGELOG Normale Datei
Datei anzeigen

@ -0,0 +1,53 @@
/**
* 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 Normale Datei
Datei anzeigen

@ -0,0 +1,94 @@
/**
* 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.

146
_psd/akismet.json Normale Datei

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

34
_psd/semr_update.php Normale Datei
Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -10,189 +10,188 @@ Plugin URI: https://github.com/meglio/wp-upgrademe
if (!class_exists('Upgrademe')) {
class Upgrademe
{
/**
* Stores parsed and validated data returned by unofficial APIs.
* @var array
*/
private static $data;
class Upgrademe {
/**
* Stores parsed and validated data returned by unofficial APIs.
* @var array
*/
private static $data;
private static $WP_FILTER_PREFIX = 'wpFilter_';
private static $WP_FILTER_PREFIX = 'wpFilter_';
public static function register()
{
$r = new ReflectionClass(__CLASS__);
$methods = $r->getMethods(ReflectionMethod::IS_PUBLIC);
foreach($methods as $m)
{
/** @var ReflectionMethod $m */
if ($m->isStatic() && strpos($m->getName(), self::$WP_FILTER_PREFIX) === 0) {
add_filter(substr($m->getName(), strlen(self::$WP_FILTER_PREFIX)), array(get_class(), $m->getName()),
10, $m->getNumberOfParameters());
}
}
}
public static function register()
{
$r = new ReflectionClass(__CLASS__);
$methods = $r->getMethods(ReflectionMethod::IS_PUBLIC);
foreach($methods as $m)
{
/** @var ReflectionMethod $m */
if ($m->isStatic() && strpos($m->getName(), self::$WP_FILTER_PREFIX) === 0) {
add_filter(substr($m->getName(), strlen(self::$WP_FILTER_PREFIX)), array(get_class(), $m->getName()),
10, $m->getNumberOfParameters());
}
}
}
public static function wpFilter_http_response($response, $args, $url)
{
# Control recursion
static $recursion = false;
if ($recursion)
return $response;
public static function wpFilter_http_response($response, $args, $url)
{
# Control recursion
static $recursion = false;
if ($recursion)
return $response;
if (empty($response) || !is_array($response) || !isset($response['body']))
return $response;
if (empty($response) || !is_array($response) || !isset($response['body']))
return $response;
# Guess if it's time to take action
if ($url == 'http://api.wordpress.org/plugins/update-check/1.0/')
$showTime = true;
# Prevent failures if WordPress changes url for updates; we will detect if it still contains "update-check" token
# and called from withing wp_update_plugins() function
elseif (stripos($url, 'update-check') !== false)
{
$showTime = false;
$trace = debug_backtrace(false);
foreach($trace as $t)
# http request made from within wp_update_plugins
if (isset($t['function']) && $t['function'] == 'wp_update_plugins')
{
$showTime = true;
break;
}
unset($trace, $t);
}
else
$showTime = false;
if (!$showTime)
return $response;
# Guess if it's time to take action
if ($url == 'http://api.wordpress.org/plugins/update-check/1.0/')
$showTime = true;
# Prevent failures if WordPress changes url for updates; we will detect if it still contains "update-check" token
# and called from withing wp_update_plugins() function
elseif (stripos($url, 'update-check') !== false)
{
$showTime = false;
$trace = debug_backtrace(false);
foreach($trace as $t)
# http request made from within wp_update_plugins
if (isset($t['function']) && $t['function'] == 'wp_update_plugins')
{
$showTime = true;
break;
}
unset($trace, $t);
}
else
$showTime = false;
if (!$showTime)
return $response;
# Loop over plugins who provided <pluginName>_upgrademe() function and use returned url to request for up-to-date version signature.
# Collect retrieved (only valid) data into $upgrademe
$plugins = get_plugins();
$upgrademe = array();
foreach($plugins as $file => $info)
{
# Get url if function exists
$slugName = str_replace('-', '_', basename($file, '.php'));
# Loop over plugins who provided <pluginName>_upgrademe() function and use returned url to request for up-to-date version signature.
# Collect retrieved (only valid) data into $upgrademe
$plugins = get_plugins();
$upgrademe = array();
foreach($plugins as $file => $info)
{
# Get url if function exists
$slugName = str_replace('-', '_', basename($file, '.php'));
# Request latest version signature from custom url (non-WP plugins repository api) && validate response variables
$recursion = true;
$vars = self::loadPluginData($slugName);
$recursion = false;
if (empty($vars))
continue;
# Request latest version signature from custom url (non-WP plugins repository api) && validate response variables
$recursion = true;
$vars = self::loadPluginData($slugName);
$recursion = false;
if (empty($vars))
continue;
$upgrademe[$file] = $vars;
}
if (!count($upgrademe))
return $response;
$upgrademe[$file] = $vars;
}
if (!count($upgrademe))
return $response;
$body = $response['body'];
if (!empty($body))
$body = unserialize($body);
if (empty($body))
$body = array();
foreach($upgrademe as $file => $upgradeVars)
{
# Do not override data returned by official WP plugins repository API
if (isset($body[$file]))
continue;
$body = $response['body'];
if (!empty($body))
$body = unserialize($body);
if (empty($body))
$body = array();
foreach($upgrademe as $file => $upgradeVars)
{
# Do not override data returned by official WP plugins repository API
if (isset($body[$file]))
continue;
# If new version is different then current one, only then add info
if (!isset($plugins[$file]['Version']) || $plugins[$file]['Version'] == $upgradeVars['new_version'])
continue;
# If new version is different then current one, only then add info
if (!isset($plugins[$file]['Version']) || $plugins[$file]['Version'] == $upgradeVars['new_version'])
continue;
$upgradeInfo = new stdClass();
$upgradeInfo->id = $upgradeVars['id'];
$upgradeInfo->slug = $upgradeVars['slug'];
$upgradeInfo->new_version = $upgradeVars['new_version'];
$upgradeInfo->url = $upgradeVars['url'];
$upgradeInfo->package = $upgradeVars['package'];
$body[$file] = $upgradeInfo;
}
$response['body'] = serialize($body);
return $response;
}
$upgradeInfo = new stdClass();
$upgradeInfo->id = $upgradeVars['id'];
$upgradeInfo->slug = $upgradeVars['slug'];
$upgradeInfo->new_version = $upgradeVars['new_version'];
$upgradeInfo->url = $upgradeVars['url'];
$upgradeInfo->package = $upgradeVars['package'];
$body[$file] = $upgradeInfo;
}
$response['body'] = serialize($body);
return $response;
}
public static function wpFilter_plugins_api($value, $action, $args)
{
// If for some reason value available already, do not change it
if (!empty($value))
return $value;
public static function wpFilter_plugins_api($value, $action, $args)
{
// If for some reason value available already, do not change it
if (!empty($value))
return $value;
if ($action != 'plugin_information' || !is_object($args) || !isset($args->slug) || empty($args->slug))
return $value;
if ($action != 'plugin_information' || !is_object($args) || !isset($args->slug) || empty($args->slug))
return $value;
$vars = self::loadPluginData($args->slug);
if (empty($vars))
return $value;
$vars = self::loadPluginData($args->slug);
if (empty($vars))
return $value;
return (object)$vars['info'];
}
return (object)$vars['info'];
}
public static function wpFilter_http_request_args($args, $url)
{
if (strpos($url, 'wp-upgrademe') === false || !is_array($args))
return $args;
public static function wpFilter_http_request_args($args, $url)
{
if (strpos($url, 'wp-upgrademe') === false || !is_array($args))
return $args;
$args['sslverify'] = false;
return $args;
}
$args['sslverify'] = false;
return $args;
}
private static function loadPluginData($slug)
{
if (isset(self::$data[$slug]))
return self::$data[$slug];
private static function loadPluginData($slug)
{
if (isset(self::$data[$slug]))
return self::$data[$slug];
$funcName = $slug.'_upgrademe';
if (!function_exists($funcName))
return self::$data[$slug] = null;
$funcName = $slug.'_upgrademe';
if (!function_exists($funcName))
return self::$data[$slug] = null;
$upgradeUrl = filter_var(call_user_func($funcName), FILTER_VALIDATE_URL);
if (empty($upgradeUrl))
return self::$data[$slug] = null;
$upgradeUrl = filter_var(call_user_func($funcName), FILTER_VALIDATE_URL);
if (empty($upgradeUrl))
return self::$data[$slug] = null;
# Request latest version signature from custom url (non-WP plugins repository api) && validate response variables
$r = wp_remote_post($upgradeUrl, array('method' => 'POST', 'timeout' => 4, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true,
'headers' => array(), 'body' => null, 'cookies' => array(), 'sslverify' => false));
# Request latest version signature from custom url (non-WP plugins repository api) && validate response variables
$r = wp_remote_post($upgradeUrl, array('method' => 'POST', 'timeout' => 4, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true,
'headers' => array(), 'body' => null, 'cookies' => array(), 'sslverify' => false));
if( is_wp_error($r) || !isset($r['body']) || empty($r['body']))
return self::$data[$slug] = null;
if( is_wp_error($r) || !isset($r['body']) || empty($r['body']))
return self::$data[$slug] = null;
$vars = json_decode($r['body'], true);
if (empty($vars) || !is_array($vars) || count($vars) > 4
|| !isset($vars['new_version']) || !isset($vars['url']) || !isset($vars['package']) || !isset($vars['info']))
return self::$data[$slug] = null;
$vars = json_decode($r['body'], true);
if (empty($vars) || !is_array($vars) || count($vars) > 4
|| !isset($vars['new_version']) || !isset($vars['url']) || !isset($vars['package']) || !isset($vars['info']))
return self::$data[$slug] = null;
# 2 147 483 648 - max int32
# 16 777 215 - ffffff = max possible value of 6-letters hex
# 50 000 000 - reasonable offset
# Finally generate ID between 50 000 000 and 66 777 215
$vars['id'] = 50000000 + hexdec(substr(md5($slug), 1, 6));
# 2 147 483 648 - max int32
# 16 777 215 - ffffff = max possible value of 6-letters hex
# 50 000 000 - reasonable offset
# Finally generate ID between 50 000 000 and 66 777 215
$vars['id'] = 50000000 + hexdec(substr(md5($slug), 1, 6));
$vars['slug'] = $slug;
$vars['slug'] = $slug;
# Sanitize variables of "info"
if (!is_array($vars['info']))
$vars['info'] = array();
# Sanitize variables of "info"
if (!is_array($vars['info']))
$vars['info'] = array();
$info = array();
foreach($vars['info'] as $key => $val)
{
if (!in_array($key, array('name','slug','version','author','author_profile','contributors','requires','tested',
'compatibility','rating','rating','num_ratings','downloaded','last_updated','added','homepage',
'sections','download_link','tags')))
continue;
$info[$key] = $val;
}
$info['slug'] = $slug;
$info['version'] = $vars['new_version'];
$info['download_link'] = $vars['url'];
$vars['info'] = $info;
$info = array();
foreach($vars['info'] as $key => $val)
{
if (!in_array($key, array('name','slug','version','author','author_profile','contributors','requires','tested',
'compatibility','rating','rating','num_ratings','downloaded','last_updated','added','homepage',
'sections','download_link','tags')))
continue;
$info[$key] = $val;
}
$info['slug'] = $slug;
$info['version'] = $vars['new_version'];
$info['download_link'] = $vars['url'];
$vars['info'] = $info;
return self::$data[$slug] = $vars;
}
return self::$data[$slug] = $vars;
}
}
Upgrademe::register();
} # class_exists()

Datei anzeigen

@ -4,7 +4,7 @@
*
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0 Beta
* @since 1.0.0
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
@ -69,7 +69,7 @@
}
}
### Auslesen der höchsten Post-ID
### Auslesen der h<EFBFBD>chsten Post-ID
function sem_getMaxPostID() {
global $wpdb;
$maxpostid = $wpdb->get_var("SELECT MAX(ID) FROM ".$wpdb->posts." LIMIT 0,1");
@ -117,7 +117,12 @@ function sem_AreYouBot($user_agent) {
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) {
if(empty($referer)) return false;
$homehost = '%'.(substr($_SERVER['SERVER_NAME'],0,4) == 'www.')?
@ -221,14 +226,14 @@ function sem_getKeyword($referer) {
elseif (preg_match("/".$homehost."/i", $keyword["host"])) {
parse_str($keyword["query"],$q);
$keyword = $q["s"];
if($keyword == "") return; return "Interne Suche: ".$keyword;
if($keyword == "") return; return semr_i18n("Internal search: ").$keyword;
}
else {
return;
}
}
### Anzahl der Datensätze in der statz-Tabelle
### Anzahl der Datens<EFBFBD>tze in der statz-Tabelle
function sem_showNumStatzEntries() {
global $wpdb;
$numstatzentries = $wpdb->get_var("SELECT COUNT(id) FROM ".$wpdb->statz);
@ -259,27 +264,41 @@ function sem_getKeyword($referer) {
}
}
### Zeigt Copyright-Notiz an
function sem_showCopyright() {
print "<p class='copyright'>semmelstatzR ". SEMMELSTATZR_VERSION . " 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/'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/statzR.png' /></a></p>";
}
### statz-Tabelle leeren (NICHT LÖSCHEN!!!)
function sem_truncateStatzTable() {
global $wpdb, $userip;
$wpdb->query('TRUNCATE TABLE '.$wpdb->statz);
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')");
/**
* prints a copyright notiz
*/
function sem_showCopyright() {
print "<p class='copyright'>semmelstatzR ". SEMMELSTATZR_VERSION .
" 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/'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/statzR.png' /></a></p>";
}
### Obsolet, bleibt aber aus Kompatibilitätsgründen zu SEMMELSTATZ_DELETE
function sem_delOldRecords($days) {
return true;
}
/**
* empty statz table
*
* @global type $wpdb
* @return bool
*/
function sem_truncateStatzTable() {
global $wpdb;
$wpdb->query('TRUNCATE TABLE '.$wpdb->statz);
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;
}
### simpleEncoding für die GoogleChartAPI
/**
*
* @deprecated no need to hold unused functions in semR
* @todo remove in next major release
* @param int $days
* @return boolean
*/
function sem_delOldRecords($days) {
return true;
}
### simpleEncoding f<>r die GoogleChartAPI
function sem_encodeChartData($values) {
$maxValue = max($values);
@ -298,7 +317,7 @@ function sem_truncateStatzTable() {
return $chartData;
}
### Datensätze älter als statz_recdays_limit-Tage löschen
### Datens<EFBFBD>tze <20>lter als statz_recdays_limit-Tage l<>schen
function sem_delOutOfLimit() {
global $wpdb;
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
@ -309,7 +328,7 @@ function sem_truncateStatzTable() {
sem_optStatzTable();
}
### Wenn AUTOMATISCHES LIMIT aktiviert, dann LIMITIERE und erhöhe NEXT_CRON
### Wenn AUTOMATISCHES LIMIT aktiviert, dann LIMITIERE und erh<EFBFBD>he NEXT_CRON
function sem_doCronStatzLimit() {
sem_delOutOfLimit();
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
@ -330,32 +349,36 @@ function sem_truncateStatzTable() {
}
### Unter bestimmten Voraussetzungen den Vortag in die statzhist-Tabelle schreiben
function sem_writeYesterdayToHist() {
global $wpdb;
if(!$wpdb->get_var("SELECT date FROM ".$wpdb->statzhist." WHERE substring(date,1,10) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)")) {
/**
* @todo add action cache so we don't need to do it with every call
* @global type $wpdb
*/
function sem_writeYesterdayToHist() {
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 COUNT(ip) FROM ".$wpdb->statz." WHERE substring(time,1,10) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)")) {
if($wpdb->get_var("SELECT COUNT(ip) FROM ".$wpdb->statz." WHERE substring(time,1,10) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)")) {
$yesterdays = $wpdb->get_results("SELECT COUNT(ip) AS hits, COUNT(DISTINCT ip) AS visitors, COUNT(DISTINCT referer)
AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE substring(time,1,10) = DATE_SUB(CURDATE(),
INTERVAL 1 DAY) GROUP BY date");
$yesterdays = $wpdb->get_results("SELECT COUNT(ip) AS hits, COUNT(DISTINCT ip) AS visitors, COUNT(DISTINCT referer)
AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE substring(time,1,10) = DATE_SUB(CURDATE(),
INTERVAL 1 DAY) GROUP BY date");
foreach ($yesterdays as $yesterday) {
$date = $yesterday->date;
$visitors = $yesterday->visitors;
$hits = $yesterday->hits;
$referers = $yesterday->referers;
}
$sql = $wpdb->query("INSERT INTO ".$wpdb->statzhist." (date, referers, visitors, hits)
VALUES('$date', $referers, $visitors, $hits)");
}
else {
$date = $wpdb->get_var("SELECT DATE_SUB(CURDATE(), INTERVAL 1 DAY)");
$sql = $wpdb->query("INSERT INTO ".$wpdb->statzhist." (date, referers, visitors, hits) VALUES('$date', 0, 0, 0)");
foreach ($yesterdays as $yesterday) {
$date = $yesterday->date;
$visitors = $yesterday->visitors;
$hits = $yesterday->hits;
$referers = $yesterday->referers;
}
$sql = $wpdb->query("INSERT INTO ".$wpdb->statzhist." (date, referers, visitors, hits)
VALUES('$date', $referers, $visitors, $hits)");
}
else {
$date = $wpdb->get_var("SELECT DATE_SUB(CURDATE(), INTERVAL 1 DAY)");
$sql = $wpdb->query("INSERT INTO ".$wpdb->statzhist." (date, referers, visitors, hits) VALUES('$date', 0, 0, 0)");
}
}
}
/* Summen der vergangenen Tage in die statzhist schreiben */
function sem_writeOldDaysToHist() {
@ -378,8 +401,11 @@ function sem_truncateStatzTable() {
}
/**
* translate and return a string
* translate and return a string
*
* @uses wp-function __() and prefilled plugin gettextdomain
* @author Ortwin Pinke
* @since 1.0.0
*
* @param string $sValue string to translate
* @param string $sDomain gettextdomain
@ -391,7 +417,10 @@ function semr_i18n($sValue, $sDomain = "semmelstatzR") {
/**
* translate and echo a string
*
* @uses wp-function _e() and prefilled plugin gettextdomain
* @author Ortwin Pinke
* @since 1.0.0
*
* @param string $sValue
* @param string $sDomain
@ -403,7 +432,10 @@ function semr_i18ne($sValue, $sDomain = "semmelstatzR") {
/**
* translate and return a plural or singular string based on an amount
*
* @uses wp-function _n() and prefilled plugin gettextdomain
* @author Ortwin Pinke
* @since 1.0.0
*
* @param string $sSingular
* @param string $sPlural
@ -415,5 +447,61 @@ function semr_i18np($sSingular, $sPlural, $iNumber, $sDomain = "semmelstatzR") {
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
?>

Datei anzeigen

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

133
includes/help/start.php Normale Datei
Datei anzeigen

@ -0,0 +1,133 @@
<?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);
?>

14
includes/help/v32/sample.php Normale Datei
Datei anzeigen

@ -0,0 +1,14 @@
<?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);
?>

4
includes/help/v32/statz.tpl Normale Datei
Datei anzeigen

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

82
includes/help/v33/sample.php Normale Datei
Datei anzeigen

@ -0,0 +1,82 @@
<?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();
}
?>

17
includes/help/v33/test.php Normale Datei
Datei anzeigen

@ -0,0 +1,17 @@
<?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,90 +1,534 @@
# 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 ""
msgstr ""
"Project-Id-Version: semmelstatzR\n"
"Project-Id-Version: semmelstatzR 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-08-23 18:59+0100\n"
"PO-Revision-Date: 2011-08-23 18:59+0100\n"
"POT-Creation-Date: 2011-12-19 19:10+0100\n"
"PO-Revision-Date: 2013-08-27 17:36+0100\n"
"Last-Translator: Ortwin Pinke <translation@dceonline.de>\n"
"Language-Team: \n"
"Language-Team: SEM-Team <semr@ortwinpinke.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\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"
"X-Poedit-Language: German\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Country: GERMANY\n"
"X-Poedit-SearchPath-0: semmelstatzR\n"
"Language: de_DE\n"
"X-Generator: Poedit 1.5.7\n"
#: semmelstatzR/semmelstatzR.php:96
#: semmelstatzR-statz.php:71
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"
msgstr "Aktuell"
msgstr "Aktuelle Statistik"
#: semmelstatzR/semmelstatzR.php:97
#: semmelstatzR-history.php:49 semmelstatzR-templates.php:49
#: 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"
msgstr "Historie"
#: semmelstatzR/semmelstatzR.php:98
msgid "Log"
msgstr "Log"
#: includes/functions.semr.php:229
msgid "Internal search: "
msgstr "Interne Suche:"
#: semmelstatzR/semmelstatzR.php:99
#: 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/semmelstatzR.php:100
#: 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"
msgstr "Log"
#: semmelstatzR-log.php:63
#, php-format
msgid "The %s newest records"
msgstr "Die %s neuesten Eintr&auml;ge"
#: semmelstatzR-log.php:77
msgid "Search term"
msgstr "Suchbegriff"
#: semmelstatzR.php:108
msgid "Templates"
msgstr "Templates"
#: semmelstatzR/semmelstatzR.php:101
msgid "Options"
msgstr "Optionen"
#: semmelstatzR.php:178
msgid ""
"Cannot find <i>wp-admin/upgrade-functions.php</i> and <i>wp-admin/includes/"
"upgrade.php</i>!"
msgstr ""
"Kann <i>wp-admin/upgrade-functions.php</i> und <i>wp-admin/includes/upgrade."
"php</i> nicht finden!"
#: semmelstatzR/semmelstatzR.php:273
#: semmelstatzR.php:292
#, php-format
msgid "%d Visitor online"
msgid_plural "%d Visitors online"
msgstr[0] "%d Besucher online"
msgstr[1] "%d Besucher online"
#: semmelstatzR/semmelstatzR.php:275
#: semmelstatzR.php:294
#, php-format
msgid "Today: %s"
msgstr "Heute: %s"
#: semmelstatzR/semmelstatzR.php:276
#: semmelstatzR.php:295
msgid "more..."
msgstr "mehr..."
#: semmelstatzR/semmelstatzR.php:296
#: semmelstatzR.php:299
#, 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):"
msgstr "Anzahl der Einträge (max. 20):"
msgstr "Anzahl der Eintr&auml;ge (max. 10):"
#: semmelstatzR/semmelstatzR.php:319
#: semmelstatzR.php:372
msgid "... no entries"
msgstr "... keine Einträge"
msgstr "... keine Eintr&auml;ge"
#: semmelstatzR/semmelstatzR.php:327
#: semmelstatzR.php:380
#, php-format
msgid "%d Visitor"
msgid_plural "%d Visitors"
msgstr[0] "%d Besucher"
msgstr[1] "%d Besucher"
#: semmelstatzR/semmelstatzR.php:328
#: semmelstatzR.php:381
#, php-format
msgid "%d Hit"
msgid_plural "%d Hits"
msgstr[0] "%d Aufruf"
msgstr[1] "%d Aufrufe"
msgstr[0] "%d Zugriff"
msgstr[1] "%d Zugriffe"
#: semmelstatzR/semmelstatzR.php:329
#: semmelstatzR.php:382
#, php-format
msgid "%d Referrer"
msgid_plural "%d Referrers"
msgstr[0] "%d Referer"
msgstr[1] "%d Referer"
msgid "%d Referer"
msgid_plural "%d Referers"
msgstr[0] "%d Referrer"
msgstr[1] "%d Referrer"
#~ msgid "Number of Whatever:"
#~ msgstr "Anzahl von Was auch immer:"
#: semmelstatzR.php:5
msgid ""
"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)"

508
locale/semmelstatzR.pot Normale Datei
Datei anzeigen

@ -0,0 +1,508 @@
# 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
* @version $Rev$
* @since 1.0.0 Beta
* @since 1.0.0
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
@ -54,18 +54,18 @@ if(current_user_can('manage_statz')) {
print "<div class='wrap'>";
print "<div><a name='top'></a></div>";
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &rsaquo; Datenbank</h2>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("Database")."</h2>";
print "<div class='statz'>Datenbank</div>";
print "<div class='statz'>".semr_i18n("Database")."</div>";
print "<table class='statzelement'>";
print "<tr>";
print "<th style='text-align:center;width:6%'>Nr.</th>";
print "<th style='text-align:left;width:20%'>Tabellen</th>";
print "<th style='text-align:right;width:10%'>Datens&auml;tze</th>";
print "<th style='text-align:right;width:10%'>Daten</th>";
print "<th style='text-align:right;width:10%'>Index</th>";
print "<th style='text-align:right;width:10%'>Daten & Index</th>";
print "<th style='text-align:right;width:7%'>&Uuml;berhang</th>";
print "<th style='text-align:center;width:6%'>".semr_i18n("No.")."</th>";
print "<th style='text-align:left;width:20%'>".semr_i18n("Tables")."</th>";
print "<th style='text-align:right;width:10%'>".semr_i18n("Records")."</th>";
print "<th style='text-align:right;width:10%'>".semr_i18n("Data")."</th>";
print "<th style='text-align:right;width:10%'>".semr_i18n("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:7%'>".semr_i18n("Overhang")."</th>";
$row_usage = 0;
$data_usage = 0;
@ -102,7 +102,7 @@ if(current_user_can('manage_statz')) {
}
print "<tr>";
print "<th style='text-align:center;'>Gesamt</th>";
print "<th style='text-align:center;'>".semr_i18n("Total")."</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($data_usage/1024,0,',','.')."&nbsp;kb</th>";
@ -111,8 +111,9 @@ if(current_user_can('manage_statz')) {
print "<th style='color:#ff0000;text-align:right;'>".number_format($overhead_usage/1024,2,',','.')."&nbsp;kb</th>";
print "</tr>";
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>";
print "<tr><td colspan='7'><p align='right'>";
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 "<hr />";

Datei anzeigen

@ -4,7 +4,7 @@
*
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0 Beta
* @since 1.0.0
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
@ -45,26 +45,36 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if(!current_user_can('manage_statz')) {
die('Zugriff verweigert');
if(!current_user_can('manage_statz')) {
die(semr_i18n("Restricted Area"));
}
include_once plugin_dir_path(__FILE__).'includes/pChart/class/pData.class.php';
include_once plugin_dir_path(__FILE__).'includes/pChart/class/pDraw.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() {
global $wpdb;
//$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");
print "<div class='statz'>Besucher: Die letzten 30 Tage</div>";
print "<div class='statz'>".semr_i18n("Visitors: Last 30 days")."</div>";
print "<div align='left'>";
if (empty($results)) {
print "<small>... noch keine Eintr&auml;ge</small></div>";
return;
print "<small>... ".semr_i18n("no entries")."</small></div>";
return;
}
foreach ($results as $result) {
@ -107,19 +117,26 @@ function sem_drawLast30DaysGoo() {
print "<hr />";
}
### HISTORY Monatsgrafik GOOGLE-API
function sem_drawAllMonthGoo() {
/**
* chart of all month
*
* @global wpdb $wpdb
* @return void
*/
function sem_drawAllMonthGoo() {
global $wpdb;
$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");
print "<div class='statz'>Besucher: Die letzten ".$nummonths." Monate</div>";
print "<div align='left'>";
print "<div class='statz'>";
printf(semr_i18np("Visitors: Last %s month", "Visitors: Last %s month", $nummonths), $nummonths);
print "</div>";
print "<div align='left'>";
if (empty($results)) {
print "<small>... noch keine Eintr&auml;ge</small></div>";
print "<small>... ".semr_i18n("no entries")."</small></div>";
return;
}
@ -163,10 +180,12 @@ function sem_drawLast30DaysGoo() {
print "<hr />";
}
### HISTORY ALLE historischen Tage
/**
*
* @global wpdb $wpdb
* @return void
*/
function sem_drawAllDaysGoo() {
/* @var $wpdb wpdb */
global $wpdb;
$numdays = $wpdb->get_var("SELECT COUNT(date) FROM ".$wpdb->statzhist);
@ -175,12 +194,14 @@ function sem_drawAllDaysGoo() {
FROM ".$wpdb->statzhist." GROUP BY date ORDER BY date ASC");
print "<div class='statz'>Besucher: ".$numdays." Tage zur&uuml;ck</div>";
print "<div class='statz'>";
printf(semr_i18np("Visitors: %s day back", "Visitors: %s days back", $numdays), $numdays);
print "</div>";
print "<div align='left'>";
if (empty($results)) {
print "<small>... noch keine Eintr&auml;ge</small></div>";
return;
print "<small>... ".semr_i18n("no entries")."</small></div>";
return;
}
foreach($results as $result) {
@ -230,18 +251,20 @@ function sem_drawAllDaysGoo() {
$results = $wpdb->get_results("SELECT referers, visitors, hits, substring(date,1,10) AS date
FROM ".$wpdb->statzhist." GROUP BY date ORDER BY date DESC");
print "<div class='statz'>Die letzten ".$numdays." Tage</div>";
print "<div class='statz'>";
printf(semr_i18np("Last %s day", "Last %s days", $numdays), $numdays);
print "</div>";
if (empty($results)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<small>... ".semr_i18n("no entries")."</small></div>";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='width:15%;text-align:center;'>Datum</th>";
print "<th style='width:10%;text-align:right;'>Besucher</th>";
print "<th style='width:10%;text-align:right;'>Hits</th>";
print "<th style='width:10%;text-align:right;'>Referer</th>";
print "<th style='width:15%;text-align:center;'>".semr_i18n("Date")."</th>";
print "<th style='width:10%;text-align:right;'>".semr_i18n("Visitors")."</th>";
print "<th style='width:10%;text-align:right;'>".semr_i18n("Hits")."</th>";
print "<th style='width:10%;text-align:right;'>".semr_i18n("Referrer")."</th>";
print "<th style='text-align:right;'>&nbsp;</th>";
print "</tr>";
print "</thead>";
@ -249,32 +272,32 @@ function sem_drawAllDaysGoo() {
$sum_visitors = 0;
$sum_hits = 0;
$sum_referers = 0;
foreach($results as $key=>$result) {
$date = mysql2date('d.m.Y',$result->date);
$visitors = $result->visitors;
$sum_visitors += $visitors;
$hits = $result->hits;
$sum_hits += $hits;
$referers = $result->referers;
$sum_referers += $referers;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align:center;'>".$date."</td>";
print "<td style='text-align:right;'>".$visitors."</td>";
print "<td style='text-align:right;'>".$hits."</td>";
print "<td style='text-align:right;'>".$referers."</td>";
print "<td style='text-align:right;'>&nbsp;</td>";
print "</tr>";
}
foreach($results as $key=>$result) {
$date = mysql2date('d.m.Y',$result->date);
$visitors = $result->visitors;
$sum_visitors += $visitors;
$hits = $result->hits;
$sum_hits += $hits;
$referers = $result->referers;
$sum_referers += $referers;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align:center;'>".$date."</td>";
print "<td style='text-align:right;'>".$visitors."</td>";
print "<td style='text-align:right;'>".$hits."</td>";
print "<td style='text-align:right;'>".$referers."</td>";
print "<td style='text-align:right;'>&nbsp;</td>";
print "</tr>";
}
print "<tr><td>&nbsp;</td></tr>";
print "<tr class='alternate'"; print ">";
print "<td style='text-align:center;'><b>Gesamt</b></td>";
print "<td style='text-align:center;'><b>".semr_i18n("Total")."</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_referers."</b></td>";
print "</tr>";
print "<tr>";
print "<td style='text-align:center;'><b>Durchschnitt</b></td>";
print "<td style='text-align:center;'><b>".semr_i18n("Average")."</b></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_referers / $numdays)."</td>";
@ -289,7 +312,7 @@ function sem_drawAllDaysGoo() {
print "<div class='wrap'>";
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &rsaquo; Historie</h2>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("History")."</h2>";
sem_drawLast30DaysGoo();
sem_drawAllMonthGoo();

Datei anzeigen

@ -4,7 +4,7 @@
*
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0 Beta
* @since 1.0.0
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
@ -46,106 +46,106 @@
*/
if(!current_user_can('manage_statz')) {
die('Zugriff verweigert');
die(semr_i18n("Restricted Area"));
}
### ANZEIGE LOG
global $wpdb;
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
$limit = $sem_options["statz_datarecs_limit"]; $mask = $sem_options["statz_mask_referer"];
$completerecords = $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 id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("Log")."</h2>";
print "<div class='statz'>";
printf(semr_i18n("The %s newest records"), $limit);
print "</div>";
global $wpdb;
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
$limit = $sem_options["statz_datarecs_limit"]; $mask = $sem_options["statz_mask_referer"];
$completerecords =
$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 id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &rsaquo; Log</h2>";
print "<div class='statz'>Die neuesten ".$limit." Datens&auml;tze</div>";
if ($completerecords == NULL) {
print '<small>... '. semr_i18n("no entries at all").'</small>';
return;
}
if ($completerecords == NULL) {
print "<small>... noch keine Eintr&auml;ge</small>";
return;
}
print "<table cellpadding='5' style='text-align:center; width:100%;'>";
print "<thead>";
print "<tr>";
print "<th style='text-align:center;width:110px;'><small>Datum</small></th>";
print "<th style='text-align:center;width:80px;'><small>TCP/IP</small></th>";
print "<th style='text-align:left;'><small>Referer</small></th>";
print "<th style='text-align:left;'><small>Suchbegriff</small></th>";
print "<th style='text-align:left;'><small>Post/Page</small></th>";
print "<th style='text-align:left;'><small>Username</small></th>";
print "</tr>";
print "</thead>";
print "<tbody>";
foreach ($completerecords as $key=>$completerecord) {
$id = $completerecord->id;
$ip = $completerecord->ip;
if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip);
$date = mysql2date("d.m.Y G:i", $completerecord->time);
$referer = $completerecord->referer;
if($referer == "") {
$referer = "--";
}
else {
if(strlen($referer) >= 50) {
$printreferer = substr($referer, 0, 50)."...";
}
else {
$printreferer = $referer;
}
}
$keyword = sem_getKeyword($referer);
if(empty($keyword)) $keyword ='--';
$page = $completerecord->page;
if ($page == 0) {
$link = get_option('siteurl');
$title = "0"; //oder wie auch immer
}
else {
$link = get_permalink($page);
$postarray = get_post($page, ARRAY_A);
$title = $postarray['post_title'];
}
$username = $completerecord->username;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='white-space:nowrap;text-align:center;'><small>".$date."</small></td>";
print "<td style='white-space:nowrap;text-align:center;'>
<a target='_blank' style='border:none;' href='http://ws.arin.net/whois/?queryinput=".$ip."'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/arin.png' /></a>&nbsp;
<a target='_blank' style='border:none;' href='http://www.ripe.net/whois?searchtext=".$ip."'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/ripe.png' /></a>&nbsp;
<a target='_blank' style='border:none;' href='http://www.utrace.de/?query=".$ip."'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/utrace.png' /></a></td>";
print "<td style='text-align:left;'><small>";
if ($referer == "--") {
print "--</small></td>";
}
else {
if($mask != true) {
print "<a target='_blank' style='text-decoration:none;' href='".$referer."'>".$printreferer."</a></td>";
}
else {
$referer = htmlspecialchars($referer, ENT_QUOTES);
print "<a target='_blank' style='text-decoration:none;' href='http://www.google.com/url?sa=D&q=".$referer."'>".$printreferer."</a></td>";
}
}
print "<td style='text-align:left;'><small>".$keyword."</small></td>";
print "<td style='text-align:left;'><small><a target='_blank' style='text-decoration:none;' href='".$link."'>".$title."</small></td>";
print "<td style='text-align:left;'><small>".$username."</small></td>";
print "</tr>";
}
print "</tbody>";
print "</table>";
print "<hr />";
if (function_exists('sem_showCopyright')) sem_showCopyright();
print "</div>";
print "<table cellpadding='5' style='text-align:center; width:100%;'>";
print "<thead>";
print "<tr>";
print "<th style='text-align:center;width:110px;'><small>".semr_i18n("Date")."</small></th>";
print "<th style='text-align:center;width:80px;'><small>".semr_i18n("TCP/IP")."</small></th>";
print "<th style='text-align:left;'><small>".semr_i18n("Referrer")."</small></th>";
print "<th style='text-align:left;'><small>".semr_i18n("Search term")."</small></th>";
print "<th style='text-align:left;'><small>".semr_i18n("Post/Page")."</small></th>";
print "<th style='text-align:left;'><small>".semr_i18n("Username")."</small></th>";
print "</tr>";
print "</thead>";
print "<tbody>";
foreach ($completerecords as $key=>$completerecord) {
$id = $completerecord->id;
$ip = $completerecord->ip;
if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip);
$date = mysql2date("d.m.Y G:i", $completerecord->time);
$referer = $completerecord->referer;
if($referer == "") {
$referer = "--";
}
else {
if(strlen($referer) >= 50) {
$printreferer = substr($referer, 0, 50)."...";
}
else {
$printreferer = $referer;
}
}
$keyword = sem_getKeyword($referer);
if(empty($keyword)) $keyword ='--';
$page = $completerecord->page;
if ($page == 0) {
$link = get_option('siteurl');
$title = "0"; //oder wie auch immer
}
else {
$link = get_permalink($page);
$postarray = get_post($page, ARRAY_A);
$title = $postarray['post_title'];
}
$username = $completerecord->username;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='white-space:nowrap;text-align:center;'><small>".$date."</small></td>";
print "<td style='white-space:nowrap;text-align:center;'>
<a target='_blank' style='border:none;' href='http://ws.arin.net/whois/?queryinput=".$ip."'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/arin.png' /></a>&nbsp;
<a target='_blank' style='border:none;' href='http://www.ripe.net/whois?searchtext=".$ip."'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/ripe.png' /></a>&nbsp;
<a target='_blank' style='border:none;' href='http://www.utrace.de/?query=".$ip."'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/utrace.png' /></a></td>";
print "<td style='text-align:left;'><small>";
if ($referer == "--") {
print "--</small></td>";
}
else {
if($mask != true) {
print "<a target='_blank' style='text-decoration:none;' href='".$referer."'>".$printreferer."</a></td>";
}
else {
$referer = htmlspecialchars($referer, ENT_QUOTES);
print "<a target='_blank' style='text-decoration:none;' href='http://www.google.com/url?sa=D&q=".$referer."'>".$printreferer."</a></td>";
}
}
print "<td style='text-align:left;'><small>".$keyword."</small></td>";
print "<td style='text-align:left;'><small><a target='_blank' style='text-decoration:none;' href='".$link."'>".$title."</small></td>";
print "<td style='text-align:left;'><small>".$username."</small></td>";
print "</tr>";
}
print "</tbody>";
print "</table>";
print "<hr />";
if (function_exists('sem_showCopyright')) sem_showCopyright();
print "</div>";
?>

Datei anzeigen

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

Datei anzeigen

@ -4,7 +4,7 @@
*
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0 Beta
* @since 1.0.0
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
@ -59,99 +59,147 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
$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
FROM ".$wpdb->statz." WHERE time > Now() - INTERVAL ".$onlinetime." SECOND GROUP BY ip ORDER BY page DESC");
print "<div class='statz'>".sem_showNumUsersOnline()." Besucher online - Heute: ".sem_showTodayStatz()."</div>";
print "<div class='statz'>";
$iUsersOnline = (int) sem_showNumUsersOnline();
printf("%s ".semr_i18np("Visitor online", "Visitors online", $iUsersOnline), $iUsersOnline);
print " - ".semr_i18n("Today").": ".sem_showTodayStatz()."</div>";
if (empty($onlineusers)) {
print "<small>... keine Eintr&auml;ge</small>";
print "<hr />";
print "<small>... ".semr_i18n("no entries")."</small>";
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align:left;'>Username</th>";
print "<th style='text-align:left;'>Post/Page</th>";
print "<th style='text-align:left;'>TCP/IP</th>";
print "<th style='text-align:center;'>Zeit</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
print '<table class="statzelement">';
print '<thead>';
print '<tr>';
print '<th style="text-align:left;">'.semr_i18n("Username").'</th>';
print '<th style="text-align:left;">'.semr_i18n("Post/Page").'</th>';
print '<th style="text-align:left;">'.semr_i18n("TCP/IP").'</th>';
print '<th style="text-align:center;">'.semr_i18n("Time").'</th>';
print '</tr>';
print '</thead>';
print '<tbody>';
foreach ($onlineusers as $key=>$onlineuser) {
$username = $onlineuser->username;
$page = $onlineuser->page;
if ($page == 0) {
$link = get_option('siteurl');
$title = 'startseite'; //oder wie auch immer
}
else {
$title = semr_i18n("startpage");
} 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
$title = get_post($page);
if(is_array($title)) {
$title = $title->post_title;
} else {
$link = null;
$title = semr_i18n("no page");
}
}
$ip = $onlineuser->ip;
if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip);
$time = mysql2date("H:i",$onlineuser->time);
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align:left;'>".$username."</td>";
print "<td style='text-align:left;'><a target='_blank' href=".$link.">".$title."</td>";
print "<td style='white-space:nowrap;text-align:left;'>
<a target='_blank' style='border:none;' href='http://ws.arin.net/whois/?queryinput=".$ip."'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/arin.png' /></a>&nbsp;
<a target='_blank' style='border:none;' href='http://www.ripe.net/whois?searchtext=".$ip."'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/ripe.png' /></a>&nbsp;
<a target='_blank' style='border:none;' href='http://www.utrace.de/?query=".$ip."'>
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/utrace.png' /></a></td>";
print "<td style='text-align:center;'>$time</td>";
print "</tr>";
print '<tr'.((1&$key)?' class="alternate">':'>');
print '<td style="text-align:left;">'.$username.'</td>';
print '<td style="text-align:left;">';
print (is_null($link))?$title:'<a target="_blank" href="'.$link.'">'.$title.'</a>';
print '</td>';
print '<td style="white-space:nowrap;text-align:left;">';
if($sem_options['show_arin']) {
print '<a target="_blank" href="http://ws.arin.net/whois/?queryinput='.$ip.'">';
print '<img src="'.SEMMELSTATZR_HTML_RELPATH.'img/arin.png" alt="" />';
print '</a>&nbsp;';
}
if($sem_options['show_whois']) {
print '<a target="_blank" href="http://www.ripe.net/whois?searchtext='.$ip.'">';
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 '</tbody>';
print '</table>';
print "<hr />";
}
function sem_draw24HoursGoo() {
global $wpdb;
$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");
print "<div class='statz'>Besucher: Die letzten 24 Stunden</div>";
print "<div align='left'>";
if (empty($results)) {
print "<small>... noch keine Eintr&auml;ge</small></div>";
print "<hr />";
return;
}
foreach ($results as $result) {
$visitors[] = $result->visitors;
$hours[] = mysql2date('H', $result->hours);
function sem_draw24HoursGoo() {
global $wpdb;
$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");
print '<div class="statz">';
print semr_i18n("Visitors: Last 24 hours").'</div>';
print "<div align='left'>";
if(empty($results)) {
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
$aHours = array();
$aVisitors = array();
$iInterval = 86400-7200;
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->addPoints($visitors,"Visitors");
$MyData->addPoints($aVisitors,"Visitors");
$MyData->setAxisName(0,"Visitors");
$MyData->addPoints($hours,"Hours");
$MyData->addPoints($aHours,"Hours");
$MyData->setAbscissa("Hours");
$myPicture = new pImage(780,150,$MyData);
$myPicture->Antialias = FALSE;
$myPicture->Antialias = true;
$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->setGraphArea(30,20,760,130);
$scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200);
$scaleSettings = array(
//"DrawSubTicks"=>TRUE,
"GridR"=>200,
"GridG"=>200,
"GridB"=>200
);
$myPicture->drawScale($scaleSettings);
$myPicture->drawBarChart();
@$myPicture->Render(WP_CONTENT_DIR."/cache/24HourGoo.png");
print "<div class='chart'>";
$myPicture->drawBarChart(array("DisplayValues"=>true,"DisplayColor"=>DISPLAY_MANUAL,"DisplayPos"=>LABEL_POS_OUTSIDE));
//$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");
print '<div class="chart">';
if(is_readable(WP_CONTENT_DIR."/cache/24HourGoo.png")) {
print '<img src="'.WP_CONTENT_URL.'/cache/24HourGoo.png" />';
} else if(!is_dir(WP_CONTENT_DIR."/cache")) {
@ -175,19 +223,21 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE time >= CURDATE() - INTERVAL ".$daylimit." DAY
GROUP BY date ORDER BY time DESC");
print "<div class='statz'>".$limit."-Tage-Statistik</div>";
print '<div class="statz">';
printf (semr_i18n("%s-Days-Statz"), $limit);
print '</div>';
if (empty($thedays)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align:left;'>Datum</th>";
print "<th style='width: 15%;text-align:center;'>Besucher</th>";
print "<th style='width: 15%;text-align:center;'>Hits</th>";
print "<th style='width: 15%;text-align:center;'>Referer</th>";
print "<th style='text-align:left;'>".semr_i18n("Date")."</th>";
print "<th style='width: 15%;text-align:center;'>".semr_i18n("Visitors")."</th>";
print "<th style='width: 15%;text-align:center;'>".semr_i18n("Hits")."</th>";
print "<th style='width: 15%;text-align:center;'>".semr_i18n("Referer")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
@ -197,13 +247,13 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
$today = time();
$difference = ceil(($today - $date) / (60*60*24))-1;
if($difference == 0) {
$date = "Heute";
$date = semr_i18n("Today");
}
elseif($difference == 1) {
$date = "Gestern";
$date = semr_i18n("Yesterday");
}
elseif($difference == 2) {
$date = "Vorgestern";
$date = semr_i18n("2 days ago");
}
else {
$date = mysql2date("d.m.Y",$theday->date);
@ -219,7 +269,7 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
print "</tr>";
}
print "<tr>";
print "<td style='text-align:left;'><a href='".get_option('siteurl')."/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-history.php'>mehr...</a></td>";
print "<td style='text-align:left;'><a href='".get_option('siteurl')."/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-history.php'>".semr_i18n("more")."...</a></td>";
print "</tr>";
print "</tbody>";
print "</table>";
@ -236,22 +286,24 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
$lastreferers = $wpdb->get_results("SELECT DISTINCT referer, time FROM ".$wpdb->statz." WHERE referer
NOT LIKE '".$homehost."' ORDER BY time DESC LIMIT 0, ".$limit);
print "<div class='statz'>Die letzten ".$limit." Referer</div>";
print "<div class='statz'>";
printf (semr_i18n("The last %s Referrer"), $limit);
print "</div>";
if (empty($lastreferers)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align:center;width:12%;'>Zeit</th>";
print "<th style='text-align:left;'>Referer</th>";
print "<th style='text-align:center;width:12%;'>".semr_i18n("Time")."</th>";
print "<th style='text-align:left;'>".semr_i18n("Referrer")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
foreach ($lastreferers as $key=>$lastreferer) {
$referer = $lastreferer->referer;
$referer = strip_tags($lastreferer->referer);
if(strlen($referer) >= 120) {
$printreferer = substr($referer, 0, 120)." ...";
}
@ -276,29 +328,31 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
}
function sem_showKeyword() {
global $wpdb;
global $wpdb;
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
$limit = $sem_options["statz_keyword_limit"];
$results = $wpdb->get_results("SELECT referer, time, ip FROM $wpdb->statz WHERE referer != 'NULL' ORDER BY time DESC");
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
$limit = $sem_options["statz_keyword_limit"];
$results = $wpdb->get_results("SELECT referer, time, ip FROM $wpdb->statz WHERE referer != 'NULL' ORDER BY time DESC");
print "<div class='statz'>Die letzten $limit Suchbegriffe</div>";
if (empty($results)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: center;width:12%;'>Zeit</th>";
print "<th style='text-align:left;width:70%;'>Suchbegriff</th>";
print "<th style='text-align:left;'>TCP/IP</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
$i=0;
print "<div class='statz'>";
printf(semr_i18n("The last %s search terms"), $limit);
print "</div>";
if (empty($results)) {
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: center;width:12%;'>".semr_i18n("Time")."</th>";
print "<th style='text-align:left;width:70%;'>".semr_i18n("search term")."</th>";
print "<th style='text-align:left;'>".semr_i18n("TCP/IP")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
$i=0;
foreach($results as $result) {
$referer = $result->referer;
$keyword = sem_getKeyword($referer);
@ -334,58 +388,61 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
COUNT(".$wpdb->statz.".page) AS count FROM ".$wpdb->posts.", ".$wpdb->statz." WHERE
".$wpdb->statz.".page = ".$wpdb->posts.".ID AND time >= '$today' GROUP BY postid ORDER BY count DESC LIMIT 10");
print "<div class='statz'>Die Top10 aller Posts & Pages heute</div>";
print "<div class='statz'>";
print semr_i18n("Top 10 of todays posts &amp; pages")."</div>";
if (empty($topreads)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 45%;'>Post/Page</th>";
print "<th style='text-align: left; width: 45%;'>Postname</th>";
print "<th style='text-align: center; width: 10%;'>Hits</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Post/Page")."</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Postname")."</th>";
print "<th style='text-align: center; width: 10%;'>".semr_i18n("Hits")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
foreach ($topreads as $key=>$topread) {
$posttitle = $topread->posttitle;
$postname = $topread->postname;
$postid = $topread->postid;
$count = $topread->count;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'><a target='_blank' href='$postid'>".$posttitle."</a></td>";
print "<td style='text-align: left;'>".$postname."</td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
foreach ($topreads as $key=>$topread) {
$posttitle = $topread->posttitle;
$postname = $topread->postname;
$postid = $topread->postid;
$count = $topread->count;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'><a target='_blank' href='$postid'>".$posttitle."</a></td>";
print "<td style='text-align: left;'>".$postname."</td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
function sem_showTopReads() {
global $wpdb;
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
$limit = $sem_options["statz_topreads_limit"];
$topreads = $wpdb->get_results("SELECT post_title AS posttitle, post_name as postname, guid AS postid,
hits AS count FROM ".$wpdb->posts." WHERE hits != '0' GROUP BY postid ORDER BY hits DESC LIMIT 0, ".$limit);
print "<div class='statz'>Die Top".$limit." aller Posts & Pages</div>";
print "<div class='statz'>";
printf (semr_i18n("Top %s of all posts &amp; pages"), $limit);
print "</div>";
if (empty($topreads)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 45%;'>Post/Page</th>";
print "<th style='text-align: left; width: 45%;'>Postname</th>";
print "<th style='text-align: center; width: 10%;'>Hits</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Post/Page")."</th>";
print "<th style='text-align: left; width: 45%;'>".semr_i18n("Postname")."</th>";
print "<th style='text-align: center; width: 10%;'>".semr_i18n("Hits")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
@ -402,7 +459,7 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
function sem_showWhoWasOnlineToday() {
@ -411,16 +468,18 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
$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");
print "<div class='statz'>Bekannte Besucher heute</div>";
print '<div class="statz">';
print semr_i18n("Known visitors today");
print '</div>';
if (empty($todaysonlineusers)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 80%;'>Besucher (Hits)</th>";
print "<th style='text-align: left; width: 80%;'>".semr_i18n("Visitor (Hits)")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
@ -433,7 +492,7 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
function sem_showTopCommented() {
@ -442,35 +501,35 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
".$wpdb->comments.",". $wpdb->posts." WHERE comment_approved = '1' AND comment_post_id = id
GROUP BY guid ORDER BY count DESC LIMIT 0, 10");
print "<div class='statz'>Die Top10 aller kommentierter Posts</div>";
print "<div class='statz'>";
print semr_i18n("Top 10 of all commented posts")."</div>";
if (empty($topcommentedposts)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 80%;'>Post/Page</th>";
print "<th style='text-align: center; width: 20%;'>Kommentare</th>";
print "<th style='text-align: left; width: 80%;'>".semr_i18n("Post/Page")."</th>";
print "<th style='text-align: center; width: 20%;'>".semr_i18n("Comments")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
foreach ($topcommentedposts as $key => $topcommentedpost) {
$posttitle = $topcommentedpost->post_title;
$count = $topcommentedpost->count;
$postid = $topcommentedpost->guid;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'><a target='_blank' href='".$postid."'>&nbsp;".$posttitle."</a></td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
foreach ($topcommentedposts as $key => $topcommentedpost) {
$posttitle = $topcommentedpost->post_title;
$count = $topcommentedpost->count;
$postid = $topcommentedpost->guid;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'><a target='_blank' href='".$postid."'>&nbsp;".$posttitle."</a></td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
function sem_showCommenters() {
@ -483,43 +542,45 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
comment_author_email AS email, comment_author_url AS homepage FROM " .$wpdb->comments . " WHERE
comment_approved = '1' GROUP BY comment_author ORDER BY count DESC LIMIT 0, ".$limit);
print "<div class='statz'>Die Top".$limit." aller Kommentierer</div>";
print "<div class='statz'>";
printf(semr_i18n("Top %s of all commentators"), $limit);
print "</div>";
if (empty($topcommenters)) {
print "<small>... noch keine Eintr&auml;ge</small>";
print "<hr />";
print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />";
return;
}
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align: left; width: 20%;'>User</th>";
print "<th style='text-align: left; width: 30%;'>Email</th>";
print "<th style='text-align: left; width: 40%;'>Homepage</th>";
print "<th style='text-align: center; width: 10%;'>Kommentare</th>";
print "<th style='text-align: left; width: 20%;'>".semr_i18n("User")."</th>";
print "<th style='text-align: left; width: 30%;'>".semr_i18n("Email")."</th>";
print "<th style='text-align: left; width: 40%;'>".semr_i18n("Homepage")."</th>";
print "<th style='text-align: center; width: 10%;'>".semr_i18n("Comments")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
foreach ($topcommenters as $key=>$topcommenter) {
$commenter = $topcommenter->commenter;
$email = $topcommenter->email;
$homepage = $topcommenter->homepage;
if($homepage=="http://") $homepage="";
$url=parse_url($homepage);
$homepage = $url['host'];
$count = $topcommenter->count;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'>".$commenter."</td>";
print "<td style='text-align: left;'><a href='mailto:".$email."'>".$email."</a></td>";
print "<td style='text-align: left;'><a target='_blank' href='http://".$homepage."'>".$homepage."</a></td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
foreach ($topcommenters as $key=>$topcommenter) {
$commenter = $topcommenter->commenter;
$email = $topcommenter->email;
$homepage = $topcommenter->homepage;
if($homepage=="http://") $homepage="";
$url=parse_url($homepage);
$homepage = $url['host'];
$count = $topcommenter->count;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align: left;'>".$commenter."</td>";
print "<td style='text-align: left;'><a href='mailto:".$email."'>".$email."</a></td>";
print "<td style='text-align: left;'><a target='_blank' href='http://".$homepage."'>".$homepage."</a></td>";
print "<td style='text-align: center;'>".$count."</td>";
print "</tr>";
}
print "</tbody>";
print "</table>";
print "<hr />";
print "<hr />";
}
### AKTUELL Anzeige
@ -527,7 +588,7 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
print "<div class='wrap'>";
print "<div><a name='top'></a></div>";
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &rsaquo; Aktuell</h2>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("Current Statz")."</h2>";
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
if ($sem_options["statz_show_useronline"]) sem_showWhoIsOnline();
sem_draw24HoursGoo();
@ -542,4 +603,4 @@ include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php';
sem_showCopyright();
print "</div>";
?>
?>

Datei anzeigen

@ -4,7 +4,7 @@
*
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0 Beta
* @since 1.0.0
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
@ -46,210 +46,79 @@
*/
if(!current_user_can('manage_statz')) {
die('Zugriff verweigert');
die(semr_i18n("Restricted Area"));
}
### TEMPLATES
// entry format: functionname, needed param, type of return, remarks, manual example (no function call)
$aTemplates = array(
array("sem_showTotalPosts", "", semr_i18n("Integer"), semr_i18n("Number of all Posts"), ""),
array("sem_showTotalComments", "", semr_i18n("Integer"), semr_i18n("Number of all Comments"), ""),
array("sem_showTotalUsers", "", semr_i18n("Integer"), semr_i18n("Total Number of all visitors since statistics started"), ""),
array("sem_showAverageUserPerDay", "", semr_i18n("Decimal"), semr_i18n("Average of daily visitors"), ""),
array("sem_showFirstPostDate", "", semr_i18n("Date (d.m.y)"), semr_i18n("Date of the first post"), ""),
array("sem_showPostDays", "", semr_i18n("Integer"), semr_i18n("Days since first post"), ""),
array("sem_showFirstCommentDate", "", semr_i18n("Date (d.m.y)"), semr_i18n("Date of the first comment"), ""),
array("sem_showCommentDays", "", semr_i18n("Integer"), semr_i18n("Days since first comment"), ""),
array("sem_showPostsPerDay", "", semr_i18n("Decimal"), semr_i18n("Average of posts per day"), ""),
array("sem_showCommentsPerDay", "", semr_i18n("Decimal"), semr_i18n("Average of comments per day"), ""),
array("sem_showNumCommenters", "", semr_i18n("Integer"), semr_i18n("Total of all commentators"), ""),
array("sem_showStatzStartDate", "", semr_i18n("Date (d.m.y)"), semr_i18n("Date of commencement of statistics"), ""),
array("sem_showStatzDays", "", semr_i18n("Integer"), semr_i18n("Period of the statistics in days"), ""),
array("sem_showNumUsersOnline", "", semr_i18n("Integer"), semr_i18n("Number of users online"), ""),
array("sem_showLastComments", "10", semr_i18n("Formatted list"), semr_i18n("The 'n' newest comments with author, post, sorted by date desc<br/>CSS-ID: #lastcomments"), "n/a"),
array("sem_showLastPosts", "10", semr_i18n("Formatted list"), semr_i18n("The 'n' newest posts with title, sorted bei date desc<br/>CSS_ID: #lastposts"), "n/a"),
array("sem_showMostReads", "10", semr_i18n("Formatted list"), semr_i18n("'n' most readed posts/pages with hits in brackets<br/>CSS-ID: #mostreads"), "n/a"),
array("sem_showPostHitsInLoop", "get_the_ID()", semr_i18n("Integer"), semr_i18n("Shows count of hits of a post. Only works in the LOOP"), "only in LOOP")
);
$totalposts = sem_showTotalPosts();
$totalcomments = sem_showTotalComments();
$totalusers = sem_showTotalUsers();
$averageuserperday = sem_showAverageUserPerDay();
$firstpostdate = sem_showFirstPostDate();
$postdays = sem_showPostDays();
$firstcommentdate = sem_showFirstCommentDate();
$commentdays = sem_showCommentDays();
$postsperday = sem_showPostsPerDay();
$commentsperday = sem_showCommentsPerDay();
$numcommenters = sem_showNumCommenters();
$statzstartdate = sem_showStatzStartDate();
$statzdays = sem_showStatzDays();
$numusersonline = sem_showNumUsersOnline();
print "<form>";
print "<div class='wrap'>";
print "<div id='icon-template' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &gt; ".semr_i18n("Template-Functions")."</h2>";
print "<br />";
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align:left;'>".semr_i18n("Function")."</th>";
print "<th style='text-align:left;width:26em;'>".semr_i18n("Syntax")."</th>";
print "<th style='text-align:left;'>".semr_i18n("Returns")."</th>";
print "<th style='text-align:left;'>".semr_i18n("Example")."</th>";
print "<th style='text-align:left;'>".semr_i18n("Remarks")."</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
### DIE ANZEIGE
print "<form>";
print "<div class='wrap'>";
print "<div id='icon-template' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &rsaquo; Template-Funktionen</h2>";
print "<br />";
print "<table class='statzelement'>";
print "<thead>";
print "<tr>";
print "<th style='text-align:left;'>Funktion</th>";
print "<th style='text-align:left;width:26em;'>Syntax</th>";
print "<th style='text-align:left;'>R&uuml;ckgabewert</th>";
print "<th style='text-align:left;'>Hier</th>";
print "<th style='text-align:left;'>Bemerkung</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
print "<tr>";
print "<td>sem_showTotalPosts</td>";
print "<td><input type='text' value='<?php sem_showTotalPosts(); ?>' class='regular-text' /></td>";
print "<td>Ganzzahl</td>";
print "<td>$totalposts</td>";
print "<td>Anzahl aller Beitr&auml;ge</td>";
print "</tr>";
print "<tr>";
print "<td>sem_showTotalComments</td>";
print "<td><input type='text' value='<?php sem_showTotalComments(); ?>' class='regular-text' /></td>";
print "<td>Ganzzahl</td>";
print "<td>$totalcomments</td>";
print "<td>Anzahl aller Kommentare</td>";
print "</tr>";
print "<tr>";
print "<td>sem_showTotalUsers</td>";
print "<td><input type='text' value='<?php sem_showTotalUsers(); ?>' class='regular-text' /></td>";
print "<td>Ganzzahl</td>";
print "<td>$totalusers</td>";
print "<td>Gesamtzahl aller Besucher seit Statistikaufzeichnung</td>";
print "</tr>";
print "<tr>";
print "<td>sem_showAverageUserPerDay</td>";
print "<td><input type='text' value='<?php sem_showAverageUserPerDay(); ?>' class='regular-text' /></td>";
print "<td>Dezimal</td>";
print "<td>$averageuserperday</td>";
print "<td>Durchschnittliche Anzahl der t&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 "<td colspan='5'>";
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
<code>if (function_exists...</code> sichergestellt, wird die Indexseite des Blogs fehlerhaft bzw.
&uuml;berhaupt nicht dargestellt.";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "</td>";
print "</tr>";
print "</tbody>";
print "</table>";
print "<hr />";
if (function_exists('sem_showCopyright')) sem_showCopyright();
print "</div>";
print "</form>";
?>
// loop the functions array
foreach ($aTemplates as $value) {
if(empty($value[4])) {
$funcret = call_user_func($value[0]);
} else {
$funcret = $value[4];
}
print "<tr>";
print "<td>$value[0]</td>";
print "<td><input type='text' value='<?php $value[0]($value[1]); ?>' class='regular-text' /></td>";
print "<td>$value[2]</td>";
print "<td>$funcret</td>";
print "<td>$value[3]</td>";
print "</tr>";
}
print "<tr>";
print "<td colspan='5'>";
print semr_i18n("All functions (except the last one) you have to use outside the LOOP. Display of blog index page will be incorrect if semmelstatzR is deactivated and if you do not check for the existence of the templatefunctions using <code>if (function_exists...</code>");
/*
print "S&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.";
*
*/
print "</td>";
print "</tr>";
print "</tbody>";
print "</table>";
print "<hr />";
if (function_exists('sem_showCopyright')) sem_showCopyright();
print "</div>";
print "</form>";
?>

Datei anzeigen

@ -129,4 +129,16 @@ table.chartelement {
input.regular-text {
font-size: 11px;
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,8 +2,9 @@
/*
Plugin Name: semmelstatzR
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)
Version: 1.0.0 Beta
Version: 1.0.0 RC
Author: SEM-Team
Author URI: http://semmelstatz.sf.net
License: GPLv3
@ -14,9 +15,9 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.html
*
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0 Beta
* @since 1.0.0
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @copyright (c)2011-2012 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-3.0.html
*
@ -59,14 +60,30 @@ require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'semmelstatzR_startup.php';
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
*
* @uses wp add_action()
*
* @return void
*/
function semmelstatzR_css() {
print "<link rel='stylesheet' href='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/semmelstatzR.css' type='text/css' media='screen' />\n";
print "<link rel='stylesheet' href='".
get_option('siteurl').
"/wp-content/plugins/semmelstatzR/semmelstatzR.css' type='text/css' media='screen' />\n";
}
add_action('admin_head', 'semmelstatzR_css');
### End add CSS
@ -74,26 +91,46 @@ if(is_admin() == true) {
/**
* add toplevel menu into admin
*
* @todo localization
* @uses wp add_action() admin_menu
*
* @return void
*/
function semmelstatzR_menu() {
if (function_exists('add_menu_page')) {
add_menu_page('SemmelstatzR','SemmelstatzR', 'manage_statz', 'semmelstatzR/semmelstatzR-statz.php', '', plugins_url('semmelstatzR/img/statz_small.png'));
}
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');
add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Database'), semr_i18n('Database'), 'manage_statz', 'semmelstatzR/semmelstatzR-database.php');
add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Templates'), semr_i18n('Templates'), 'manage_statz', 'semmelstatzR/semmelstatzR-templates.php');
add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Options'), semr_i18n('Options'), 'manage_statz', 'semmelstatzR/semmelstatzR-options.php');
}
global $semr_hook;
if (function_exists('add_menu_page')) {
$semr_hook['semR'] = add_menu_page('SemmelstatzR','SemmelstatzR',
'manage_statz', 'semmelstatzR/semmelstatzR-statz.php', '',
plugins_url('semmelstatzR/img/statz_small.png'));
}
if (function_exists('add_submenu_page')) {
$semr_hook['statz'] = add_submenu_page('semmelstatzR/semmelstatzR-statz.php',
semr_i18n('Current Statz'), semr_i18n('Current Statz'),
'manage_statz', 'semmelstatzR/semmelstatzR-statz.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');
### end add toplevel adminmenu
// include context help system
include SEMMELSTATZR_SRVPATH."includes/help/start.php";
/**
@ -105,7 +142,7 @@ if(is_admin() == true) {
global $wpdb;
if(get_option('statz_options')) {
$wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'statz%';"); // Löschen der alten Optionen
$wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'statz%';"); // delete old options
}
if(!get_option('semmelstatzR_options')) {
@ -133,7 +170,7 @@ if(is_admin() == true) {
"statz_topreads_limit" => 10,
"statz_write_admins" => false,
"statz_write_users" => false,
"statz_use_img" => true
"statz_use_img" => false
);
add_option( 'semmelstatzR_options', $sem_options );
}
@ -144,8 +181,7 @@ if(is_admin() == true) {
}
### Anlegen der Tabellen, Optionen schreiben
add_action('activate_semmelstatzR/semmelstatzR.php', 'sem_statzsetup');
### Install db-tables, write default options
function sem_statzsetup() {
global $wpdb;
if(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) {
@ -153,7 +189,7 @@ function sem_statzsetup() {
} elseif(@is_file(ABSPATH.'/wp-admin/includes/upgrade.php')) {
include_once(ABSPATH.'/wp-admin/includes/upgrade.php');
} else {
die('Kann <i>wp-admin/upgrade-functions.php</i> und <i>wp-admin/includes/upgrade.php</i> nicht finden!');
die(semr_i18n('Cannot find <i>wp-admin/upgrade-functions.php</i> and <i>wp-admin/includes/upgrade.php</i>!'));
}
$create_table = array();
@ -194,6 +230,7 @@ function sem_statzsetup() {
$role->add_cap('manage_statz');
}
}
add_action('activate_semmelstatzR/semmelstatzR.php', 'sem_statzsetup');
### Zugriff analysieren und in statz-Tabelle schreiben
add_action('wp_footer', 'sem_writeStatz');
@ -205,9 +242,9 @@ function sem_writeStatz() {
// true === $sem_options['statz_use_img'] &&
if(true == $sem_options['statz_use_img'] && !defined('SEMMELSTATZR_STATZIMG')) {
print '<img src="'.SEMMELSTATZR_HTML_RELPATH.'semr_image.php" alt="" />';
return; ### nothing todo if stat image is used
return; ### nothing else todo if stat image is used
}
sem_writeYesterdayToHist();
$useragent = $wpdb->escape($_SERVER['HTTP_USER_AGENT']);
$isBot = sem_AreYouBot($useragent);
@ -221,17 +258,16 @@ function sem_writeStatz() {
$userip = $wpdb->escape($_SERVER['REMOTE_ADDR']);
if($sem_options['statz_encode_ip'] == true) $userip = sem_encodeIP($userip);
$referer = $wpdb->escape(urldecode($_SERVER['HTTP_REFERER']));
$referer = $wpdb->escape(urldecode($_SERVER['HTTP_REFERER']));
$blogtime = gmdate('Y-m-d H:i:s', current_time('timestamp'));
if (!empty($referer)) {
if(get_option('blog_charset') == 'iso-8859-1') $referer = utf8_decode($referer);
$referer = "'".$referer."'";
$referer = "'".$referer."'";
} else {
$referer = 'NULL';
}
else {
$referer = 'NULL';
}
$readingnow = wp_title('', false);
if(empty($readingnow)) {
@ -239,9 +275,9 @@ $referer = 'NULL';
} else {
$page = $wp_query->post->ID;
}
$wpdb->query("INSERT INTO $wpdb->statz (ip, time, referer, page, username)
VALUES('$userip', '$blogtime', $referer, $page, '$username')");
$wpdb->query("INSERT INTO $wpdb->statz (ip, time, referer, page, username)
VALUES('$userip', '$blogtime', $referer, $page, '$username')");
if($wpdb->query("SELECT COUNT(hits) FROM $wpdb->posts")) {
$wpdb->query("UPDATE $wpdb->posts SET hits = hits + 1 WHERE ID = $page"); // neu ab 3.2
@ -249,42 +285,71 @@ $wpdb->query("INSERT INTO $wpdb->statz (ip, time, referer, page, username)
}
### Zeitgesteuertes Limitieren der statz-Tabelle
// Wenn semmelKron JA UND statz_next_cron älter JETZT, dann...
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
if($sem_options['statz_do_cron'] == true && $sem_options['statz_next_cron'] < time()) {
add_action('shutdown', 'sem_doCronStatzLimit'); // ...limitiere statz-Tabelle auf vorgegebenen Wert
}
// @todo add action cache
// Wenn semmelKron JA UND statz_next_cron älter JETZT, dann...
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
if($sem_options['statz_do_cron'] == true && $sem_options['statz_next_cron'] < time()) {
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() {
$widgets = get_option( 'dashboard_widget_options' );
$widget_options = get_option( 'dashboard_widget_options' );
echo '<p>';
printf(_n("%d Visitor online", "%d Visitors online", sem_showNumUsersOnline(), "semmelstatzR"), sem_showNumUsersOnline());
printf(semr_i18np("%d Visitor online", "%d Visitors online", sem_showNumUsersOnline()), sem_showNumUsersOnline());
echo ' - ';
printf(__("Today: %s", "semmelstatzR"),sem_showTodayStatz());
echo ' <a title="'.__("more...", "semmelstatzR").'" href="'.get_option('siteurl').'/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-statz.php">&raquo;&raquo;</a>';
printf(semr_i18n("Today: %s"),sem_showTodayStatz());
echo ' <a title="'.semr_i18n("more...").'" href="'.get_option('siteurl')
.'/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>';
}
/**
* dashboard-control for ministatz
*
* @author Ortwin Pinke
* @since semR 1.0
*
* @return void
*/
function sem_dashboardStatz_control() {
if ( !$widget_options = get_option( 'dashboard_widget_options' ) )
if (!$widget_options = get_option('dashboard_widget_options'))
$widget_options = array();
if ( !isset($widget_options['dashboard_sem_dashboardStatz']) )
if (!isset($widget_options['dashboard_sem_dashboardStatz']))
$widget_options['dashboard_sem_dashboardStatz'] = array();
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['dashboard-sem-dashboardStatz']) ) {
if ('POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['dashboard-sem-dashboardStatz'])) {
$number = absint( $_POST['dashboard-sem-dashboardStatz']['items'] );
$number = ($number > 20)?20:$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 );
}
$number = isset( $widget_options['dashboard_sem_dashboardStatz']['items'] ) ? (int) $widget_options['dashboard_sem_dashboardStatz']['items'] : '';
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>';
$number = isset( $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 '<input id="sem-number" name="dashboard-sem-dashboardStatz[items]" type="text" value="'.$number.'" size="3" /></p>';
//print_r($widget_options['dashboard_sem_dashboardStatz']);
}
@ -330,4 +395,4 @@ add_action('wp_dashboard_setup', 'sem_dashboardStatz_setup');
.sprintf(semr_i18np("%d Hit","%d Hits",$hits),$hits)." - "
.sprintf(semr_i18np("%d Referer","%d Referers",$referers),$referers);
}
?>
?>

Datei anzeigen

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