Count per Day - Version 1.2

Version Description

Download this release

Release Info

Developer Tom Braider
Plugin Icon 128x128 Count per Day
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

Files changed (6) hide show
  1. counter-options.php +17 -9
  2. counter.css +1 -3
  3. counter.php +47 -16
  4. locale/de_DE.mo +0 -0
  5. locale/de_DE.po +56 -47
  6. readme.txt +86 -36
counter-options.php CHANGED
@@ -1,7 +1,8 @@
1
  <?php
2
- /*
3
- Count Per Day - Options and Uninstall
4
- */
 
5
 
6
  // Form auswerten
7
  if(!empty($_POST['do']))
@@ -13,6 +14,8 @@ if(!empty($_POST['do']))
13
  update_option( 'cpd_onlinetime', $_POST['cpd_onlinetime'] );
14
  $u = empty( $_POST['cpd_user'] ) ? 0 : 1 ;
15
  update_option( 'cpd_user', $u );
 
 
16
  update_option( 'cpd_bots', $_POST['cpd_bots'] );
17
  echo '<div id="message" class="updated fade"><p>'.__('Options updated', 'cpd').'</p></div>';
18
  break;
@@ -26,11 +29,14 @@ if(!empty($_POST['do']))
26
  delete_option('cpd_codb_version');
27
  delete_option('cpd_onlinetime');
28
  delete_option('cpd_user');
 
29
  delete_option('cpd_bots');
30
- echo '<div id="message" class="updated fade" style="color:green;"><p>';
31
- echo __('Table', 'cpd').' '.CPD_C_TABLE.' '.__('deleted', 'cpd').'<br/>';
32
- echo __('Table', 'cpd').' '.CPD_CO_TABLE.' '.__('deleted', 'cpd').'<br/>';
33
- echo __('Options', 'cpd').' '.__('deleted', 'cpd').'</p></div>';
 
 
34
  $mode = 'end-UNINSTALL';
35
  }
36
  break;
@@ -39,12 +45,11 @@ if(!empty($_POST['do']))
39
  }
40
  }
41
 
42
-
43
  switch($mode) {
44
  // Deaktivierung
45
  case 'end-UNINSTALL':
46
  $deactivate_url = 'plugins.php?action=deactivate&amp;plugin='.dirname(plugin_basename(__FILE__)).'/counter.php';
47
- if(function_exists('wp_nonce_url'))
48
  $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_'.dirname(plugin_basename(__FILE__)).'/counter.php');
49
  echo '<div class="wrap">';
50
  echo '<h2>'.__('Uninstall', 'cpd').' "Count per Day"</h2>';
@@ -65,6 +70,9 @@ switch($mode) {
65
  </tr><tr>
66
  <th nowrap="nowrap" scope="row" style="vertical-align:middle;"><?php _e('Loged on Users', 'cpd') ?>:</th>
67
  <td><input type="checkbox" name="cpd_user" id="cpd_user" <?php if(get_option('cpd_user')==1) echo 'checked="checked"'; ?> /> <label for="cpd_user"><?php _e('count too', 'cpd') ?></label></td>
 
 
 
68
  </tr><tr>
69
  <th nowrap="nowrap" scope="row" style="vertical-align:middle;"><?php _e('Bots to ignore', 'cpd') ?>:</th>
70
  <td><textarea name="cpd_bots" cols="50" rows="10"><?php echo get_option('cpd_bots'); ?></textarea></td>
1
  <?php
2
+ /**
3
+ * Filename: counter-options.php
4
+ * Count Per Day - Options and Uninstall
5
+ */
6
 
7
  // Form auswerten
8
  if(!empty($_POST['do']))
14
  update_option( 'cpd_onlinetime', $_POST['cpd_onlinetime'] );
15
  $u = empty( $_POST['cpd_user'] ) ? 0 : 1 ;
16
  update_option( 'cpd_user', $u );
17
+ $a = empty( $_POST['cpd_autocount'] ) ? 0 : 1 ;
18
+ update_option( 'cpd_autocount', $a );
19
  update_option( 'cpd_bots', $_POST['cpd_bots'] );
20
  echo '<div id="message" class="updated fade"><p>'.__('Options updated', 'cpd').'</p></div>';
21
  break;
29
  delete_option('cpd_codb_version');
30
  delete_option('cpd_onlinetime');
31
  delete_option('cpd_user');
32
+ delete_option('cpd_autocount');
33
  delete_option('cpd_bots');
34
+ echo '<div id="message" class="updated fade"><p>';
35
+ printf(__('Table %s deleted', 'cpd'), CPD_C_TABLE);
36
+ echo '<br/>';
37
+ printf(__('Table %s deleted', 'cpd'), CPD_CO_TABLE);
38
+ echo '<br/>';
39
+ echo __('Options deleted', 'cpd').'</p></div>';
40
  $mode = 'end-UNINSTALL';
41
  }
42
  break;
45
  }
