Version Description
- 11-05-2018 =
- minor bug fixed.
Download this release
Release Info
Developer | dots |
Plugin | Page Visit Counter |
Version | 4.0.7 |
Comparing to | |
See all releases |
Code changes from version 4.0.6 to 4.0.7
- README.txt +4 -1
- admin/class-page-visit-counter-admin.php +15 -5
- page_visit_counter.php +1 -1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Plugin URI: http://multidots.com/
|
|
4 |
Author: Multidots
|
5 |
Author URI: http://multidots.com/
|
6 |
Contributors: dots, ketuchetan, chiragpatel, jitendrabanjara1991
|
7 |
-
Stable tag: 4.0.
|
8 |
Tags: page counter,page visit, post counter, post visit, wordpress post view, wordpress page view, page visit graph, post visit graph,
|
9 |
Requires at least: 2.1
|
10 |
Tested up to: 4.9.4
|
@@ -115,6 +115,9 @@ Automatic updates should work great for you. As always, though, we recommend ba
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
118 |
= 4.0.6 - 27-04-2018 =
|
119 |
* minor bug fixed.
|
120 |
|
4 |
Author: Multidots
|
5 |
Author URI: http://multidots.com/
|
6 |
Contributors: dots, ketuchetan, chiragpatel, jitendrabanjara1991
|
7 |
+
Stable tag: 4.0.7
|
8 |
Tags: page counter,page visit, post counter, post visit, wordpress post view, wordpress page view, page visit graph, post visit graph,
|
9 |
Requires at least: 2.1
|
10 |
Tested up to: 4.9.4
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 4.0.7 - 11-05-2018 =
|
119 |
+
* minor bug fixed.
|
120 |
+
|
121 |
= 4.0.6 - 27-04-2018 =
|
122 |
* minor bug fixed.
|
123 |
|
admin/class-page-visit-counter-admin.php
CHANGED
@@ -705,6 +705,7 @@ class page_visit_counter_Admin
|
|
705 |
}),
|
706 |
success: function (data) {
|
707 |
var resultarr = JSON.parse(data);
|
|
|
708 |
if (resultarr != 'novisit') {
|
709 |
topBrowsersArr = resultarr['topBrowserString'];
|
710 |
topIpArr = resultarr['topIpString'];
|
@@ -1690,9 +1691,15 @@ class page_visit_counter_Admin
|
|
1690 |
}
|
1691 |
|
1692 |
//$queryTopIpAddress = "SELECT COUNT( `page_id` ) AS total, `ipaddress` AS ipaddress FROM $table_name WHERE `page_id` =$pageId GROUP BY `ipaddress` ORDER BY total DESC LIMIT 10";
|
1693 |
-
|
|
|
1694 |
|
|
|
1695 |
$topIpArr = $wpdb->get_results($queryTopIpAddress);
|
|
|
|
|
|
|
|
|
1696 |
|
1697 |
$topIpStringArr = array();
|
1698 |
|
@@ -1724,8 +1731,10 @@ class page_visit_counter_Admin
|
|
1724 |
|
1725 |
$custom_page_visit_history_datatbase_table_name = $wpdb->prefix . "page_visit_history";
|
1726 |
//$queryWeeklyReport = "SELECT SUM(page_id) AS total,DATE_ADD(date, INTERVAL(0-WEEKDAY(date)) DAY) as Week_Start_Date,DATE_ADD(date, INTERVAL(6-WEEKDAY(date)) DAY) as week_end_date,YEARWEEK( DATE, 1 ) AS YearAndWeek FROM $table_name WHERE page_id = $pageId GROUP BY YEARWEEK(date,1) ORDER BY YearAndWeek DESC LIMIT 5";
|
1727 |
-
|
|
|
1728 |
|
|
|
1729 |
$topWeeklyArr = $wpdb->get_results($queryWeeklyReport);
|
1730 |
|
1731 |
$topWeeklyStringArr = array();
|
@@ -1733,13 +1742,14 @@ class page_visit_counter_Admin
|
|
1733 |
$topWeeklyStringArr["Week Year"] = 'Total Visits';
|
1734 |
if ((int)$result[0]->total > 0) {
|
1735 |
foreach (array_reverse($topWeeklyArr) as $topWeekly) {
|
1736 |
-
$topWeeklyStringArr["$topWeekly->
|
1737 |
}
|
1738 |
unset($topWeeklyArr);
|
1739 |
}
|
1740 |
|
1741 |
-
|
1742 |
-
|
|
|
1743 |
$topMonthlyArr = $wpdb->get_results($queryMonthlyReport);
|
1744 |
|
1745 |
$topMonthlyStringArr = array();
|
705 |
}),
|
706 |
success: function (data) {
|
707 |
var resultarr = JSON.parse(data);
|
708 |
+
console.log(resultarr);
|
709 |
if (resultarr != 'novisit') {
|
710 |
topBrowsersArr = resultarr['topBrowserString'];
|
711 |
topIpArr = resultarr['topIpString'];
|
1691 |
}
|
1692 |
|
1693 |
//$queryTopIpAddress = "SELECT COUNT( `page_id` ) AS total, `ipaddress` AS ipaddress FROM $table_name WHERE `page_id` =$pageId GROUP BY `ipaddress` ORDER BY total DESC LIMIT 10";
|
1694 |
+
//$queryTopIpAddress = "SELECT COUNT( `page_id` ) AS total, `ipaddress` AS ipaddress FROM $table_name WHERE `page_id` =$pageId AND date > DATE_SUB(NOW(), INTERVAL 1 MONTH) GROUP BY `ipaddress` ORDER BY total DESC LIMIT 10";
|
1695 |
+
$queryTopIpAddress = "SELECT COUNT( `page_id` ) AS total, `ipaddress` AS ipaddress FROM $table_name WHERE `page_id` =$pageId GROUP BY `ipaddress` ORDER BY total DESC LIMIT 10";
|
1696 |
|
1697 |
+
//echo $queryTopIpAddress;
|
1698 |
$topIpArr = $wpdb->get_results($queryTopIpAddress);
|
1699 |
+
|
1700 |
+
// echo '<pre>';
|
1701 |
+
// print_r($topIpArr);
|
1702 |
+
// echo '</pre>';
|
1703 |
|
1704 |
$topIpStringArr = array();
|
1705 |
|
1731 |
|
1732 |
$custom_page_visit_history_datatbase_table_name = $wpdb->prefix . "page_visit_history";
|
1733 |
//$queryWeeklyReport = "SELECT SUM(page_id) AS total,DATE_ADD(date, INTERVAL(0-WEEKDAY(date)) DAY) as Week_Start_Date,DATE_ADD(date, INTERVAL(6-WEEKDAY(date)) DAY) as week_end_date,YEARWEEK( DATE, 1 ) AS YearAndWeek FROM $table_name WHERE page_id = $pageId GROUP BY YEARWEEK(date,1) ORDER BY YearAndWeek DESC LIMIT 5";
|
1734 |
+
//$queryWeeklyReport = "SELECT SUM(page_id) AS total,DATE_ADD(date, INTERVAL(0-WEEKDAY(date)) DAY) as Week_Start_Date,DATE_ADD(date, INTERVAL(6-WEEKDAY(date)) DAY) as week_end_date,YEARWEEK( DATE, 1 ) AS YearAndWeek, YEAR(DATE) as year, WEEK( DATE,1 ) as week FROM $custom_page_visit_history_datatbase_table_name WHERE page_id = 1 GROUP BY YEARWEEK(date,1) ORDER BY YearAndWeek DESC LIMIT 5";
|
1735 |
+
$queryWeeklyReport = "SELECT COUNT(page_id) AS total,DATE_ADD(date, INTERVAL(0-WEEKDAY(date)) DAY) as Week_Start_Date,DATE_ADD(date, INTERVAL(6-WEEKDAY(date)) DAY) as week_end_date,YEARWEEK( DATE, 1 ) AS YearAndWeek, YEAR(DATE) as yeargroup, WEEK( DATE,1 ) as week FROM $custom_page_visit_history_datatbase_table_name WHERE page_id = $pageId GROUP BY Week_Start_Date,week_end_date,YearAndWeek,yeargroup,week ORDER BY YearAndWeek DESC LIMIT 5";
|
1736 |
|
1737 |
+
//echo $queryWeeklyReport;
|
1738 |
$topWeeklyArr = $wpdb->get_results($queryWeeklyReport);
|
1739 |
|
1740 |
$topWeeklyStringArr = array();
|
1742 |
$topWeeklyStringArr["Week Year"] = 'Total Visits';
|
1743 |
if ((int)$result[0]->total > 0) {
|
1744 |
foreach (array_reverse($topWeeklyArr) as $topWeekly) {
|
1745 |
+
$topWeeklyStringArr["$topWeekly->yeargroup - $topWeekly->week"] = (int)$topWeekly->total;
|
1746 |
}
|
1747 |
unset($topWeeklyArr);
|
1748 |
}
|
1749 |
|
1750 |
+
//$queryMonthlyReport = "SELECT SUM( `page_id` ) AS total, DATE_FORMAT(`date`,'%M %Y') AS month FROM `$table_name` WHERE `page_id` =$pageId AND YEAR( `date` ) = YEAR( CURDATE( ) ) GROUP BY MONTH( `date` ) ORDER BY MONTH( `date` ) ASC LIMIT 5";
|
1751 |
+
$queryMonthlyReport = "SELECT COUNT( `page_id` ) AS total, DATE_FORMAT(`date`,'%M %Y') AS month FROM `$table_name` WHERE `page_id` =$pageId AND YEAR( `date` ) = YEAR( CURDATE( ) ) GROUP BY month ORDER BY MONTH( `date` ) ASC LIMIT 5";
|
1752 |
+
//echo $queryMonthlyReport;
|
1753 |
$topMonthlyArr = $wpdb->get_results($queryMonthlyReport);
|
1754 |
|
1755 |
$topMonthlyStringArr = array();
|
page_visit_counter.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Plugin URI: http://www.multidots.com/
|
8 |
* Description: This plugin will count the total visits of your sites pages.
|
9 |
* Author: Multidots
|
10 |
-
* Version: 4.0.
|
11 |
* Author URI: http://www.multidots.com/
|
12 |
*/
|
13 |
// If this file is called directly, abort.
|
7 |
* Plugin URI: http://www.multidots.com/
|
8 |
* Description: This plugin will count the total visits of your sites pages.
|
9 |
* Author: Multidots
|
10 |
+
* Version: 4.0.7
|
11 |
* Author URI: http://www.multidots.com/
|
12 |
*/
|
13 |
// If this file is called directly, abort.
|