WP-Matomo (WP-Piwik) - Version 0.5.0

Version Description

  • Display statistics to selected user roles
    • Some HTML fixes (settings page)
Download this release

Release Info

Developer Braekling
Plugin Icon 128x128 WP-Matomo (WP-Piwik)
Version 0.5.0
Comparing to
See all releases

Code changes from version 0.4.0 to 0.5.0

css/wp-piwik.css CHANGED
File without changes
dashboard/.htaccess CHANGED
File without changes
dashboard/browsers.php CHANGED
File without changes
dashboard/footer.php CHANGED
File without changes
dashboard/header.php CHANGED
File without changes
dashboard/keywords.php CHANGED
File without changes
dashboard/overview.php CHANGED
File without changes
dashboard/plugins.php CHANGED
File without changes
dashboard/screens.php CHANGED
File without changes
dashboard/systems.php CHANGED
File without changes
dashboard/visitors.php CHANGED
File without changes
dashboard/websites.php CHANGED
File without changes
gpl-3.0.html CHANGED
File without changes
js/wp-piwik.js CHANGED
File without changes
languages/wp-piwik-de_DE.mo CHANGED
Binary file
languages/wp-piwik-de_DE.po CHANGED
@@ -169,6 +169,15 @@ msgstr "W&auml;hle Nutzer anhand ihrer Nutzerrolle, die <strong>nicht</strong> e
169
  "werden sollen. Die Funktion &quot;Skript zu wp_footer() hinzuf&uuml;gen&quot; muss "
170
  "dazu verwendet werden."
171
 
 
 
 
 
 
 
 
 
 
172
  #: wp-piwik.php:229
173
  msgid "Save settings"
174
  msgstr "Einstellungen speichern"
169
  "werden sollen. Die Funktion &quot;Skript zu wp_footer() hinzuf&uuml;gen&quot; muss "
170
  "dazu verwendet werden."
171
 
172
+ msgid "Display statistics to"
173
+ msgstr "Statistiken sichtbar f&uuml;r"
174
+
175
+ msgid "or above"
176
+ msgstr "oder h&ouml;her"
177
+
178
+ msgid "Minimum user level required to display statistics page."
179
+ msgstr "Mindestens ben&ouml;tigter User Level, um die Statistiken einzusehen."
180
+
181
  #: wp-piwik.php:229
182
  msgid "Save settings"
183
  msgstr "Einstellungen speichern"
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === WP-Piwik ===
2
  Contributors: braekling
3
  Requires at least: 2.7
4
- Tested up to: 2.8
5
- Stable tag: 0.4.0
6
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
7
  Tags: statistics, stats, analytics, piwik
8
 
@@ -11,7 +11,7 @@ This plugin adds a piwik stats site to your WordPress dashboard.
11
  == Description ==
12
  This plugin adds a Piwik stats site to your WordPress dashboard. It's also able to add the Piwik tracking code to your blog using wp_footer.
13
 
14
- You need a running Piwik installation and at least view access to your stats. Also PHP 5 or higher is strictly required.
15
 