46
  }
47
 
 
48
  switch($mode) {
49
  // Deaktivierung
50
  case 'end-UNINSTALL':
51
  $deactivate_url = 'plugins.php?action=deactivate&amp;plugin='.dirname(plugin_basename(__FILE__)).'/counter.php';
52
+ if ( function_exists('wp_nonce_url') )
53
  $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_'.dirname(plugin_basename(__FILE__)).'/counter.php');
54
  echo '<div class="wrap">';
55
  echo '<h2>'.__('Uninstall', 'cpd').' "Count per Day"</h2>';
70
  </tr><tr>
71
  <th nowrap="nowrap" scope="row" style="vertical-align:middle;"><?php _e('Loged on Users', 'cpd') ?>:</th>
72
  <td><input type="checkbox" name="cpd_user" id="cpd_user" <?php if(get_option('cpd_user')==1) echo 'checked="checked"'; ?> /> <label for="cpd_user"><?php _e('count too', 'cpd') ?></label></td>
73
+ </tr><tr>
74
+ <th nowrap="nowrap" scope="row" style="vertical-align:middle;"><?php _e('Auto counter', 'cpd') ?>:</th>
75
+ <td><input type="checkbox" name="cpd_autocount" id="cpd_autocount" <?php if(get_option('cpd_autocount')==1) echo 'checked="checked"'; ?> /> <label for="cpd_autocount"><?php _e('Counts automatically single-posts and pages, no changes on template needed.', 'cpd') ?></label></td>
76
  </tr><tr>
77
  <th nowrap="nowrap" scope="row" style="vertical-align:middle;"><?php _e('Bots to ignore', 'cpd') ?>:</th>
78
  <td><textarea name="cpd_bots" cols="50" rows="10"><?php echo get_option('cpd_bots'); ?></textarea></td>
counter.css CHANGED
@@ -1,5 +1,5 @@
1
  .cpd_table {
2
- width:100%;
3
  }
4
 
5
  .cpd_table td {
@@ -27,5 +27,3 @@
27
  padding-left: 10px;
28
  list-style: none;
29
  }
30
-
31
-
1
  .cpd_table {
2
+ width: 100%;
3
  }
4
 
5
  .cpd_table td {
27
  padding-left: 10px;
28
  list-style: none;
29
  }
 
 
counter.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: Count Per Day
4
- Plugin URI: http://www.tomsdimension.de/wp-plugins/countperday
5
  Description: Counter, shows reads per page; today, yesterday, last week, last months ... on dashboard.
6
- Version: 1.1
7
  License: GPL
8
  Author: Tom Braider
9
  Author URI: http://www.tomsdimension.de
@@ -29,7 +29,8 @@ function cpdShow( $before='', $after=' reads', $show = true, $count = true )
29
  {
30
  global $wpdb;
31
  $page = get_the_ID();
32
- if ( $count == true )
 
33
  cpdCount();
34
  $visits = $wpdb->get_results("SELECT page FROM ".CPD_C_TABLE." WHERE page='$page';");
35
  $visits_per_page = count($visits);
@@ -39,14 +40,21 @@ function cpdShow( $before='', $after=' reads', $show = true, $count = true )
39
  return $visits_per_page;
40
  }
41
 
42
- // Seitenaufruf nur z�hlen, keine Anzeige
 
 
43
  function cpdCount()
44
  {
45
  global $wpdb;
46
- cpdCreateTables();
47
- if ( function_exists('get_the_ID') )
 
 
 
48
  $page = get_the_ID();
49
-
 
 
50
  $countUser = ( get_option('cpd_user') == 0 && is_user_logged_in() == true ) ? 0 : 1;
51
 
52
  // nur z�hlen wenn: kein Bot, PostID vorhanden, Anmeldung passt
@@ -70,7 +78,9 @@ function cpdCount()
70
  }
71
  }
72
 
73
- // Bot oder Mensch?
 
 
74
  function cpdIsBot()
75
  {
76
  // Strings die auf Suchmaschinen deuten
@@ -84,7 +94,9 @@ function cpdIsBot()
84
  return $isBot;
85
  }
86
 
