Version Description
Download this release
Release Info
Developer | promz |
Plugin | RSS Post Importer |
Version | 2.0.17 |
Comparing to | |
See all releases |
Code changes from version 2.0.16 to 2.0.17
- app/assets/css/style.css +0 -5
- app/classes/admin/class-rss-pi-stats.php +47 -70
- app/classes/import/class-rss-pi-engine.php +4 -4
- index.php +2 -2
- readme.txt +6 -2
app/assets/css/style.css
CHANGED
@@ -83,9 +83,4 @@ div.category_container,div.tags_container{
|
|
83 |
|
84 |
.rss_filter_heading {
|
85 |
font-weight: bold;
|
86 |
-
}
|
87 |
-
|
88 |
-
.rss_no_data_available {
|
89 |
-
padding: 20px;
|
90 |
-
text-align: center;
|
91 |
}
|
83 |
|
84 |
.rss_filter_heading {
|
85 |
font-weight: bold;
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
app/classes/admin/class-rss-pi-stats.php
CHANGED
@@ -52,34 +52,20 @@ if(!class_exists("Rss_pi_stats")) {
|
|
52 |
google.setOnLoadCallback(drawChart);
|
53 |
|
54 |
function drawChart() {
|
55 |
-
|
56 |
-
<?php
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
$this->draw_line_charts_js($line_feeds_data , $feeds );
|
61 |
-
$this->draw_pie_chart_js($pie_feeds_data , $feeds );
|
62 |
-
$this->draw_bar_chart_js($bar_feeds_data , $feeds );
|
63 |
-
|
64 |
-
}
|
65 |
-
?>
|
66 |
|
67 |
|
68 |
}
|
69 |
|
70 |
</script>
|
71 |
-
|
72 |
-
<?php
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
echo '<div class="rss_pi_stat_div" id="rsspi_chart_bar" style=""></div>';
|
78 |
-
}
|
79 |
-
else {
|
80 |
-
echo "<div class='rss_no_data_available'>No data avaibale to be shown.</div>";
|
81 |
-
}
|
82 |
-
?>
|
83 |
<?php
|
84 |
|
85 |
|
@@ -98,22 +84,17 @@ if(!class_exists("Rss_pi_stats")) {
|
|
98 |
|
99 |
$data = array();
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
$feedurl = $feed["url"];
|
106 |
-
foreach($dates as $date) {
|
107 |
|
108 |
-
|
109 |
-
|
110 |
|
111 |
-
}
|
112 |
}
|
113 |
-
|
114 |
}
|
115 |
|
116 |
-
|
117 |
return $data;
|
118 |
|
119 |
}
|
@@ -211,7 +192,6 @@ if(!class_exists("Rss_pi_stats")) {
|
|
211 |
<?php
|
212 |
|
213 |
$feednames = "";
|
214 |
-
|
215 |
foreach($feeds["feeds"] as $feed ) {
|
216 |
$feednames .= "'".$feed["name"]."', ";
|
217 |
}
|
@@ -302,44 +282,41 @@ if(!class_exists("Rss_pi_stats")) {
|
|
302 |
$data = array();
|
303 |
|
304 |
//pre($feeds); exit;
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
$domain = $this->get_domain($feed["url"]);
|
312 |
-
|
313 |
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
),
|
329 |
-
|
330 |
-
array(
|
331 |
-
'key' => "rss_pi_source_url",
|
332 |
-
'value' => $domain,
|
333 |
-
'compare' => 'LIKE',
|
334 |
-
),
|
335 |
-
),
|
336 |
|
337 |
-
|
338 |
-
|
339 |
|
340 |
-
|
341 |
-
|
342 |
-
}
|
343 |
}
|
344 |
|
345 |
return $data;
|
@@ -425,8 +402,8 @@ if(!class_exists("Rss_pi_stats")) {
|
|
425 |
<div class="rss_pi_stats_date">
|
426 |
<div class="rss_filter_heading">Filter results:</div>
|
427 |
<hr>
|
428 |
-
<label>From: <input type="text" id="from_date" name="rss_from_date" value
|
429 |
-
<label>Till: <input type="text" id="till_date" name="rss_till_date" value
|
430 |
<input type="submit" name="rss_filter_stats" class="button button-primary button-large " value="Filter">
|
431 |
<br>
|
432 |
</div>
|
52 |
google.setOnLoadCallback(drawChart);
|
53 |
|
54 |
function drawChart() {
|
55 |
+
<?php $this->draw_line_charts_js($line_feeds_data , $feeds ); ?>
|
56 |
+
<?php $this->draw_pie_chart_js($pie_feeds_data , $feeds ); ?>
|
57 |
+
<?php $this->draw_bar_chart_js($bar_feeds_data , $feeds ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
|
60 |
}
|
61 |
|
62 |
</script>
|
63 |
+
|
64 |
+
<?php $this->show_date_pickers();?>
|
65 |
+
<div class="rss_pi_stat_div" id="rsspi_chart_line" style=""></div>
|
66 |
+
<div class="rss_pi_stat_div" id="rsspi_chart_pie" style=""></div>
|
67 |
+
<div class="rss_pi_stat_div" id="rsspi_chart_bar" style=""></div>
|
68 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
<?php
|
70 |
|
71 |
|
84 |
|
85 |
$data = array();
|
86 |
|
87 |
+
foreach($feeds["feeds"] as $feed) {
|
88 |
+
$feedname = $feed["name"];
|
89 |
+
$feedurl = $feed["url"];
|
90 |
+
foreach($dates as $date) {
|
|
|
|
|
91 |
|
92 |
+
$key = date("d-m-Y", $date);
|
93 |
+
$data[$key][$feedname] = $this->get_feedcount_for($feedurl , $date );
|
94 |
|
|
|
95 |
}
|
|
|
96 |
}
|
97 |
|
|
|
98 |
return $data;
|
99 |
|
100 |
}
|
192 |
<?php
|
193 |
|
194 |
$feednames = "";
|
|
|
195 |
foreach($feeds["feeds"] as $feed ) {
|
196 |
$feednames .= "'".$feed["name"]."', ";
|
197 |
}
|
282 |
$data = array();
|
283 |
|
284 |
//pre($feeds); exit;
|
285 |
+
foreach($feeds["feeds"] as $feed) {
|
286 |
+
|
287 |
+
$data[$feed["name"]] = 0;
|
288 |
+
|
289 |
+
$domain = $this->get_domain($feed["url"]);
|
290 |
+
|
|
|
|
|
291 |
|
292 |
+
$args = array(
|
293 |
+
"date_query" => array(
|
294 |
+
"after" => array(
|
295 |
+
"year" => $s_year,
|
296 |
+
"month" => $s_month,
|
297 |
+
"day" => $s_day,
|
298 |
+
),
|
299 |
+
"before" => array(
|
300 |
+
"year" => $e_year,
|
301 |
+
"month" => $e_month,
|
302 |
+
"day" => $e_day,
|
303 |
+
),
|
304 |
+
'inclusive' => true,
|
305 |
|
306 |
+
),
|
307 |
+
'meta_query' => array(
|
308 |
+
array(
|
309 |
+
'key' => "rss_pi_source_url",
|
310 |
+
'value' => $domain,
|
311 |
+
'compare' => 'LIKE',
|
312 |
),
|
313 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
|
315 |
+
'posts_per_page' => -1,
|
316 |
+
);
|
317 |
|
318 |
+
$posts = get_posts($args);
|
319 |
+
$data[$feed["name"]] = count($posts);
|
|
|
320 |
}
|
321 |
|
322 |
return $data;
|
402 |
<div class="rss_pi_stats_date">
|
403 |
<div class="rss_filter_heading">Filter results:</div>
|
404 |
<hr>
|
405 |
+
<label>From: <input type="text" id="from_date" name="rss_from_date" value=<?php echo (isset($_POST["rss_from_date"]))? $_POST["rss_from_date"] : ""; ?> /> </label>
|
406 |
+
<label>Till: <input type="text" id="till_date" name="rss_till_date" value=<?php echo (isset($_POST["rss_till_date"]))? $_POST["rss_till_date"] : ""; ?> /> </label>
|
407 |
<input type="submit" name="rss_filter_stats" class="button button-primary button-large " value="Filter">
|
408 |
<br>
|
409 |
</div>
|
app/classes/import/class-rss-pi-engine.php
CHANGED
@@ -648,8 +648,8 @@ class rssPIEngine {
|
|
648 |
|
649 |
$content = $post["post_content"];
|
650 |
|
651 |
-
// Added header for UTF-8 encoding for imported feeds characters
|
652 |
-
header( 'Content-Type: text/html; charset=UTF-8' );
|
653 |
|
654 |
// catch base url
|
655 |
if (preg_match('/src="\//ui', $content)) {
|
@@ -758,7 +758,7 @@ class rssPIEngine {
|
|
758 |
//check if the post has already been imported and then deleted
|
759 |
$rss_pi_imported_posts = get_option("rss_pi_imported_posts");
|
760 |
|
761 |
-
if(in_array( $permalink , $rss_pi_imported_posts)) {
|
762 |
$post_exists = 1;
|
763 |
}
|
764 |
|
@@ -860,7 +860,7 @@ class rssPIEngine {
|
|
860 |
// initializing DOMDocument to modify the img source
|
861 |
$dom = new DOMDocument;
|
862 |
libxml_use_internal_errors(true);
|
863 |
-
$dom->loadHTML(
|
864 |
$xpath = new DOMXPath( $dom );
|
865 |
libxml_clear_errors();
|
866 |
|
648 |
|
649 |
$content = $post["post_content"];
|
650 |
|
651 |
+
// // Added header for UTF-8 encoding for imported feeds characters
|
652 |
+
// header( 'Content-Type: text/html; charset=UTF-8' );
|
653 |
|
654 |
// catch base url
|
655 |
if (preg_match('/src="\//ui', $content)) {
|
758 |
//check if the post has already been imported and then deleted
|
759 |
$rss_pi_imported_posts = get_option("rss_pi_imported_posts");
|
760 |
|
761 |
+
if(is_array($rss_pi_imported_posts) && in_array( $permalink , $rss_pi_imported_posts)) {
|
762 |
$post_exists = 1;
|
763 |
}
|
764 |
|
860 |
// initializing DOMDocument to modify the img source
|
861 |
$dom = new DOMDocument;
|
862 |
libxml_use_internal_errors(true);
|
863 |
+
$dom->loadHTML( '<?xml encoding="utf-8" ?>'.$post_content );
|
864 |
$xpath = new DOMXPath( $dom );
|
865 |
libxml_clear_errors();
|
866 |
|
index.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Plugin URI: https://wordpress.org/plugins/rss-post-importer/
|
6 |
Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
|
7 |
Author: feedsapi
|
8 |
-
Version: 2.0.
|
9 |
Author URI: https://www.feedsapi.org/
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -28,7 +28,7 @@ if (!defined('RSS_PI_BASENAME')) {
|
|
28 |
}
|
29 |
|
30 |
if (!defined('RSS_PI_VERSION')) {
|
31 |
-
define('RSS_PI_VERSION', '2.0.
|
32 |
}
|
33 |
|
34 |
if (!defined('RSS_PI_LOG_PATH')) {
|
5 |
Plugin URI: https://wordpress.org/plugins/rss-post-importer/
|
6 |
Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
|
7 |
Author: feedsapi
|
8 |
+
Version: 2.0.17
|
9 |
Author URI: https://www.feedsapi.org/
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
28 |
}
|
29 |
|
30 |
if (!defined('RSS_PI_VERSION')) {
|
31 |
+
define('RSS_PI_VERSION', '2.0.17');
|
32 |
}
|
33 |
|
34 |
if (!defined('RSS_PI_LOG_PATH')) {
|
readme.txt
CHANGED
@@ -12,7 +12,7 @@ Requires at least: 3.5
|
|
12 |
|
13 |
Tested up to: 4.1
|
14 |
|
15 |
-
Stable tag: 2.0.
|
16 |
|
17 |
License: GPLv2 or later
|
18 |
|
@@ -84,6 +84,7 @@ Not only does this WordPress RSS Aggregator Plugin import a snippet of the rss f
|
|
84 |
|
85 |
* Block search indexing to prevent your content from appearing in search results.
|
86 |
|
|
|
87 |
|
88 |
|
89 |
**Premium Features include:**
|
@@ -163,10 +164,13 @@ WP-o-Matic , WP-o-Matic, RSSImport, FeedWordPress, Syndicate Press, FeedWeb, RSS
|
|
163 |
|
164 |
== Change Log ==
|
165 |
|
|
|
|
|
|
|
|
|
166 |
= Version 2.0.16 =
|
167 |
|
168 |
* Added advanced stats
|
169 |
-
* Fixed encoding issues
|
170 |
|
171 |
|
172 |
= Version 2.0.15 =
|
12 |
|
13 |
Tested up to: 4.1
|
14 |
|
15 |
+
Stable tag: 2.0.17
|
16 |
|
17 |
License: GPLv2 or later
|
18 |
|
84 |
|
85 |
* Block search indexing to prevent your content from appearing in search results.
|
86 |
|
87 |
+
* **Advanced Statistics**: Piechart for feeds items distribution , Bar charts for posts and much more advanced charts
|
88 |
|
89 |
|
90 |
**Premium Features include:**
|
164 |
|
165 |
== Change Log ==
|
166 |
|
167 |
+
= Version 2.0.17 =
|
168 |
+
* Bug Fixing: Encoding Bugs for Arabic, Russian, German and other languages and special characters fixed
|
169 |
+
|
170 |
+
|
171 |
= Version 2.0.16 =
|
172 |
|
173 |
* Added advanced stats
|
|
|
174 |
|
175 |
|
176 |
= Version 2.0.15 =
|