Version Description
Download this release
Release Info
Developer | Braekling |
Plugin | WP-Matomo (WP-Piwik) |
Version | 0.3.2 |
Comparing to | |
See all releases |
Code changes from version 0.3.1 to 0.3.2
- languages/wp-piwik-de_DE.mo +0 -0
- languages/wp-piwik-de_DE.po +4 -0
- readme.txt +2 -1
- wp-piwik.php +20 -3
languages/wp-piwik-de_DE.mo
CHANGED
Binary file
|
languages/wp-piwik-de_DE.po
CHANGED
@@ -102,6 +102,10 @@ msgstr "WP-Piwik Einstellungen"
|
|
102 |
msgid "Settings"
|
103 |
msgstr "Einstellungen"
|
104 |
|
|
|
|
|
|
|
|
|
105 |
#: wp-piwik.php:190
|
106 |
msgid "Account settings"
|
107 |
msgstr "Account-Konfiguration"
|
102 |
msgid "Settings"
|
103 |
msgstr "Einstellungen"
|
104 |
|
105 |
+
#: wp-piwik.php:112
|
106 |
+
msgid "Remote access to Piwik not possible. Enable allow_url_fopen or CURL."
|
107 |
+
msgstr "Zugriff auf Piwik nicht möglich. Aktiviere allow_url_fopen oder CURL."
|
108 |
+
|
109 |
#: wp-piwik.php:190
|
110 |
msgid "Account settings"
|
111 |
msgstr "Account-Konfiguration"
|
readme.txt
CHANGED
@@ -2,7 +2,8 @@
|
|
2 |
Contributors: braekling
|
3 |
Requires at least: 2.7
|
4 |
Tested up to: 2.8
|
5 |
-
Stable tag: 0.3.
|
|
|
6 |
Tags: statistics, stats, analytics, piwik
|
7 |
|
8 |
This plugin adds a piwik stats site to your WordPress dashboard.
|
2 |
Contributors: braekling
|
3 |
Requires at least: 2.7
|
4 |
Tested up to: 2.8
|
5 |
+
Stable tag: 0.3.2
|
6 |
+
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
|
7 |
Tags: statistics, stats, analytics, piwik
|
8 |
|
9 |
This plugin adds a piwik stats site to your WordPress dashboard.
|
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.3.
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
@@ -98,6 +98,22 @@ class wp_piwik {
|
|
98 |
return trailingslashit(WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)));
|
99 |
}
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
function call_API($strMethod, $strPeriod='', $strDate='', $intLimit='') {
|
102 |
$strKey = $strMethod.'_'.$strPeriod.'_'.$strDate.'_'.$intLimit;
|
103 |
if (empty($this->aryCache[$strKey])) {
|
@@ -116,7 +132,8 @@ class wp_piwik {
|
|
116 |
$strURL .= '&idSite='.$intSite.'&period='.$strPeriod.'&date='.$strDate;
|
117 |
$strURL .= '&format=PHP&filter_limit='.$intLimit;
|
118 |
$strURL .= '&token_auth='.$strToken;
|
119 |
-
|
|
|
120 |
$this->aryCache[$strKey] = unserialize($strResult);
|
121 |
}
|
122 |
return $this->aryCache[$strKey];
|
@@ -170,7 +187,7 @@ class wp_piwik {
|
|
170 |
<h2><?php _e('Piwik Statistics', 'wp-piwik'); ?></h2>
|
171 |
<div id="dashboard-widgets-wrap">
|
172 |
<div id="dashboard-widgets" class="metabox-holder">
|
173 |
-
<div id="postbox-container" class="wp-piwik-side" style="width:
|
174 |
<div id="side-sortables" class="meta-box-sortables ui-sortable wp-piwik-sortables">
|
175 |
<?php /************************************************************************/
|
176 |
foreach ($aryDashboard['side'] as $strFile => $aryConfig)
|
6 |
|
7 |
Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
|
8 |
|
9 |
+
Version: 0.3.2
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
98 |
return trailingslashit(WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)));
|
99 |
}
|
100 |
|
101 |
+
function get_remote_file($strURL) {
|
102 |
+
if (ini_get('allow_url_fopen'))
|
103 |
+
$strResult = file_get_contents($strURL);
|
104 |
+
elseif (function_exists('curl_init')) {
|
105 |
+
$c = curl_init($strURL);
|
106 |
+
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
|
107 |
+
curl_setopt($c, CURLOPT_HEADER, 0);
|
108 |
+
$strResult = curl_exec($c);
|
109 |
+
curl_close($c);
|
110 |
+
} else $strResult = serialize(array(
|
111 |
+
'result' => 'error',
|
112 |
+
'message' => 'Remote access to Piwik not possible. Enable allow_url_fopen or CURL.'
|
113 |
+
));
|
114 |
+
return $strResult;
|
115 |
+
}
|
116 |
+
|
117 |
function call_API($strMethod, $strPeriod='', $strDate='', $intLimit='') {
|
118 |
$strKey = $strMethod.'_'.$strPeriod.'_'.$strDate.'_'.$intLimit;
|
119 |
if (empty($this->aryCache[$strKey])) {
|
132 |
$strURL .= '&idSite='.$intSite.'&period='.$strPeriod.'&date='.$strDate;
|
133 |
$strURL .= '&format=PHP&filter_limit='.$intLimit;
|
134 |
$strURL .= '&token_auth='.$strToken;
|
135 |
+
|
136 |
+
$strResult = $this->get_remote_file($strURL);
|
137 |
$this->aryCache[$strKey] = unserialize($strResult);
|
138 |
}
|
139 |
return $this->aryCache[$strKey];
|
187 |
<h2><?php _e('Piwik Statistics', 'wp-piwik'); ?></h2>
|
188 |
<div id="dashboard-widgets-wrap">
|
189 |
<div id="dashboard-widgets" class="metabox-holder">
|
190 |
+
<div id="postbox-container" class="wp-piwik-side" style="width:290px; float:left;">
|
191 |
<div id="side-sortables" class="meta-box-sortables ui-sortable wp-piwik-sortables">
|
192 |
<?php /************************************************************************/
|
193 |
foreach ($aryDashboard['side'] as $strFile => $aryConfig)
|