87
- // Tabellen erstellen wenn nicht vorhanden
 
 
88
  function cpdCreateTables() {
89
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
90
  global $wpdb;
@@ -119,11 +131,14 @@ function cpdCreateTables() {
119
 
120
  add_option( 'cpd_onlinetime', 300 );
121
  add_option( 'cpd_user', 0 );
 
122
  add_option( 'cpd_bots', "bot\nspider\nsearch\ncrawler\nask.com\nvalidator\nsnoopy\n".
123
  "suchen.de\nsuchbaer.de\nshelob\nsemager\nxenu\nsuch_de\nia_archiver\nMicrosoft URL Control\nnetluchs" );
124
  }
125
 
126
- // Statistikseite
 
 
127
  function cpdDashbord()
128
  {
129
  ?>
@@ -146,7 +161,7 @@ function cpdDashbord()
146
  </div>
147
  </td>
148
  <td>
149
- <div><h3><?php _e('Reads per Month', 'cpd') ?></h3><?php cpdGetUserPerMonth(); ?></div>
150
  </td>
151
  <td>
152
  <div><h3><?php _e('Reads per post', 'cpd') ?></h3><?php cpdGetUserPerPost(50); ?></div>
@@ -287,6 +302,8 @@ function cpdGetUserPerDay()
287
  echo number_format($count, 0);
288
  }
289
 
 
 
290
  /**
291
  * f�gt Stylesheet in WP-Head ein
292
  *
@@ -308,7 +325,6 @@ function cpdMenu($content)
308
  }
309
  }
310
 
311
-
312
  /**
313
  * l�dt lokale Sprachdatei
314
  */
@@ -320,12 +336,27 @@ function cpd_init_locale()
320
  load_plugin_textdomain('cpd', dirname(__FILE__));
321
  }
322
 
323
- //if (eregi("phpmyadmin",$_REQUEST['page'])) {
324
- //add_action('admin_head', 'silpstream_wp_phpmyadmin_add_style');
325
- //}
 
 
 
 
 
 
326
 
 
327
  add_action('init', 'cpd_init_locale', 98);
328
- add_action( 'admin_head', 'cpdAddCSS', 1000 );
329
  add_action('admin_menu', 'cpdMenu');
330
  register_activation_hook(__FILE__,'cpdCreateTables');
 
 
 
 
 
 
 
 
 
331
  ?>
1
  <?php
2
  /*
3
  Plugin Name: Count Per Day
4
+ Plugin URI: http://www.tomsdimension.de/wp-plugins/count-per-day
5
  Description: Counter, shows reads per page; today, yesterday, last week, last months ... on dashboard.
6
+ Version: 1.2
7
  License: GPL
8
  Author: Tom Braider
9
  Author URI: http://www.tomsdimension.de
29
  {
30
  global $wpdb;
31
  $page = get_the_ID();
32
+ // nur z�hlen wenn Parameter stimmt und Autocounter aus ist (doppelt muss nicht sein)
33
+ if ( $count == true && get_option('cpd_autocount') == 0 )
34
  cpdCount();
35
  $visits = $wpdb->get_results("SELECT page FROM ".CPD_C_TABLE." WHERE page='$page';");
36
  $visits_per_page = count($visits);
40
  return $visits_per_page;
41
  }
42
 
43
+ /**
44
+ * Seitenaufruf nur z�hlen, keine Anzeige
45
+ */
46
  function cpdCount()
47
  {
48
  global $wpdb;
49
+ cpdCreateTables(); // DB-Tabellen erstellen, falls sie noch nicht existieren
50
+
51
+ $page = 0;
52
+ // Post-ID finden
53
+ if (have_posts()) : while (have_posts()) : the_post();
54
  $page = get_the_ID();
55
+ break;
56
+ endwhile; endif;
57
+
58
  $countUser = ( get_option('cpd_user') == 0 && is_user_logged_in() == true ) ? 0 : 1;
59
 
60
  // nur z�hlen wenn: kein Bot, PostID vorhanden, Anmeldung passt
78
  }
79
  }
80
 
81
+ /**
82
+ * Bot oder Mensch?
83
+ */
84
  function cpdIsBot()
85
  {
86
  // Strings die auf Suchmaschinen deuten
94
  return $isBot;
95
  }
96
 
