delete: old readme files
update: start with localization and cleanup of code
Dieser Commit ist enthalten in:
Ursprung
7346c0ed11
Commit
a23cd6e222
3 geänderte Dateien mit 43 neuen und 59 gelöschten Zeilen
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
UPDATE auf Version 3.3:
|
|
||||||
|
|
||||||
Es ist zwingend erforderlich, SEMMELSTATZ zu deaktivieren und den alten Ordner
|
|
||||||
SEMMELSTATZ aus dem Plugin-Verzeichnis zu löschen. Ein simples Überschreiben der
|
|
||||||
Plugin-Dateien funktioniert nicht, da sich die Namen der Dateien geändert haben.
|
|
||||||
Außerdem werden diverse Änderungen an den STATZ-Tabellen vorgenommen, die aber nur
|
|
||||||
bei Aktivierung des Plugins abgearbeitet werden.
|
|
||||||
|
|
||||||
Ich bitte um Beachtung...
|
|
|
@ -1,18 +0,0 @@
|
||||||
******************************************************
|
|
||||||
* *
|
|
||||||
* SEMMELSTATZ *
|
|
||||||
* Statistik-Plugin für Wordress >= 2.7.x *
|
|
||||||
* *
|
|
||||||
******************************************************
|
|
||||||
|
|
||||||
Plugin-URL: http://www.kopfhoch-studio.de/blog/2765
|
|
||||||
Autor: Andreas Müller aka Redunzl Semmelmann
|
|
||||||
Copyright (c) 2005-2009 Andreas Müller & kopfhoch-studio Waiblingen, Deutschland
|
|
||||||
|
|
||||||
Die komplette Dokumentation befindet sich im Blog:
|
|
||||||
|
|
||||||
*******************************************
|
|
||||||
* *
|
|
||||||
* http://www.kopfhoch-studio.de/blog/2765 *
|
|
||||||
* *
|
|
||||||
*******************************************
|
|
|
@ -41,7 +41,7 @@ Author URI: http://www.ortwinpinke.de
|
||||||
*/
|
*/
|
||||||
|
|
||||||
### konstante für version
|
### konstante für version
|
||||||
define('SEMMELSTATZ_VERSION', '3.3');
|
define('SEMMELSTATZR_VERSION', '1.0.0 Beta');
|
||||||
|
|
||||||
### Deklaration der Tabellennamen
|
### Deklaration der Tabellennamen
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
@ -52,11 +52,17 @@ Author URI: http://www.ortwinpinke.de
|
||||||
global $homehost;
|
global $homehost;
|
||||||
if(substr($_SERVER['SERVER_NAME'],0,4) == 'www.') {
|
if(substr($_SERVER['SERVER_NAME'],0,4) == 'www.') {
|
||||||
$homehost = '%' . substr($_SERVER['SERVER_NAME'],4) . '%';
|
$homehost = '%' . substr($_SERVER['SERVER_NAME'],4) . '%';
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$homehost = '%' . $_SERVER['SERVER_NAME'] . '%';
|
$homehost = '%' . $_SERVER['SERVER_NAME'] . '%';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
### localization
|
||||||
|
if(!load_plugin_textdomain('semmelstatzR','/wp-content/languages/')) {
|
||||||
|
$plugin_dir = basename(dirname(__FILE__));
|
||||||
|
load_plugin_textdomain('semmelstatzR',null,$plugin_dir.'/locale/');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
### Erstellen des Top-Level-Menus im Adminbereich
|
### Erstellen des Top-Level-Menus im Adminbereich
|
||||||
add_action('admin_menu', 'semmelstatzR_menu');
|
add_action('admin_menu', 'semmelstatzR_menu');
|
||||||
function semmelstatzR_menu() {
|
function semmelstatzR_menu() {
|
||||||
|
@ -197,8 +203,7 @@ add_action('init', 'sem_init_options');
|
||||||
$readingnow = wp_title('', false);
|
$readingnow = wp_title('', false);
|
||||||
if(empty($readingnow)) {
|
if(empty($readingnow)) {
|
||||||
$page = 0;
|
$page = 0;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$page = $wp_query->post->ID;
|
$page = $wp_query->post->ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,8 +230,12 @@ add_action('init', 'sem_init_options');
|
||||||
|
|
||||||
### Rendert eine Mini-STATZ. Idee: René Tauchnitz
|
### Rendert eine Mini-STATZ. Idee: René Tauchnitz
|
||||||
function sem_dashboardStatz() {
|
function sem_dashboardStatz() {
|
||||||
print "<p>".sem_showNumUsersOnline() . " Besucher online - Heute: ".sem_showTodayStatz()."
|
echo '<p>';
|
||||||
<a title='mehr...' href='".get_option('siteurl')."/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-statz.php'>»»</a></p>";
|
printf(_n("%d Visitor online", "%d Visitors online", sem_showNumUsersOnline(), "semmelstatzR"), 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">»»</a>';
|
||||||
|
echo '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
### Widget für die Mini-STATZ
|
### Widget für die Mini-STATZ
|
||||||
|
@ -234,7 +243,7 @@ add_action('init', 'sem_init_options');
|
||||||
function sem_dashboardStatz_setup() {
|
function sem_dashboardStatz_setup() {
|
||||||
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
|
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
|
||||||
if(!current_user_can('manage_statz')) return;
|
if(!current_user_can('manage_statz')) return;
|
||||||
if($sem_options['statz_on_dashboard'] != TRUE) return;
|
if($sem_options['statz_on_dashboard'] != true) return;
|
||||||
wp_add_dashboard_widget( 'sem_dashboardStatz', 'SemmelstatzR', 'sem_dashboardStatz' );
|
wp_add_dashboard_widget( 'sem_dashboardStatz', 'SemmelstatzR', 'sem_dashboardStatz' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,8 +252,9 @@ add_action('init', 'sem_init_options');
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$thedays = $wpdb->get_results("SELECT COUNT(ip) AS hits, COUNT(DISTINCT ip) AS visitors, COUNT(DISTINCT referer)
|
$thedays = $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 time >= CURDATE() GROUP BY date");
|
AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE time >= CURDATE() GROUP BY date");
|
||||||
|
$thedays = array(array('hits' => 33));
|
||||||
if (empty($thedays)) {
|
if (empty($thedays)) {
|
||||||
return "<small>... noch keine Einträge</small>";
|
return "<small>".__("... no entries", "semmelstatzR")."</small>";
|
||||||
}
|
}
|
||||||
foreach($thedays as $key=>$theday) {
|
foreach($thedays as $key=>$theday) {
|
||||||
$date = mysql2date("l",$theday->date);
|
$date = mysql2date("l",$theday->date);
|
||||||
|
@ -252,7 +262,9 @@ add_action('init', 'sem_init_options');
|
||||||
$visitors = $theday->visitors;
|
$visitors = $theday->visitors;
|
||||||
$referers = $theday->referers;
|
$referers = $theday->referers;
|
||||||
}
|
}
|
||||||
return $visitors." Besucher - ".$hits." Hits - ".$referers." Referer";
|
return sprintf(_n("%d Visitor","%d Visitors",$visitors, "semmelstatzR"),$visitors)." - "
|
||||||
|
.sprintf(_n("%d Hit","%d Hits",$hits, "semmelstatzR"),$hits)." - "
|
||||||
|
.sprintf(_n("%d Referrer","%d Referrers",$referer, "semmelstatzR"),$referers);
|
||||||
}
|
}
|
||||||
|
|
||||||
### Encodierung der IP-Adresse durch simple arithmetische Operation
|
### Encodierung der IP-Adresse durch simple arithmetische Operation
|
||||||
|
|
Laden …
In neuem Issue referenzieren