Skip to content

Commit

Permalink
0.9.9.9 RC 1 - testing.
Browse files Browse the repository at this point in the history
git-svn-id: https://plugins.svn.wordpress.org/wp-piwik/trunk@901943 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information
Braekling authored and Braekling committed Apr 24, 2014
1 parent 98d8ea7 commit f19d837
Show file tree
Hide file tree
Showing 21 changed files with 479 additions and 654 deletions.
18 changes: 14 additions & 4 deletions classes/WP_Piwik_MetaBox_PerPost_Stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ function addMetabox() {
'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']);
Expand All @@ -34,4 +38,10 @@ function showStats() {
echo '</table>';
}

function getValue($range, $key) {
$data = $this->getStats($range);
if (!isset($data[0]) || !isset($data[0][$key])) return '-';
else return $data[0][$key];
}

}
8 changes: 6 additions & 2 deletions classes/WP_Piwik_Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ class WP_Piwik_Settings {
'track_cdnurlssl' => '',
'track_noscript' => false,
'track_nojavascript' => false,
'track_codeposition' => 'footer',
'track_datacfasync' => false,
'add_post_annotations' => false,
'add_customvars_box' => true,
'disable_timelimit' => false,
'disable_ssl_verify' => false,
'disable_cookies' => false,
Expand Down Expand Up @@ -97,11 +101,11 @@ public function save() {
}

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) {
Expand Down
2 changes: 1 addition & 1 deletion js/jqplot/MIT-LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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
Expand Down
4 changes: 2 additions & 2 deletions js/jqplot/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.
Expand Down
67 changes: 65 additions & 2 deletions js/jqplot/changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,68 @@
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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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/
For changes prior to 0.6.0 release, please see change log at http://bitbucket.org/cleonello/jqplot/changesets/
4 changes: 2 additions & 2 deletions js/jqplot/copyright.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
60 changes: 3 additions & 57 deletions js/jqplot/excanvas.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/jqplot/jquery.jqplot.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 3 additions & 57 deletions js/jqplot/jquery.jqplot.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit f19d837

Please sign in to comment.