97
+ /**
98
+ * Tabellen erstellen wenn nicht vorhanden
99
+ */
100
  function cpdCreateTables() {
101
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
102
  global $wpdb;
131
 
132
  add_option( 'cpd_onlinetime', 300 );
133
  add_option( 'cpd_user', 0 );
134
+ add_option( 'cpd_autocount', 0 );
135
  add_option( 'cpd_bots', "bot\nspider\nsearch\ncrawler\nask.com\nvalidator\nsnoopy\n".
136
  "suchen.de\nsuchbaer.de\nshelob\nsemager\nxenu\nsuch_de\nia_archiver\nMicrosoft URL Control\nnetluchs" );
137
  }
138
 
139
+ /**
140
+ * Statistikseite
141
+ */
142
  function cpdDashbord()
143
  {
144
  ?>
161
  </div>
162
  </td>
163
  <td>
164
+ <div><h3><?php _e('Reads per month', 'cpd') ?></h3><?php cpdGetUserPerMonth(); ?></div>
165
  </td>
166
  <td>
167
  <div><h3><?php _e('Reads per post', 'cpd') ?></h3><?php cpdGetUserPerPost(50); ?></div>
302
  echo number_format($count, 0);
303
  }
304
 
305
+
306
+
307
  /**
308
  * f�gt Stylesheet in WP-Head ein
309
  *
325
  }
326
  }
327
 
 
328
  /**
329
  * l�dt lokale Sprachdatei
330
  */
336
  load_plugin_textdomain('cpd', dirname(__FILE__));
337
  }
338
 
339
+ /**
340
+ * l�dt automatischen Counter
341
+ * Zum reinen Z�hlen ist kein Eingriff ins Template mehr notwendig.
342
+ */
343
+ function cpd_autocount( )
344
+ {
345
+ if ( is_single() || is_page() )
346
+ cpdCount();
347
+ }
348
 
349
+ // Funktionen adden
350
  add_action('init', 'cpd_init_locale', 98);
 
351
  add_action('admin_menu', 'cpdMenu');
352
  register_activation_hook(__FILE__,'cpdCreateTables');
353
+
354
+ // Stylesheet nur bei Statistik-Seite laden
355
+ if ( eregi( "count-per-day", $_REQUEST['page']) )
356
+ add_action( 'admin_head', 'cpdAddCSS', 100 );
357
+
358
+ // Autocounter laden, wenn in Optionen angegeben
359
+ if ( get_option('cpd_autocount') == 1 )
360
+ add_action('wp', 'cpd_autocount');
361
+
362
  ?>
locale/de_DE.mo CHANGED
Binary file
locale/de_DE.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Count per Day\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2008-05-24 13:37+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Tom Braider <post@tomsdimension.de>\n"
8
  "Language-Team: \n"
@@ -15,134 +15,143 @@ msgstr ""
15
  "X-Poedit-Basepath: P:\\xampp\\htdocs\\td\\wp\\wp-content\\plugins\\\n"
16
  "X-Poedit-SearchPath-0: count-per-day\n"
17
 
18
- #: count-per-day/counter-options.php:17
19
  msgid "Options updated"
20
  msgstr "Einstellungen aktualisiert"
21
 
22
- #: count-per-day/counter-options.php:20
23
- #: count-per-day/counter-options.php:98
24
  msgid "UNINSTALL Count per Day"
25
  msgstr "DEINSTALLIERE Count per Day"
26
 
27
- #: count-per-day/counter-options.php:31
28
- #: count-per-day/counter-options.php:32
29
- msgid "Table"
30
- msgstr "Tabelle"
 
31
 
32
- #: count-per-day/counter-options.php:31
33
- #: count-per-day/counter-options.php:32
34
- #: count-per-day/counter-options.php:33
35
- msgid "deleted"
36
- msgstr "gelöscht"
37
 
38
- #: count-per-day/counter-options.php:33
39
- #: count-per-day/counter-options.php:58
40
- msgid "Options"
41
- msgstr "Einstellungen"
42
-
43
- #: count-per-day/counter-options.php:50
44
- #: count-per-day/counter-options.php:84
45
  msgid "Uninstall"
46
  msgstr "Deinstallation"
47
 
48
- #: count-per-day/counter-options.php:51
49
  msgid "Click here"
50
  msgstr "Klick hier"
51
 
52
- #: count-per-day/counter-options.php:51
53
  msgid "to finish the uninstall and to deactivate \"Count per Day\"."
54
  msgstr "um die Deinstallation zu beenden und \"Count per Day\" zu deaktivieren."
55
 
56
- #: count-per-day/counter-options.php:63
 
 
 
 
57
  msgid "Online time"
58
  msgstr "Onlinezeit"
59
 
60
- #: count-per-day/counter-options.php:64
61
  msgid "Seconds for online counter"
