Commit e4686f31 authored by lechuck's avatar lechuck Committed by lucha

Upgrade wp-piwik to 0.9.9.10

parent 937c7cb8
This diff is collapsed.
......@@ -14,13 +14,17 @@
'default'
);
}
function showStats() {
private function getStats($range = false) {
global $post;
$postURL = get_permalink($post->ID);
$range = $this->getRangeLast30();
$range = ($range?$range:$this->getRangeLast30());
self::$logger->log('Load per post statistics: '.$postURL);
$data = self::$wpPiwik->callPiwikAPI('Actions.getPageUrl', 'range', $range, null, false, false, 'PHP', $postURL, false);
return self::$wpPiwik->callPiwikAPI('Actions.getPageUrl', 'range', $range, null, false, false, 'PHP', $postURL, false);
}
function showStats() {
$data = $this->getStats();
if (!isset($data[0])) return;
echo '<table>';
$this->tabRow(__('Visitors', 'wp-piwik').':',$data[0]['nb_visits']);
......@@ -34,4 +38,10 @@
echo '</table>';
}
function getValue($range, $key) {
$data = $this->getStats($range);
if (!isset($data[0]) || !isset($data[0][$key])) return '-';
else return $data[0][$key];
}
}
\ No newline at end of file
......@@ -39,6 +39,14 @@
'track_cdnurlssl' => '',
'track_noscript' => false,
'track_nojavascript' => false,
'track_codeposition' => 'footer',
'track_datacfasync' => false,
'track_across' => false,
'limit_cookies' => false,
'limit_cookies_visitor' => 1209600,
'limit_cookies_session' => 0,
'add_post_annotations' => false,
'add_customvars_box' => true,
'disable_timelimit' => false,
'disable_ssl_verify' => false,
'disable_cookies' => false,
......@@ -62,7 +70,7 @@
self::$logger->log('Store default settings');
self::$defaultSettings = array('globalSettings' => $this->globalSettings, 'settings' => $this->settings);
self::$logger->log('Load settings');
$this->globalSettings = (is_plugin_active_for_network('wp-piwik/wp-piwik.php')?
$this->globalSettings = ($this->checkNetworkActivation()?
get_site_option('wp-piwik_global-settings', $this->globalSettings):
get_option('wp-piwik_global-settings', $this->globalSettings)
);
......@@ -97,11 +105,11 @@
}
public function getGlobalOption($key) {
return isset($this->globalSettings[$key])?$this->globalSettings[$key]:null;
return isset($this->globalSettings[$key])?$this->globalSettings[$key]:self::$defaultSettings['globalSettings'][$key];
}
public function getOption($key) {
return isset($this->settings[$key])?$this->settings[$key]:null;
return isset($this->settings[$key])?$this->settings[$key]:self::$defaultSettings['settings'][$key];
}
public function setGlobalOption($key, $value) {
......@@ -144,4 +152,12 @@
}
$this->save();
}
public function checkNetworkActivation() {
if (!function_exists("is_plugin_active_for_network")) {
require_once(ABSPATH.'wp-admin/includes/plugin.php');
wp_cookie_constants();
}
return is_plugin_active_for_network('wp-piwik/wp-piwik.php');
}
}
\ No newline at end of file
......@@ -21,7 +21,13 @@
$aryConf['params']['date'],
$aryConf['params']['limit']
);
$aryConf['data']['Actions'] = $this->callPiwikAPI(
'VisitsSummary.getActions',
$aryConf['params']['period'],
$aryConf['params']['date'],
$aryConf['params']['limit']
);
if (isset($aryConf['data']['Visitors']['result']) && $aryConf['data']['Visitors']['result'] ='error')
echo '<strong>'.__('Piwik error', 'wp-piwik').':</strong> '.htmlentities($aryConf['data']['Visitors']['message'], ENT_QUOTES, 'utf-8');
else {
......@@ -57,6 +63,7 @@
<th class="n"><?php _e('Visits', 'wp-piwik'); ?></th>
<th class="n"><?php _e('Unique', 'wp-piwik'); ?></th>
<th class="n"><?php _e('Bounced', 'wp-piwik'); ?></th>
<th class="n"><?php _e('Page Views', 'wp-piwik'); ?></th>
</tr>
</thead>
<tbody style="cursor:pointer;">
......@@ -69,6 +76,8 @@
$aryConf['data']['Unique'][$strDate].
'</td><td class="n">'.
$aryConf['data']['Bounced'][$strDate].
'</td><td class="n">'.
$aryConf['data']['Actions'][$strDate].
'</td></tr>'."\n";
}
echo '<tr><td class="n" colspan="4"><strong>'.__('Unique TOTAL', 'wp-piwik').'</strong> '.__('Sum', 'wp-piwik').': '.$intUSum.' '.__('Avg', 'wp-piwik').': '.$intAvg.'</td></tr>';
......
Title: MIT License
Copyright (c) 2009-2011 Chris Leonello
Copyright (c) 2009-2013 Chris Leonello
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
......@@ -21,7 +21,7 @@ Bugs, issues, feature requests: <http://www.bitbucket.org/cleonello/jqplot/issue
Basic Usage Instructions:
jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.4.4 is included in
jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.9.1 is included in
the distribution. To use jqPlot include jQuery, the jqPlot jQuery plugin, the jqPlot css file and
optionally the excanvas script to support IE version prior to IE 9 in your web page:
......@@ -46,7 +46,7 @@ to get a description of the various build targets.
Legal Notices:
Copyright (c) 2009-2010 Chris Leonello
Copyright (c) 2009-2013 Chris Leonello
jqPlot is currently available for use in all personal or commercial projects
under both the MIT and GPL version 2.0 licenses. This means that you can
choose the license that best suits your project and use it accordingly.
......
Title: Change Log
1.0.8:
* Issue #375: sortMergedLabels does not sort string labels
* Issue #279: Groups > 3 Causes Alignment Issues
* Issue #439: IE can't display a customized legend in Quirks mode
* Issue #482: "Undefined" error message when plotting a chart with no data
* Issue #116: Don't mix spaces and tabs for indentation
* Issue #564: Metergauge renderer not resizable when replotting
* Issue #409: MeterGaugeRenderer replot/redraw offsets center
* Issue #523: Adding rectangles to Canvas Overlay plugin
* Issue #756: jqplot.min files contain non-UTF-8 characters
* Issue #223: fillToZero does not color negative values when crossover point is 0
* Pull Request #23: Adding rectangles to Canvas Overlay plugin
* Pull Request #28: Cross-over points of 0 will actually change colors
* Pull Request #35: Don't highlight hidden bars or show tooltips for them
* Pull Request #41: Add dutch(nl) and svenska(sv) translations for dates
* Add tooltip support for Pie Charts
* Update to latest YUI compressor
1.0.7:
* Issue #726: Bug in sprintf %p, sometimes it outputs exponential form rather than decimal
* Issue #717: Plot's preDrawHooks not called
* Issue #707: Browser hangs with LogAxisRenderer when value is 0
* Issue #695: Horizontal Bar Chart Negative Series Colors Not Working
* Issue #670: Examples IE7, IE8 and IE9 multipleBarColors.html failure and fix
* Issue #636: X Axis Date Renderer Single Day Not plotting
* Issue #607: Integration issue
* Issue #571: Decimal numbers not properly formatted
* Issue #552: jqPlot crashes when interval too small
* Issue #536: DateAxisRenderer invalid scaling
* Issue #534: "decimalMark" in the "jqplot.sprintf.js"
* Issue #529: Scientific notation on label values ending in 0
* Issue #521: invalid JS in meterGaugeRenderer.js
* Issue #516: Including BezierCurveRenderer plugin and initializing jqplot with no options give error
* Issue #500: DateAxisRenderer has timezone related issues
* Issue #452: Including ALL jqPlot plugins causes an Error
* Issue #494: No point when use LogAxisRenderer and a point has a zero value
* Issue #430: getIsoWeek: invalid method call
* Issue #280: jqplot Options
* Issue #179: Spelling/grammar
* Pull Request #18: Implement getTop in CanvasAxisTickRenderer
* Pull Request #21: Performance issue when drawing pointlabels with zeros/null values
* Pull Request #24: Added suggested fix in comment #8 for issue #536
* Pull Request #29: Removed unbalanced addition of UTC offset
* Pull Request #33: Documentation fixes (issue #179, other changes)
* Pull Request #34: Start of updating jqPlotOptions.txt
* Pull Request #37: Example and suggested fix for issues #552 and issue #536
* Pull Request #39: Fixed trailing comma which caused issues with IE7
1.0.6:
* Add left sidebar navigation to examples
* Update examples for jquery 1.9.1 and jquery ui 1.10.0
* Add colorpicker.js to distribution
* Fix some problems with examples when viewing with local file system
* Add "minified" copyright notice for minified files, similar to jquery's notice.
* Pull Request #25: jqplot.sprintf.js is no longer the last file in the concatenated jquery.jqplot.js
* Pull Request #17: Fixed bug causing custom pointLabels passed with plot data to be ignored for horizontal bar graphs.
* Pull Request #10: Build error by invalid encoding.
* Issue #714: handle tickColor in meterGaugeRenderer
* Issue #519: jsDate Polish Localization
1.0.5:
* Updated to jQuery 1.9
1.0.0b2:
* Major improvements in memory usage:
** Merged in changes from Timo Besenruether to reuse canvas elements and improve
......@@ -143,7 +206,7 @@ Title: Change Log
* Enhanced bar plots so you can now color each bar of a series
independently with the "varyBarColor" option.
* Re-factored series drawing so that each series and series shadow drawn
on it's own canvas. Allows series to be redrawn independently of each other.
on its own canvas. Allows series to be redrawn independently of each other.
* Added additional default series colors.
* Added useNegativeColors option to turn off negative color array and use
only seriesColors array to define all bar/filled line colors.
......@@ -392,4 +455,4 @@ Title: Change Log
* Re-factored axis tick renderer instantiation into the axes renderers themselves.
For changes prior to 0.6.0 release, please see change log at http://bitbucket.org/cleonello/jqplot/changesets/
\ No newline at end of file
For changes prior to 0.6.0 release, please see change log at http://bitbucket.org/cleonello/jqplot/changesets/
......@@ -4,7 +4,7 @@
*
* Version: @VERSION
*
* Copyright (c) 2009-2011 Chris Leonello
* Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
......@@ -28,7 +28,7 @@
*
* included jsDate library by Chris Leonello:
*
* Copyright (c) 2010-2011 Chris Leonello
* Copyright (c) 2010-2013 Chris Leonello
*
* jsDate is currently available for use in all personal or commercial projects
* under both the MIT and GPL version 2.0 licenses. This means that you can
......
.jqplot-target{position:relative;color:#666;font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;font-size:1em;}.jqplot-axis{font-size:.75em;}.jqplot-xaxis{margin-top:10px;}.jqplot-x2axis{margin-bottom:10px;}.jqplot-yaxis{margin-right:10px;}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis,.jqplot-yMidAxis{margin-left:10px;margin-right:10px;}.jqplot-axis-tick,.jqplot-xaxis-tick,.jqplot-yaxis-tick,.jqplot-x2axis-tick,.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick,.jqplot-yMidAxis-tick{position:absolute;}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top;}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom;}.jqplot-yaxis-tick{right:0;top:15px;text-align:right;}.jqplot-yaxis-tick.jqplot-breakTick{right:-20px;margin-right:0;padding:1px 5px 1px 5px;z-index:2;font-size:1.5em;}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left;}.jqplot-yMidAxis-tick{text-align:center;white-space:nowrap;}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute;}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute;}.jqplot-yaxis-label{margin-right:10px;font-size:11pt;position:absolute;}.jqplot-yMidAxis-label{font-size:11pt;position:absolute;}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;margin-left:10px;position:absolute;}.jqplot-meterGauge-tick{font-size:.75em;color:#999;}.jqplot-meterGauge-label{font-size:1em;color:#999;}table.jqplot-table-legend{margin-top:12px;margin-bottom:12px;margin-left:12px;margin-right:12px;}table.jqplot-table-legend,table.jqplot-cursor-legend{background-color:rgba(255,255,255,0.6);border:1px solid #ccc;position:absolute;font-size:.75em;}td.jqplot-table-legend{vertical-align:middle;}td.jqplot-seriesToggle:hover,td.jqplot-seriesToggle:active{cursor:pointer;}.jqplot-table-legend .jqplot-series-hidden{text-decoration:line-through;}div.jqplot-table-legend-swatch-outline{border:1px solid #ccc;padding:1px;}div.jqplot-table-legend-swatch{width:0;height:0;border-top-width:5px;border-bottom-width:5px;border-left-width:6px;border-right-width:6px;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid;}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em;}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;}.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px;}.jqplot-highlighter-tooltip,.jqplot-canvasOverlay-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px;}.jqplot-point-label{font-size:.75em;z-index:2;}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center;}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em;}.jqplot-error{text-align:center;}.jqplot-error-message{position:relative;top:46%;display:inline-block;}div.jqplot-bubble-label{font-size:.8em;padding-left:2px;padding-right:2px;color:rgb(20%,20%,20%);}div.jqplot-bubble-label.jqplot-bubble-label-highlight{background:rgba(90%,90%,90%,0.7);}div.jqplot-noData-container{text-align:center;background-color:rgba(96%,96%,96%,0.3);}
\ No newline at end of file
.jqplot-target{position:relative;color:#666;font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;font-size:1em}.jqplot-axis{font-size:.75em}.jqplot-xaxis{margin-top:10px}.jqplot-x2axis{margin-bottom:10px}.jqplot-yaxis{margin-right:10px}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis,.jqplot-yMidAxis{margin-left:10px;margin-right:10px}.jqplot-axis-tick,.jqplot-xaxis-tick,.jqplot-yaxis-tick,.jqplot-x2axis-tick,.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick,.jqplot-yMidAxis-tick{position:absolute;white-space:pre}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom}.jqplot-yaxis-tick{right:0;top:15px;text-align:right}.jqplot-yaxis-tick.jqplot-breakTick{right:-20px;margin-right:0;padding:1px 5px 1px 5px;z-index:2;font-size:1.5em}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left}.jqplot-yMidAxis-tick{text-align:center;white-space:nowrap}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute}.jqplot-yaxis-label{margin-right:10px;font-size:11pt;position:absolute}.jqplot-yMidAxis-label{font-size:11pt;position:absolute}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;margin-left:10px;position:absolute}.jqplot-meterGauge-tick{font-size:.75em;color:#999}.jqplot-meterGauge-label{font-size:1em;color:#999}table.jqplot-table-legend{margin-top:12px;margin-bottom:12px;margin-left:12px;margin-right:12px}table.jqplot-table-legend,table.jqplot-cursor-legend{background-color:rgba(255,255,255,0.6);border:1px solid #ccc;position:absolute;font-size:.75em}td.jqplot-table-legend{vertical-align:middle}td.jqplot-seriesToggle:hover,td.jqplot-seriesToggle:active{cursor:pointer}.jqplot-table-legend .jqplot-series-hidden{text-decoration:line-through}div.jqplot-table-legend-swatch-outline{border:1px solid #ccc;padding:1px}div.jqplot-table-legend-swatch{width:0;height:0;border-top-width:5px;border-bottom-width:5px;border-left-width:6px;border-right-width:6px;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em}.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-highlighter-tooltip,.jqplot-canvasOverlay-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-point-label{font-size:.75em;z-index:2}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em}.jqplot-error{text-align:center}.jqplot-error-message{position:relative;top:46%;display:inline-block}div.jqplot-bubble-label{font-size:.8em;padding-left:2px;padding-right:2px;color:rgb(20%,20%,20%)}div.jqplot-bubble-label.jqplot-bubble-label-highlight{background:rgba(90%,90%,90%,0.7)}div.jqplot-noData-container{text-align:center;background-color:rgba(96%,96%,96%,0.3)}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/**
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
* Version: 1.0.0b2_r947
*
* Copyright (c) 2009-2011 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
* choose the license that best suits your project and use it accordingly.
*
* Although not required, the author would appreciate an email letting him
* know of any substantial use of jqPlot. You can reach the author at:
* chris at jqplot dot com or see http://www.jqplot.com/info.php .
*
* If you are feeling kind and generous, consider supporting the project by
* making a donation at: http://www.jqplot.com/donate.php .
*
* sprintf functions contained in jqplot.sprintf.js by Ash Searle:
*
* version 2007.04.27
* author Ash Searle
* http://hexmen.com/blog/2007/03/printf-sprintf/
* http://hexmen.com/js/sprintf.js
* The author (Ash Searle) has placed this code in the public domain:
* "This code is unrestricted: you are free to use it however you like."
*
* included jsDate library by Chris Leonello:
*
* Copyright (c) 2010-2011 Chris Leonello
*
* jsDate is currently available for use in all personal or commercial projects
* under both the MIT and GPL version 2.0 licenses. This means that you can
* choose the license that best suits your project and use it accordingly.
*
* jsDate borrows many concepts and ideas from the Date Instance
* Methods by Ken Snyder along with some parts of Ken's actual code.
*
* Ken's origianl Date Instance Methods and copyright notice:
*
* Ken Snyder (ken d snyder at gmail dot com)
* 2008-09-10
* version 2.0.2 (http://kendsnyder.com/sandbox/date/)
* Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/)
*
* jqplotToImage function based on Larry Siden's export-jqplot-to-png.js.
* Larry has generously given permission to adapt his code for inclusion
* into jqPlot.
*
* Larry's original code can be found here:
*
* https://github.com/lsiden/export-jqplot-to-png
*
*
*/
(function(f){f.jqplot.Trendline=function(){this.show=f.jqplot.config.enablePlugins;this.color="#666666";this.renderer=new f.jqplot.LineRenderer();this.rendererOptions={marker:{show:false}};this.label="";this.type="linear";this.shadow=true;this.markerRenderer={show:false};this.lineWidth=1.5;this.shadowAngle=45;this.shadowOffset=1;this.shadowAlpha=0.07;this.shadowDepth=3;this.isTrendline=true};f.jqplot.postSeriesInitHooks.push(e);f.jqplot.postDrawSeriesHooks.push(g);f.jqplot.addLegendRowHooks.push(a);function a(k){var j=null;if(k.trendline&&k.trendline.show){var i=k.trendline.label.toString();if(i){j={label:i,color:k.trendline.color}}}return j}function e(m,k,j,i,l){if(this._type&&(this._type==="line"||this._type=="bar")){this.trendline=new f.jqplot.Trendline();i=i||{};f.extend(true,this.trendline,{color:this.color},j.trendline,i.trendline);this.trendline.renderer.init.call(this.trendline,null)}}function g(m,i){i=f.extend(true,{},this.trendline,i);if(this.trendline&&i.show){var k;var l=i.data||this.data;k=c(l,this.trendline.type);var j=i.gridData||this.renderer.makeGridData.call(this,k.data);this.trendline.renderer.draw.call(this.trendline,m,j,{showLine:true,shadow:this.trendline.shadow})}}function b(w,v,n){var u=(n==null)?"linear":n;var s=w.length;var t;var z;var o=0;var m=0;var r=0;var q=0;var l=0;var j=[];var k=[];if(u=="linear"){k=w;j=v}else{if(u=="exp"||u=="exponential"){for(var p=0;p<v.length;p++){if(v[p]<=0){s--}else{k.push(w[p]);j.push(Math.log(v[p]))}}}}for(var p=0;p<s;p++){o=o+k[p];m=m+j[p];q=q+k[p]*j[p];r=r+k[p]*k[p];l=l+j[p]*j[p]}t=(s*q-o*m)/(s*r-o*o);z=(m-t*o)/s;return[t,z]}function h(k,j){var i;i=b(k,j,"linear");return[i[0],i[1]]}function d(o,m){var k;var i=o;var n=m;k=b(i,n,"exp");var l=Math.exp(k[0]);var j=Math.exp(k[1]);return[l,j]}function c(l,j){var p=(j==null)?"linear":j;var n;var o;var r=[];var q=[];var m=[];for(k=0;k<l.length;k++){if(l[k]!=null&&l[k][0]!=null&&l[k][1]!=null){r.push(l[k][0]);q.push(l[k][1])}}if(p=="linear"){n=h(r,q);for(var k=0;k<r.length;k++){o=n[0]*r[k]+n[1];m.push([r[k],o])}}else{if(p=="exp"||p=="exponential"){n=d(r,q);for(var k=0;k<r.length;k++){o=n[1]*Math.pow(n[0],r[k]);m.push([r[k],o])}}}return{data:m,slope:n[0],intercept:n[1]}}})(jQuery);
\ No newline at end of file
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
jsDate | (c) 2010-2013 Chris Leonello
*/(function(f){f.jqplot.Trendline=function(){this.show=f.jqplot.config.enablePlugins;this.color="#666666";this.renderer=new f.jqplot.LineRenderer();this.rendererOptions={marker:{show:false}};this.label="";this.type="linear";this.shadow=true;this.markerRenderer={show:false};this.lineWidth=1.5;this.shadowAngle=45;this.shadowOffset=1;this.shadowAlpha=0.07;this.shadowDepth=3;this.isTrendline=true};f.jqplot.postSeriesInitHooks.push(e);f.jqplot.postDrawSeriesHooks.push(g);f.jqplot.addLegendRowHooks.push(a);function a(k){var j=null;if(k.trendline&&k.trendline.show){var i=k.trendline.label.toString();if(i){j={label:i,color:k.trendline.color}}}return j}function e(m,k,j,i,l){if(this._type&&(this._type==="line"||this._type=="bar")){this.trendline=new f.jqplot.Trendline();i=i||{};f.extend(true,this.trendline,{color:this.color},j.trendline,i.trendline);this.trendline.renderer.init.call(this.trendline,null)}}function g(m,i){i=f.extend(true,{},this.trendline,i);if(this.trendline&&i.show){var k;var l=i.data||this.data;k=c(l,this.trendline.type);var j=i.gridData||this.renderer.makeGridData.call(this,k.data);this.trendline.renderer.draw.call(this.trendline,m,j,{showLine:true,shadow:this.trendline.shadow})}}function b(w,v,n){var u=(n==null)?"linear":n;var s=w.length;var t;var z;var o=0;var m=0;var r=0;var q=0;var l=0;var j=[];var k=[];if(u=="linear"){k=w;j=v}else{if(u=="exp"||u=="exponential"){for(var p=0;p<v.length;p++){if(v[p]<=0){s--}else{k.push(w[p]);j.push(Math.log(v[p]))}}}}for(var p=0;p<s;p++){o=o+k[p];m=m+j[p];q=q+k[p]*j[p];r=r+k[p]*k[p];l=l+j[p]*j[p]}t=(s*q-o*m)/(s*r-o*o);z=(m-t*o)/s;return[t,z]}function h(k,j){var i;i=b(k,j,"linear");return[i[0],i[1]]}function d(o,m){var k;var i=o;var n=m;k=b(i,n,"exp");var l=Math.exp(k[0]);var j=Math.exp(k[1]);return[l,j]}function c(l,j){var p=(j==null)?"linear":j;var n;var o;var r=[];var q=[];var m=[];for(k=0;k<l.length;k++){if(l[k]!=null&&l[k][0]!=null&&l[k][1]!=null){r.push(l[k][0]);q.push(l[k][1])}}if(p=="linear"){n=h(r,q);for(var k=0;k<r.length;k++){o=n[0]*r[k]+n[1];m.push([r[k],o])}}else{if(p=="exp"||p=="exponential"){n=d(r,q);for(var k=0;k<r.length;k++){o=n[1]*Math.pow(n[0],r[k]);m.push([r[k],o])}}}return{data:m,slope:n[0],intercept:n[1]}}})(jQuery);
\ No newline at end of file
......@@ -77,7 +77,7 @@ the $.jqplot.config.enablePlugins = true; config options set on the page before
Only plugins that can be immediately active upon loading are affected. This includes
non-renderer plugins like cursor, dragable, highlighter, and trendline.
Here is a the same $.jqplot call
Here is the same $.jqplot call
but with a log y axis:
> $.jqplot('chartdiv', [[[1, 2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]],
......@@ -112,7 +112,7 @@ Some plugins, like the highlighter plugin which highlights data points near the
mouse, don't need any extra options or setup to function. Highlighter does have
additional options which the user can set.
Other plugins, the barRenderer for example, provide functionality the must be specified
Other plugins, the barRenderer for example, provide functionality that must be specified
in the chart options object. To render a series as a bar graph with the bar renderer,
you would first include the plugin after jqPlot:
......@@ -123,4 +123,4 @@ a chart like:
> $.jqplot('chartdiv', [[34.53, 56.32, 25.1, 18.6]], {series:[{renderer:$.jqplot.BarRenderer}]});
Here the default LineRenderer is replaced by a BarRenderer to generate a bar graph for the first (an only) series.
\ No newline at end of file
Here the default LineRenderer is replaced by a BarRenderer to generate a bar graph for the first (and only) series.
......@@ -2,7 +2,7 @@
*
* jquery.sparkline.js
*
* v2.1.1
* v2.1.2
* (c) Splunk, Inc
* Contact: Gareth Watts (gareth@splunk.com)
* http://omnipotent.net/jquery.sparkline/
......@@ -202,13 +202,13 @@
/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */
(function(document, Math, undefined) { // performance/minified-size optimization
(function(factory) {
if(typeof define === 'function' && define.amd) {
define(['jquery'], factory);
}
else {
factory(jQuery);
}
define(['jquery'], factory);
} else if (jQuery && !jQuery.fn.sparkline) {
factory(jQuery);
}
}
(function($) {
'use strict';
......@@ -597,19 +597,41 @@
if (useExisting && (target = this.data('_jqs_vcanvas'))) {
return target;
}
if ($.fn.sparkline.canvas === false) {
// We've already determined that neither Canvas nor VML are available
return false;
} else if ($.fn.sparkline.canvas === undefined) {
// No function defined yet -- need to see if we support Canvas or VML
var el = document.createElement('canvas');
if (!!(el.getContext && el.getContext('2d'))) {
// Canvas is available
$.fn.sparkline.canvas = function(width, height, target, interact) {
return new VCanvas_canvas(width, height, target, interact);
};
} else if (document.namespaces && !document.namespaces.v) {
// VML is available
document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML');
$.fn.sparkline.canvas = function(width, height, target, interact) {
return new VCanvas_vml(width, height, target);
};
} else {
// Neither Canvas nor VML are available
$.fn.sparkline.canvas = false;
return false;
}
}
if (width === undefined) {
width = $(this).innerWidth();
}
if (height === undefined) {
height = $(this).innerHeight();
}
if ($.fn.sparkline.hasCanvas) {
target = new VCanvas_canvas(width, height, this, interact);
} else if ($.fn.sparkline.hasVML) {
target = new VCanvas_vml(width, height, this);
} else {
return false;
}
target = $.fn.sparkline.canvas(width, height, this, interact);
mhandler = $(this).data('_jqs_mhandler');
if (mhandler) {
mhandler.registerCanvas(target);
......@@ -977,8 +999,7 @@
mhandler.registerSparkline(sp);
}
};
// jQuery 1.3.0 completely changed the meaning of :hidden :-/
if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || ($.fn.jquery < '1.3.0' && $(this).parents().is(':hidden')) || !$(this).parents('body').length) {
if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || !$(this).parents('body').length) {
if (!options.get('composite') && $.data(this, '_jqs_pending')) {
// remove any existing references to the element
for (i = pending.length; i; i--) {
......@@ -2528,20 +2549,6 @@
// Setup a very simple "virtual canvas" to make drawing the few shapes we need easier
// This is accessible as $(foo).simpledraw()
// Detect browser renderer support
(function() {
if (document.namespaces && !document.namespaces.v) {
$.fn.sparkline.hasVML = true;
document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML');
} else {
$.fn.sparkline.hasVML = false;
}
var el = document.createElement('canvas');
$.fn.sparkline.hasCanvas = !!(el.getContext && el.getContext('2d'));
})()
VShape = createClass({
init: function (target, id, type, args) {
this.target = target;
......@@ -3044,4 +3051,4 @@
}
});
}));
\ No newline at end of file
}))}(document, Math));
......@@ -710,4 +710,49 @@ msgid "Show stats about single posts at the post edit admin page."
msgstr "Zeige Statistiken zu einzelnen Beitr&auml;gen auf der Bearbeiten-Seite."
msgid "Show per post stats"
msgstr "Zeige Beitrags-Statistiken"
\ No newline at end of file
msgstr "Zeige Beitrags-Statistiken"
msgid "Add data-cfasync=false"
msgstr "data-cfasync=false einf&uuml;gen"
msgid "Track admin pages"
msgstr "Admin-Seiten tracken"
msgid "Adds data-cfasync=false to the script tag, e.g., to ask Rocket Loader to ignore the script."
msgstr "Fügt data-cfasync=false zum Script-Tag hinzu, z.B. damit Rocket Loader das Skript ignoriert."
msgid "Add annotation on new post"
msgstr "Notiz bei neuem Post"
msgid "Add a Piwik annotation on each new post, see"
msgstr "F&uuml;gt in Piwik f&uuml;r jeden neuen Post eine Notiz hinzu, siehe"
msgid "JavaScript code position"
msgstr "Position des JavaScript-Codes"
msgid "Choose whether the JavaScript code is added to the footer or the header."
msgstr "W&auml;hle, ob der JavaScript-Code im Footer oder im Header eingef&uuml;gt werden soll."
msgid "Show custom variables box"
msgstr "Zeige Custom-Variables-Box"
msgid "Show a custom vars edit box on post edit page."
msgstr "Zeige eine Custom-Variables-Eingabebox auf den Edit-Post-Seiten."
msgid "Limit cookie lifetime"
msgstr "Cookie-Lebensdauer beschr&auml;nken"
msgid "Limit cookie lifetime as follows"
msgstr "Beschr&auml;nke die Cookie-Lebensdauer wie folgt"
msgid "Session timeout (seconds)"
msgstr "Session-Timeout (Sekunden)"
msgid "Visitor timeout (seconds)"
msgstr "Besucher-Timeout (Sekunden)"
msgid "Track visitors across all subdomains"
msgstr "Besucher &uuml;ber alle Subdomains aufzeichnen"
msgid "Adds *.-prefix to cookie domain."
msgstr "F&uuml;gt ein *.-Pr&auml;fix zur Cookie Domain hinzu."
\ No newline at end of file
......@@ -2,8 +2,8 @@
Contributors: Braekling
Requires at least: 3.8
Tested up to: 3.8
Stable tag: 0.9.9.8
Tested up to: 3.9
Stable tag: 0.9.9.10
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
Tags: statistics, stats, analytics, piwik, wpmu
......@@ -13,7 +13,7 @@ This plugin adds a Piwik stats site to your WordPress or WordPress multisite das
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.
**You need a running Piwik (at least 2.0.2) installation** and at least view access to your stats. Also PHP 5 or higher is strictly required.
You need a running **Piwik 2.0.2 or higher** installation and at least view access to your stats. Also **PHP 5.3 or higher** is strictly required.
Look at the [Piwik website](http://piwik.org/) to get further information about Piwik.
......@@ -32,6 +32,9 @@ Shows overview table like WP-Piwik's overview dashboard. See Piwik API documenta
[wp-piwik module="opt-out" language="en" width="100%" height="200px"]
Shows the Piwik opt-out Iframe. You can change the Iframe's language by the language attribute (e.g. de for German language) and its width and height using the corresponding attributes.
[wp-piwik module="post" range="last30" key="sum_daily_nb_uniq_visitors"]
Shows the chosen keys value related to the current post. You can define a range (format: lastN, previousN or YYYY-MM-DD,YYYY-MM-DD) and the desired value's key (e.g., sum_daily_nb_uniq_visitors, nb_visits or nb_hits - for details see Piwik's API method Actions.getPageUrl using a range).
[wp-piwik]
is equal to *[wp-piwik module="overview" title="" period="day" date="yesterday"]*.
......@@ -46,7 +49,7 @@ See section "Installation".
* Graphs powered by [jqPlot](http://www.jqplot.com/) (GPL 2.0 and MIT) and and [jQuery Sparklines](http://omnipotent.net/jquery.sparkline/) (New BSD License).
* Metabox support inspired by [Heiko Rabe's metabox demo plugin](http://www.code-styling.de/english/how-to-use-wordpress-metaboxes-at-own-plugins).
* Translation credits see plugin settings
* Donations: Marco L., Rolf W., Tobias U., Lars K., Donna F., Kevin D., Ramos S, Thomas M., John C., Andreas G., Ben M., Myra R. I., Carlos U. R.-S., the Piwik team itself, and all people flattering this.
* Donations: Marco L., Rolf W., Tobias U., Lars K., Donna F., Kevin D., Ramos S., Thomas M., John C., Andreas G., Ben M., Myra R. I., Carlos U. R.-S., Oleg I., M. N., Daniel K., James L., Jochen K., the Piwik team itself, and all people flattering this.
* All users who send me mails containing criticism, commendation, feature requests and bug reports - you help me to make WP-Piwik much better!
Thank you all!
......@@ -74,6 +77,11 @@ See [this support thread](http://wordpress.org/support/topic/plugin-wp-piwik-htt
= Overview shortcode shows no unique visitors using a yearly range. =
See [Piwik FAQ](http://piwik.org/faq/how-to/#faq_113).
= Can I also access some Piwik values using a PHP call? =
Yes, you can access also available shortcodes using PHP, too. See this example:
echo $GLOBALS['wp_piwik']->shortcode(array('module' => 'post', 'range' => 'last300', 'key' => 'sum_daily_nb_uniq_visitors'));
== Installation ==
= Install WP-Piwik on a simple WordPress blog =
......@@ -113,10 +121,30 @@ Add WP-Piwik to your /wp-content/plugins folder and enable it as [Network Plugin
== Upgrade Notice ==
Please update Piwik if not done yet (Piwik 1.11 or higher is recommended)!
Please update Piwik if not done yet (Piwik 2.0 or higher is recommended)!
== Changelog ==