16
  Look at the [Piwik website](http://piwik.org/) to get further information about Piwik.
17
 
@@ -35,26 +35,30 @@ Languages: English, German
35
 
36
  == Changelog ==
37
 
 
 
 
 
38
  = 0.4.0 =
39
- * Tracking filter added
40
- * Resolution stats
41
- * Operating System stats
42
- * Plugin stats
43
 
44
  = 0.3.2 =
45
- * If allow_url_fopen is disabled in php.ini, WP-Piwik tries to use CURL instead of file_get_contents.
46
 
47
  = 0.3.1 =
48
- * WordPress 2.8 compatible
49
- * Bugfix: Warnings on WP 2.8 plugins site
50
- * Dashboard revised
51
- * Partly optimized code
52
 
53
  = 0.3.0 =
54
- * WP-Piwik dashboard widgetized.
55
- * Stats-boxes sortable and closeable.
56
- * German language file added
57
- * Browser stats and bounced visitors
58
 
59
  = 0.2.0 =
60
- * First public version.
1
  === WP-Piwik ===
2
  Contributors: braekling
3
  Requires at least: 2.7
4
+ Tested up to: 2.8.4
5
+ Stable tag: 0.5.0
6
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
7
  Tags: statistics, stats, analytics, piwik
8
 
11
  == Description ==
12
  This plugin adds a Piwik stats site to your WordPress dashboard. It's also able to add the Piwik tracking code to your blog using wp_footer.
13
 
14
+ You need a running Piwik installation and at least view access to your stats.
15
 
16
  Look at the [Piwik website](http://piwik.org/) to get further information about Piwik.
17
 
35
 
36
  == Changelog ==
37
 
38
+ = 0.5.0 =
39
+ * Display statistics to selected user roles
40
+ * Some HTML fixes (settings page)
41
+
42
  = 0.4.0 =
43
+ * Tracking filter added
44
+ * Resolution stats
45
+ * Operating System stats
46
+ * Plugin stats
47
 
48
  = 0.3.2 =
49
+ * If allow_url_fopen is disabled in php.ini, WP-Piwik tries to use CURL instead of file_get_contents.
50
 
51
  = 0.3.1 =
52
+ * WordPress 2.8 compatible
53
+ * Bugfix: Warnings on WP 2.8 plugins site
54
+ * Dashboard revised
55
+ * Partly optimized code
56
 
57
  = 0.3.0 =
58
+ * WP-Piwik dashboard widgetized.
59
+ * Stats-boxes sortable and closeable.
60
+ * German language file added
61
+ * Browser stats and bounced visitors
62
 
63
  = 0.2.0 =
64
+ * First public version.
screenshot-1.gif CHANGED
File without changes
screenshot-2.gif CHANGED
File without changes
wp-piwik.php CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://dev.braekling.de/wordpress-plugins/dev/wp-piwik/index.html
6
 
7
  Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
8
 
9
- Version: 0.4.0
10
  Author: Andr&eacute; Br&auml;kling
11
  Author URI: http://www.braekling.de
12
 
@@ -29,7 +29,7 @@ Author URI: http://www.braekling.de
29
 
30
  class wp_piwik {
31
 
32
- public static $intRevisionId = 10;
33
  public static $intDashboardID = 5;
34
 
35
  function __construct() {
@@ -65,16 +65,18 @@ class wp_piwik {
65
  }
66
 
67
  function build_menu() {
 
68
  $intStatsPage = add_dashboard_page(
69
  __('Piwik Statistics', 'wp-piwik'),
70
  __('WP-Piwik', 'wp-piwik'),
71
- 8,
72
  __FILE__,
73
  array($this, 'show_stats')
74
  );
75
  add_action('admin_print_scripts-'.$intStatsPage, array($this, 'load_scripts'));
76
  add_action('admin_head-'.$intStatsPage, array($this, 'add_admin_header'));
77
-
 
78
  add_options_page(
79
  __('WP-Piwik', 'wp-piwik'),
80
  __('WP-Piwik', 'wp-piwik'),
@@ -168,6 +170,16 @@ class wp_piwik {
168
  include($strRoot.DIRECTORY_SEPARATOR.'dashboard/'.$strFile.'.php');
169
  }
170
 
 
 
 
 
 
 
 
 
 
 
171
  function show_stats() {
172
  $arySortOrder = get_user_option('meta-box-order_wppiwik');
173
  $aryClosed = get_user_option('closedpostboxes_wppiwik');
@@ -302,7 +314,7 @@ class wp_piwik {
302
  ($strJavaScript).'</textarea></td></tr>';
303
  echo '<tr><td>'.__('Add script to wp_footer()', 'wp-piwik').
304
  ':</td><td><input type="checkbox" value="1" name="wp-piwik_addjs" '.
305
- ($intAddJS?' checked':'').'/></td></tr>';
306
  echo '<tr><td></td><td><span class="setting-description">'.
307
  __('If your template uses wp_footer(), WP-Piwik can automatically'.
308
  ' add the Piwik javascript code to your blog.', 'wp-piwik').
@@ -318,13 +330,23 @@ class wp_piwik {
318
  __('Choose users by user role you do <strong>not</strong> want to track.'.
319
  ' Requires enabled &quot;Add script to wp_footer()&quot;-functionality.', 'wp-piwik').
320
  '</span></td></tr>';
321
-
 
 
 
 
 
 
 
 
 
 
322
  }
323
  }
324
  /***************************************************************************/ ?>
325
  </table>
326
  <input type="hidden" name="action" value="update" />
327
- <input type="hidden" name="page_options" value="wp-piwik_token,wp-piwik_url,wp-piwik_siteid,wp-piwik_addjs,wp-piwik_filter" />
328
  <p class="submit">
329
  <input type="submit" name="Submit" value="<?php _e('Save settings', 'wp-piwik') ?>" />
330
  </p>
6
 
7
  Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
8
 
9
+ Version: 0.5.0
10
  Author: Andr&eacute; Br&auml;kling
11
  Author URI: http://www.braekling.de
12
 
29
 
30
  class wp_piwik {
31
 
32
+ public static $intRevisionId = 11;
33
  public static $intDashboardID = 5;
34
 
35
  function __construct() {
65
  }
66
 
67
  function build_menu() {
68
+ $intDisplayTo = get_option('wp-piwik_displayto', 8);
69
  $intStatsPage = add_dashboard_page(
70
  __('Piwik Statistics', 'wp-piwik'),
71
  __('WP-Piwik', 'wp-piwik'),
72
+ $intDisplayTo,
73
  __FILE__,
74
  array($this, 'show_stats')
75
  );
76
  add_action('admin_print_scripts-'.$intStatsPage, array($this, 'load_scripts'));
77
  add_action('admin_head-'.$intStatsPage, array($this, 'add_admin_header'));
78
+ //add_filter('manage_posts_columns', array($this, 'display_post_unique_column'));
79
+ //add_action('manage_posts_custom_column', array($this, 'display_post_unique_content'), $intDisplayTo, 2);
80
  add_options_page(
81
  __('WP-Piwik', 'wp-piwik'),
82
  __('WP-Piwik', 'wp-piwik'),
170
  include($strRoot.DIRECTORY_SEPARATOR.'dashboard/'.$strFile.'.php');
171
  }
172
 
173
+ function display_post_unique_column($aryCols) {
174
+ $aryCols['wp-piwik_unique'] = __('Unique');
175
+ return $aryCols;
176
+ }
177
+
178
+ function display_post_unique_content($strCol, $intID) {
179
+ if( $strCol == 'wp-piwik_unique' ) {
180
+ }
181
+ }
182
+
183
  function show_stats() {
184
  $arySortOrder = get_user_option('meta-box-order_wppiwik');
185
  $aryClosed = get_user_option('closedpostboxes_wppiwik');
314
  ($strJavaScript).'</textarea></td></tr>';
315
  echo '<tr><td>'.__('Add script to wp_footer()', 'wp-piwik').
316
  ':</td><td><input type="checkbox" value="1" name="wp-piwik_addjs" '.
317
+ ($intAddJS?' checked="checked"':'').'/></td></tr>';
318
  echo '<tr><td></td><td><span class="setting-description">'.
319
  __('If your template uses wp_footer(), WP-Piwik can automatically'.
320
  ' add the Piwik javascript code to your blog.', 'wp-piwik').
330
  __('Choose users by user role you do <strong>not</strong> want to track.'.
331
  ' Requires enabled &quot;Add script to wp_footer()&quot;-functionality.', 'wp-piwik').
332
  '</span></td></tr>';
333
+ echo '<tr><td>'.__('Display statistics to', 'wp-piwik').':</td><td><select name="wp-piwik_displayto">';
334
+ $intDisplayTo = get_option('wp-piwik_displayto', 8);
335
+ foreach($wp_roles->role_names as $strKey => $strName) {
336
+ $role = get_role($strKey);
337
+ $intLevel = array_reduce( array_keys( $role->capabilities ), array( 'WP_User', 'level_reduction' ), 0 );
338
+ echo '<option value="'.$intLevel.'"'.($intDisplayTo == $intLevel?' selected="selected"':'').'>'.$strName.'</option>';
339
+ }
340
+ echo '</select> '.__('or above', 'wp-piwik').'</td></tr>';
341
+ echo '<tr><td></td><td><span class="setting-description">'.
342
+ __('Minimum user level required to display statistics page.', 'wp-piwik').
343
+ '</span></td></tr>';
344
  }
345
  }
346
  /***************************************************************************/ ?>
347
  </table>
348
  <input type="hidden" name="action" value="update" />
349
+ <input type="hidden" name="page_options" value="wp-piwik_token,wp-piwik_url,wp-piwik_siteid,wp-piwik_addjs,wp-piwik_filter,wp-piwik_displayto" />
350
  <p class="submit">
351
  <input type="submit" name="Submit" value="<?php _e('Save settings', 'wp-piwik') ?>" />
352
  </p>