62
  msgstr "Sekunden für Onlinecounter"
63
 
64
- #: count-per-day/counter-options.php:66
65
  msgid "Loged on Users"
66
  msgstr "Angemeldete Benutzer"
67
 
68
- #: count-per-day/counter-options.php:67
69
  msgid "count too"
70
  msgstr "auch mit zählen"
71
 
72
- #: count-per-day/counter-options.php:69
 
 
 
 
 
 
 
 
73
  msgid "Bots to ignore"
74
  msgstr "Bots ignorieren"
75
 
76
- #: count-per-day/counter-options.php:75
77
  msgid "Update options"
78
  msgstr "Einstellungen aktualisieren"
79
 
80
- #: count-per-day/counter-options.php:86
81
  msgid "If \"Count per Day\" only disabled the tables in the database will be preserved."
82
  msgstr "Wenn \"Count per Day\" nur deaktiviert wird, bleiben die Tabellen in der Datenbank erhalten."
83
 
84
- #: count-per-day/counter-options.php:87
85
  msgid "Here you can delete the tables and disable \"Count per Day\"."
86
  msgstr "Hier kannst du \"Count per Day\" deinstallieren und die Tabellen löschen."
87
 
88
- #: count-per-day/counter-options.php:90
89
  msgid "WARNING"
90
  msgstr "WARNUNG"
91
 
92
- #: count-per-day/counter-options.php:91
93
  msgid "These tables (with ALL counter data) will be deleted."
94
  msgstr "Diese Tabellen werden mit ALLEN Zählerdaten gelöscht."
95
 
96
- #: count-per-day/counter-options.php:93
97
  msgid "If \"Count per Day\" re-installed, the counter starts at 0."
98
  msgstr "Wenn \"Count per Day\" erneut installiert wird, beginnt der Zähler bei 0."
99
 
100
- #: count-per-day/counter-options.php:97
101
  msgid "Yes"
102
  msgstr "Ja, los!"
103
 
104
- #: count-per-day/counter-options.php:98
105
  msgid "You are sure to disable Count per Day and delete all data?"
106
  msgstr "Bist du sicher, dass du Count per Day deaktivieren und alle Daten löschen willst?"
107
 
108
- #: count-per-day/counter.php:157
109
  msgid "Statistics"
110
  msgstr "Statistiken"
111
 
112
- #: count-per-day/counter.php:162
113
- #: count-per-day/counter.php:164
114
  msgid "Reads at all"
115
  msgstr "Besucher gesamt"
116
 
117
- #: count-per-day/counter.php:165
118
  msgid "Reads currently online"
119
  msgstr "Besucher momentan online"
120
 
121
- #: count-per-day/counter.php:166
122
  msgid "Reads today"
123
  msgstr "Besucher heute"
124
 
125
- #: count-per-day/counter.php:167
126
  msgid "Reads yesterday"
127
  msgstr "Besucher gestern"
128
 
129
- #: count-per-day/counter.php:168
130
  msgid "Reads last week"
131
  msgstr "Besucher letzte Woche"
132
 
133
- #: count-per-day/counter.php:169
134
  msgid "Counter starts at"
135
  msgstr "gezählt ab"
136
 
137
- #: count-per-day/counter.php:170
138
  msgid "Reads per day"
139
  msgstr "Besucher pro Tag"
140
 
141
- #: count-per-day/counter.php:175
142
- msgid "Reads per Month"
143
  msgstr "Besucher pro Monat"
144
 
145
- #: count-per-day/counter.php:178
146
  msgid "Reads per post"
147
  msgstr "Besucher pro Artikel"
148
 
 
 
 
2
  msgstr ""
3
  "Project-Id-Version: Count per Day\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-05-29 20:03+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Tom Braider <post@tomsdimension.de>\n"
8
  "Language-Team: \n"
15
  "X-Poedit-Basepath: P:\\xampp\\htdocs\\td\\wp\\wp-content\\plugins\\\n"
16
  "X-Poedit-SearchPath-0: count-per-day\n"
17
 
18
+ #: count-per-day/counter-options.php:19
19
  msgid "Options updated"
20
  msgstr "Einstellungen aktualisiert"
21
 
22
+ #: count-per-day/counter-options.php:22
23
+ #: count-per-day/counter-options.php:105
24
  msgid "UNINSTALL Count per Day"
25
  msgstr "DEINSTALLIERE Count per Day"
26
 
27
+ #: count-per-day/counter-options.php:34
28
+ #: count-per-day/counter-options.php:36
29
+ #, php-format
30
+ msgid "Table %s deleted"
31
+ msgstr "Tabelle %s gelöscht"
32
 
33
+ #: count-per-day/counter-options.php:38
34
+ msgid "Options deleted"
35
+ msgstr "Einstellungen gelöscht"
 
 
36
 
37
+ #: count-per-day/counter-options.php:54
38
+ #: count-per-day/counter-options.php:91
 
 
 
 
 
39
  msgid "Uninstall"
40
  msgstr "Deinstallation"
41
 
42
+ #: count-per-day/counter-options.php:55
43
  msgid "Click here"
44
  msgstr "Klick hier"
45
 
46
+ #: count-per-day/counter-options.php:55
47
  msgid "to finish the uninstall and to deactivate \"Count per Day\"."
48
  msgstr "um die Deinstallation zu beenden und \"Count per Day\" zu deaktivieren."
49
 
50
+ #: count-per-day/counter-options.php:62
51
+ msgid "Options"
52
+ msgstr "Einstellungen"
53
+
54
+ #: count-per-day/counter-options.php:67
55
  msgid "Online time"
56
  msgstr "Onlinezeit"
57
 
58
+ #: count-per-day/counter-options.php:68
59
  msgid "Seconds for online counter"
60
  msgstr "Sekunden für Onlinecounter"
61
 
62
+ #: count-per-day/counter-options.php:70
63
  msgid "Loged on Users"
64
  msgstr "Angemeldete Benutzer"
65
 
66
+ #: count-per-day/counter-options.php:71
67
  msgid "count too"
68
  msgstr "auch mit zählen"
69
 
70
+ #: count-per-day/counter-options.php:73
71
+ msgid "Auto counter"
72
+ msgstr "Auto-Counter"
73
+
74
+ #: count-per-day/counter-options.php:74
75
+ msgid "Counts automatically single-posts and pages, no changes on template needed."
76
+ msgstr "Zählt automatisch Besuche auf Single-Posts und Seiten ohne Änderungen am Template."
77
+
78
+ #: count-per-day/counter-options.php:76
79
  msgid "Bots to ignore"
80
  msgstr "Bots ignorieren"
81
 
82
+ #: count-per-day/counter-options.php:82
83
  msgid "Update options"
84
  msgstr "Einstellungen aktualisieren"
85
 
86
+ #: count-per-day/counter-options.php:93
87
  msgid "If \"Count per Day\" only disabled the tables in the database will be preserved."
88
  msgstr "Wenn \"Count per Day\" nur deaktiviert wird, bleiben die Tabellen in der Datenbank erhalten."
89
 
90
+ #: count-per-day/counter-options.php:94
91
  msgid "Here you can delete the tables and disable \"Count per Day\"."
92
  msgstr "Hier kannst du \"Count per Day\" deinstallieren und die Tabellen löschen."
93
 
94
+ #: count-per-day/counter-options.php:97
95
  msgid "WARNING"
96
  msgstr "WARNUNG"
97
 
98
+ #: count-per-day/counter-options.php:98
99
  msgid "These tables (with ALL counter data) will be deleted."
100
  msgstr "Diese Tabellen werden mit ALLEN Zählerdaten gelöscht."
101
 
102
+ #: count-per-day/counter-options.php:100
103
  msgid "If \"Count per Day\" re-installed, the counter starts at 0."
104
  msgstr "Wenn \"Count per Day\" erneut installiert wird, beginnt der Zähler bei 0."
105
 
106
+ #: count-per-day/counter-options.php:104
107
  msgid "Yes"
108
  msgstr "Ja, los!"
109
 
110
+ #: count-per-day/counter-options.php:105
111
  msgid "You are sure to disable Count per Day and delete all data?"
112
  msgstr "Bist du sicher, dass du Count per Day deaktivieren und alle Daten löschen willst?"
113
 
114
+ #: count-per-day/counter.php:137
115
  msgid "Statistics"
116
  msgstr "Statistiken"
117
 
118
+ #: count-per-day/counter.php:142
119
+ #: count-per-day/counter.php:144
120
  msgid "Reads at all"
121
  msgstr "Besucher gesamt"
122
 
123
+ #: count-per-day/counter.php:145
124
  msgid "Reads currently online"
125
  msgstr "Besucher momentan online"
126
 
127
+ #: count-per-day/counter.php:146
128
  msgid "Reads today"
129
  msgstr "Besucher heute"
130
 
131
+ #: count-per-day/counter.php:147
132
  msgid "Reads yesterday"
133
  msgstr "Besucher gestern"
134
 
135
+ #: count-per-day/counter.php:148
136
  msgid "Reads last week"
137
  msgstr "Besucher letzte Woche"
138
 
139
+ #: count-per-day/counter.php:149
140
  msgid "Counter starts at"
141
  msgstr "gezählt ab"
142
 
143
+ #: count-per-day/counter.php:150
144
  msgid "Reads per day"
145
  msgstr "Besucher pro Tag"
146
 
147
+ #: count-per-day/counter.php:155
148
+ msgid "Reads per month"
149
  msgstr "Besucher pro Monat"
150
 
151
+ #: count-per-day/counter.php:158
152
  msgid "Reads per post"
153
  msgstr "Besucher pro Artikel"
154
 
155
+ #~ msgid "Table"
156
+ #~ msgstr "Tabelle"
157
+
readme.txt CHANGED
@@ -4,13 +4,16 @@ Donate link: http://www.unicef.org
4
  Tags: counter, count, posts, visits, reads
5
  Requires at least: 2.0
6
  Tested up to: 2.5.1
7
- Stable tag: 1.1
8
 
9
- Visit Counter, shows reads per page; today, yesterday, last week, last months and other statistics on dashboard.
10
 
11
  == Description ==
12
 
13
- Visit Counter, shows reads per page; today, yesterday, last week, last months and other statistics on dashboard.
 
 
 
14
 
15
  It counts 1 visit per IP per day. So any reload of the page don't increment the counter.
16
 
@@ -20,26 +23,18 @@ Languages: english, german
20
 
21
  1. unzip plugin directory into the "/wp-content/plugins/" directory
22
  1. activate the plugin through the 'Plugins' menu in WordPress
23
- 1. place "cpdShow()" within post-loop (e.g. in single.php)<br>
24
- &lt;?php if(function_exists('cpdShow')) { cpdShow(); } ?&gt;
25
 
26
  First activation will create the 2 tables wp _ cpd _ counter and wp _ cpd _ counter _ useronline.
27
 
28
  **Configuration**
29
 
30
- see Options Page :)
31
-
32
- Function parameters:
33
-
34
- cpdShow( $before, $after, $show )
35
-
36
- * $before = text before number e.g. "&lt;p&gt;"
37
- * $after = text after number e.g. " reads&lt;/p&gt;"
38
- * $show = true/false, "echo" complete string (standard) or "return" number only
39
 
40
- cpdCount()
41
 
42
- * only count reads, without output
 
 
43
 
44
  == Frequently Asked Questions ==
45
 
@@ -54,6 +49,58 @@ no answers
54
 
55
  == Arbitrary section ==
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  **Filelist**
58
 
59
  * counter.php
@@ -62,32 +109,35 @@ no answers
62
  * locale/de_DE.mo
63
  * locale/de_DE.po
64
 
65
- **Changelog (german)**
 
 
 
 
 
66
 
67
  _Version 1.1_
68
 
69
- + Sprachen englisch, deutsch
70
- + HTTP _ USER _ AGENT wird mit gespeichert. Kann zur Identifikation von Suchmaschinen genutzt werden.
71
- + Stylesheet f&uuml;r Admin-Bereich in eigene Datei ausgelagert
72
- + Search-Bots erweitert, wir wollen ja nur echte Leser z&auml;hlen
73
 
74
- Funktionen:
75
 
76
- + cpdShow( $before='', $after=' reads', $show = true, $count = true ) - neuer Parameter $count: false = nicht z&auml;hlen, nur anzeigen
77
- + cpdGetUserPerPost( $limit = 0 ) - Besucher pro Post, Limit = Maximale Anzahl
78
- + cpdGetFirstCount() - Z&auml;hlerstart, erster Besucher-Eintrag
79
- + cpdGetUserPerDay() - Durchschnittliche Besucher pro Tag seit Z&auml;hlerstart
80
- + cpdGetUserAll() - Gesamtzahl Besucher
81
 
82
  _Version 1.0_
83
 
84
- Funktionen:
85
 
86
- + cpdShow( $before='', $after=' reads', $show = true ) - z&auml;hlt Besucher und zeigt Z&auml;hlerstand an
87
- + cpdCount() - z&auml;hlt Besucher, zeigt aber nichts an
88
- + cpdIsBot() - checkt HTTP_USER_AGENT mit angegebenen "Bot-Strings", TRUE wenn Bot
89
- + cpdGetUserOnline() - zeigt Online-Besucher
90
- + cpdGetUserToday() - zeigt heutige Besucher
91
- + cpdGetUserYesterday() - zeigt gestrige Besucher
92
- + cpdGetUserLastWeek() - zeigt Besucher der letzten Woche, 7 Tage
93
- + cpdGetUserPerMonth() - zeigt Besucher pro Monat
4
  Tags: counter, count, posts, visits, reads
5
  Requires at least: 2.0
6
  Tested up to: 2.5.1
7
+ Stable tag: 1.2
8
 
9
+ Visit Counter, shows reads per page, visitors today, yesterday, last week, last months and other statistics.
10
 
11
  == Description ==
12
 
13
+ * count reads and visitors
14
+ * shows reads per page
15
+ * shows visitors today, yesterday, last week, last months and other statistics on dashboard
16
+ * you can show these statistics on frontend (e.g. on sidebar) too
17
 
18
  It counts 1 visit per IP per day. So any reload of the page don't increment the counter.
19
 
23
 
24
  1. unzip plugin directory into the "/wp-content/plugins/" directory
25
  1. activate the plugin through the 'Plugins' menu in WordPress
 
 
26
 
27
  First activation will create the 2 tables wp _ cpd _ counter and wp _ cpd _ counter _ useronline.
28
 
29
  **Configuration**
30
 
31
+ go to Options Page :)
 
 
 
 
 
 
 
 
32
 
33
+ If "Auto counter" is on reads on single-posts and pages will count without any changes on template.<br>
34
 
35
+ * place functions within post-loop (e.g. in single.php)<br>
36
+ &lt;?php if(function_exists('cpdShow')) { cpdShow(); } ?&gt;
37
+ * for more informations see "Other Notes"
38
 
39
  == Frequently Asked Questions ==
40
 
49
 
50
  == Arbitrary section ==
51
 
52
+ **Functions**
53
+
54
+ You can place these functions in your template.
55
+
56
+ _cpdShow( $before, $after, $show, $count )_
57
+
58
+ * $before = text before number e.g. "&lt;p&gt;" (standard '')
59
+ * $after = text after number e.g. " reads&lt;/p&gt;" (standard ' reads')
60
+ * $show = true/false, "echo" complete string or "return" number only (standard true)
61
+ * $count = true/false, false will not count the reads (standard true)
62
+
63
+ _cpdCount()_
64
+
65
+ * only count reads, without any output
66
+ * cpdShow call it
67
+
68
+ _cpdGetFirstCount()_
69
+
70
+ * shows date of first count
71
+
72
+ _cpdGetUserPerDay()_
73
+
74
+ * shows average number of visitors per day
75
+
76
+ _cpdGetUserAll()_
77
+
78
+ * shows number of total visitors
79
+
80
+ _cpdGetUserOnline()_
81
+
82
+ * shows number of visitors just online
83
+
84
+ _cpdGetUserToday()_
85
+
86
+ * shows number of visitors today
87
+
88
+ _cpdGetUserYesterday()_
89
+
90
+ * shows number of visitors yesterday
91
+
92
+ _cpdGetUserLastWeek()_
93
+
94
+ * shows number of visitors last week (7 days)
95
+
96
+ _cpdGetUserPerMonth()_
97
+
98
+ * lists number of visitors per month
99
+
100
+ _cpdGetUserPerPost( $limit = 0 )_
101
+
102
+ * lists _$limit_ posts with number of visits
103
+
104
  **Filelist**
105
 
106
  * counter.php
109
  * locale/de_DE.mo
110
  * locale/de_DE.po
111
 
112
+ **Changelog**
113
+
114
+ _Version 1.2_
115
+
116
+ + Bugfix: tables in DB were not be created every time (seen on mysql < 5)
117
+ + New: "auto count" can count visits without changes on template
118
 
119
  _Version 1.1_
120
 
121
+ + Languages: english, german
122
+ + HTTP _ USER _ AGENT will be saved, identification of new search bots
123
+ + Stylesheet in file counter.css
 
124
 
125
+ Functions:
126
 
127
+ + cpdShow (updated)
128
+ + cpdGetUserPerPost
129
+ + cpdGetFirstCount
130
+ + cpdGetUserPerDay
131
+ + cpdGetUserAll
132
 
133
  _Version 1.0_
134
 
135
+ Functions:
136
 
137
+ + cpdShow
138
+ + cpdCount
139
+ + cpdGetUserOnline
140
+ + cpdGetUserToday
141
+ + cpdGetUserYesterday
142
+ + cpdGetUserLastWeek
143
+ + cpdGetUserPerMonth