Version Description
Download this release
Release Info
Developer | Bueltge |
Plugin | RSSImport |
Version | 4.4.10 |
Comparing to | |
See all releases |
Code changes from version 4.4.9 to 4.4.10
- readme.txt +0 -2
- rssimport.php +170 -148
readme.txt
CHANGED
@@ -13,8 +13,6 @@ Import and display Feeds in your blog, use PHP or the Shortcode.
|
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
= This Project was discontinued. If an coder will develop this plugin, please send me an mail. =
|
17 |
-
|
18 |
Import and display Feeds in your blog, use PHP, a Widget or the Shortcode. The plugin use the standards of WordPress, non extra library; use [MagpieRSS](http://magpierss.sourceforge.net/) or [SimplePie](http://simplepie.org/) for parse feeds.
|
19 |
|
20 |
Use following code with a PHP-Plugin or in a template, example `sidebar.php` or `single.php`, for WordPress:
|
13 |
|
14 |
== Description ==
|
15 |
|
|
|
|
|
16 |
Import and display Feeds in your blog, use PHP, a Widget or the Shortcode. The plugin use the standards of WordPress, non extra library; use [MagpieRSS](http://magpierss.sourceforge.net/) or [SimplePie](http://simplepie.org/) for parse feeds.
|
17 |
|
18 |
Use following code with a PHP-Plugin or in a template, example `sidebar.php` or `single.php`, for WordPress:
|
rssimport.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package WP-RSSImport
|
4 |
* @author Frank Bültge
|
5 |
-
* @version 4.4.
|
6 |
*/
|
7 |
|
8 |
/*
|
@@ -12,10 +12,10 @@ Text Domain: rssimport
|
|
12 |
Domain Path: /languages
|
13 |
Description: Import and display Feeds in your blog, use the function RSSImport(), a Widget or Shortcode [RSSImport]. Please see the new <a href="http://wordpress.org/extend/plugins/rss-import/">possibilities</a>.
|
14 |
Author: Frank Bültge
|
15 |
-
Version: 4.4.
|
16 |
License: GPL
|
17 |
Author URI: http://bueltge.de/
|
18 |
-
Last change:
|
19 |
*/
|
20 |
|
21 |
/*
|
@@ -81,6 +81,7 @@ if ( !function_exists('esc_url') ) {
|
|
81 |
}
|
82 |
}
|
83 |
|
|
|
84 |
// cache and error report
|
85 |
//define('MAGPIE_CACHE_ON', FALSE); // Cache off
|
86 |
if ( !defined('MAGPIE_CACHE_AGE') )
|
@@ -89,24 +90,36 @@ if ( !defined('MAGPIE_CACHE_AGE') )
|
|
89 |
//error_reporting(E_ALL);
|
90 |
|
91 |
function RSSImport(
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
$display = (int) $display;
|
111 |
$displaydescriptions = (int) $displaydescriptions;
|
112 |
$html = (int) $html;
|
@@ -322,6 +335,8 @@ function RSSImport(
|
|
322 |
$echo = wptexturize($before_noitems . $noitems . $after_noitems);
|
323 |
|
324 |
} else {
|
|
|
|
|
325 |
$echo = wptexturize($before_error . $error . $rss->ERROR . $after_error);
|
326 |
}
|
327 |
|
@@ -360,8 +375,8 @@ function isodec($s_String) {
|
|
360 |
function all_convert($s_String) {
|
361 |
|
362 |
// Array for entities
|
363 |
-
$umlaute = array('„','“','–',' \"','–','—','‘','’','“','”','„','•','…' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�',utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),chr(128),chr(129),chr(130),chr(131),chr(132),chr(133),chr(134),chr(135),chr(136),chr(137),chr(138),chr(139),chr(140),chr(141),chr(142),chr(143),chr(144),chr(145),chr(146),chr(147),chr(148),chr(149),chr(150),chr(151),chr(152),chr(153),chr(154),chr(155),chr(156),chr(157),chr(158),chr(159),chr(160),chr(161),chr(162),chr(163),chr(164),chr(165),chr(166),chr(167),chr(168),chr(169),chr(170),chr(171),chr(172),chr(173),chr(174),chr(175),chr(176),chr(177),chr(178),chr(179),chr(180),chr(181),chr(182),chr(183),chr(184),chr(185),chr(186),chr(187),chr(188),chr(189),chr(190),chr(191),chr(192),chr(193),chr(194),chr(195),chr(196),chr(197),chr(198),chr(199),chr(200),chr(201),chr(202),chr(203),chr(204),chr(205),chr(206),chr(207),chr(208),chr(209),chr(210),chr(211),chr(212),chr(213),chr(214),chr(215),chr(216),chr(217),chr(218),chr(219),chr(220),chr(221),chr(222),chr(223),chr(224),chr(225),chr(226),chr(227),chr(228),chr(229),chr(230),chr(231),chr(232),chr(233),chr(234),chr(235),chr(236),chr(237),chr(238),chr(239),chr(240),chr(241),chr(242),chr(243),chr(244),chr(245),chr(246),chr(247),chr(248),chr(249),chr(250),chr(251),chr(252),chr(253),chr(254),chr(255),chr(256));
|
364 |
-
$htmlcode = array('„','“','–',' "','–','—','‘','’','“','”','„','•' ,'…','€','‚','ƒ','„','…','†','‡','ˆ','‰','Š','‹','Œ','Ž','‘','’','“','”','•','–','—','˜','™','š','›','œ','ž','Ÿ','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','®','¯','°','±','²','³','´','µ','¶','·','¸','&supl;','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ','€','‚','ƒ','„','…','†','‡','ˆ','‰','Š','‹','Œ','Ž','‘','’','“','”','•','–','—','˜','™','š','›','œ','ž','Ÿ','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','®','¯','°','±','²','³','´','µ','¶','·','¸','&supl;','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ','€','','‚','ƒ','„','…','†','‡','ˆ','‰','Š','‹','Œ','','Ž','','','‘','’','“','”','•','–','—','˜','™','š','›','œ','','ž','Ÿ',' ','¡','¡','¡','¡','¥','¦','§','¨','©','ª','«','¬','�­','®','¯','°','±','²','³','´','µ','¶','·','¸','&supl;','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ');
|
365 |
//$s_String = str_replace($umlaute, $htmlcode, $s_String);
|
366 |
if ( version_compare(phpversion(), '5.0.0', '>=') )
|
367 |
$s_String = utf8_encode( html_entity_decode( str_replace($umlaute, $htmlcode, $s_String) ) );
|
@@ -435,46 +450,49 @@ function RSSImport_end_on_word($str) {
|
|
435 |
}
|
436 |
|
437 |
function RSSImport_Shortcode($atts) {
|
438 |
-
extract(
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
|
|
|
|
|
|
478 |
//var_dump($atts);
|
479 |
|
480 |
$display = intval($display);
|
@@ -510,25 +528,25 @@ function RSSImport_Shortcode($atts) {
|
|
510 |
$use_simplepie = intval($use_simplepie);
|
511 |
|
512 |
$return = RSSImport(
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
return $return;
|
533 |
}
|
534 |
|
@@ -559,7 +577,7 @@ function RSSImport_insert_button() {
|
|
559 |
<script type="text/javascript">
|
560 |
//<![CDATA[
|
561 |
var length = edButtons.length;
|
562 |
-
edButtons[length] = new edButton(\'RSSImport\', \'$context\', \'[RSSImport display="5" feedurl="http://feedurl.com/" before_desc="<br />" displaydescriptions="TRUE" after_desc=" " html="FALSE" truncatedescchar="200" truncatedescstring=" ... " truncatetitlechar=" " truncatetitlestring=" ... " before_date=" <small>" date="FALSE" after_date="</small>" date_format="" before_creator=" <small>" creator="FALSE" after_creator="</small>" start_items="<ul>" end_items="</ul>" start_item="<li>" end_item="</li>" target="" rel="" charsetscan="FALSE" debug="FALSE" before_noitems="<p>" noitems="No items, feed is empty." after_noitems="</p>" before_error="<p>" error="Error: Feed has a error or is not valid" after_error="</p>" paging="FALSE" prev_paging_link="« Previous" next_paging_link="Next »" prev_paging_title="more items" next_paging_title="more items" use_simplepie="FALSE"]\', \'\', \'\');
|
563 |
function RSSImport_tag(id) {
|
564 |
id = id.replace(/RSSImport_/, \'\');
|
565 |
edInsertTag(edCanvas, id);
|
@@ -912,16 +930,16 @@ if ( class_exists('WP_Widget') ) {
|
|
912 |
$charsetscan = empty($instance['charsetscan']) ? '0' : $instance['charsetscan'];
|
913 |
$debug = empty($instance['debug']) ? '0' : $instance['debug'];
|
914 |
$before_noitems = empty($instance['before_noitems']) ? '<p>' : $instance['before_noitems'];
|
915 |
-
$noitems = empty($instance['noitems']) ? 'No items, feed is empty.' : $instance['noitems'];
|
916 |
$after_noitems = empty($instance['after_noitems']) ? '</p>' : $instance['after_noitems'];
|
917 |
$before_error = empty($instance['before_error']) ? '<p>' : $instance['before_error'];
|
918 |
-
$error = empty($instance['error']) ? 'Error: Feed has a error or is not valid' : $instance['error'];
|
919 |
$after_error = empty($instance['after_error']) ? '</p>' : $instance['after_error'];
|
920 |
$paging = empty($instance['paging']) ? '0' : $instance['paging'];
|
921 |
-
$prev_paging_link = empty($instance['prev_paging_link']) ? '« Previous' : $instance['prev_paging_link'];
|
922 |
-
$next_paging_link = empty($instance['next_paging_link']) ? 'Next »' : $instance['next_paging_link'];
|
923 |
-
$prev_paging_title = empty($instance['prev_paging_title']) ? 'more items' : $instance['prev_paging_title'];
|
924 |
-
$next_paging_title = empty($instance['next_paging_title']) ? 'more items' : $instance['next_paging_title'];
|
925 |
$use_simplepie = empty($instance['use_simplepie']) ? '0' : $instance['use_simplepie'];
|
926 |
$view = empty($instance['view']) ? '1' : $instance['view'];
|
927 |
|
@@ -930,23 +948,23 @@ if ( class_exists('WP_Widget') ) {
|
|
930 |
$title = '<a href="' . $titlelink . '">' . $title . '</a>';
|
931 |
echo $before_title . $title . $after_title;
|
932 |
RSSImport(
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
echo $after_widget;
|
951 |
}
|
952 |
|
@@ -1001,48 +1019,52 @@ if ( class_exists('WP_Widget') ) {
|
|
1001 |
}
|
1002 |
|
1003 |
function form($instance) {
|
1004 |
-
$instance = wp_parse_args(
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
|
|
|
|
|
|
|
|
1046 |
$title = strip_tags($instance['title']);
|
1047 |
$titlelink = esc_url($instance['titlelink']);
|
1048 |
$display = (int) $instance['display'];
|
2 |
/**
|
3 |
* @package WP-RSSImport
|
4 |
* @author Frank Bültge
|
5 |
+
* @version 4.4.10
|
6 |
*/
|
7 |
|
8 |
/*
|
12 |
Domain Path: /languages
|
13 |
Description: Import and display Feeds in your blog, use the function RSSImport(), a Widget or Shortcode [RSSImport]. Please see the new <a href="http://wordpress.org/extend/plugins/rss-import/">possibilities</a>.
|
14 |
Author: Frank Bültge
|
15 |
+
Version: 4.4.10
|
16 |
License: GPL
|
17 |
Author URI: http://bueltge.de/
|
18 |
+
Last change: 11.01.2011
|
19 |
*/
|
20 |
|
21 |
/*
|
81 |
}
|
82 |
}
|
83 |
|
84 |
+
|
85 |
// cache and error report
|
86 |
//define('MAGPIE_CACHE_ON', FALSE); // Cache off
|
87 |
if ( !defined('MAGPIE_CACHE_AGE') )
|
90 |
//error_reporting(E_ALL);
|
91 |
|
92 |
function RSSImport(
|
93 |
+
$display = 5, $feedurl = 'http://bueltge.de/feed/',
|
94 |
+
$before_desc = '',
|
95 |
+
$displaydescriptions = 0,
|
96 |
+
$after_desc = '',
|
97 |
+
$html = 0,
|
98 |
+
$truncatedescchar = 200,
|
99 |
+
$truncatedescstring = ' ... ',
|
100 |
+
$truncatetitlechar = '', $truncatetitlestring = ' ... ',
|
101 |
+
$before_date = ' <small>', $date = 0, $after_date = '</small>', $date_format = '',
|
102 |
+
$before_creator = ' <small>', $creator = 0, $after_creator = '</small>',
|
103 |
+
$start_items = '<ul>', $end_items = '</ul>',
|
104 |
+
$start_item = '<li>', $end_item = '</li>',
|
105 |
+
$target = '',
|
106 |
+
$rel = '',
|
107 |
+
$desc4title = 0,
|
108 |
+
$charsetscan = 0, $debug = 0,
|
109 |
+
$before_noitems = '<p>', $noitems = 'No items, feed is empty.', $after_noitems = '</p>',
|
110 |
+
$before_error = '<p>',
|
111 |
+
$error = 'Error: Feed has a error or is not valid',
|
112 |
+
$after_error = '</p>',
|
113 |
+
$paging = 0,
|
114 |
+
$prev_paging_link = '« Previous', $next_paging_link = 'Next »',
|
115 |
+
$prev_paging_title = 'more items', $next_paging_title = 'more items',
|
116 |
+
$use_simplepie = 1,
|
117 |
+
$view = 1
|
118 |
+
) {
|
119 |
+
|
120 |
+
// replace for yahoo pipes urls
|
121 |
+
$feedurl = str_replace('&', '&', $feedurl);
|
122 |
+
|
123 |
$display = (int) $display;
|
124 |
$displaydescriptions = (int) $displaydescriptions;
|
125 |
$html = (int) $html;
|
335 |
$echo = wptexturize($before_noitems . $noitems . $after_noitems);
|
336 |
|
337 |
} else {
|
338 |
+
if ( empty($rss->ERROR) )
|
339 |
+
$rss->ERROR = NULL;
|
340 |
$echo = wptexturize($before_error . $error . $rss->ERROR . $after_error);
|
341 |
}
|
342 |
|
375 |
function all_convert($s_String) {
|
376 |
|
377 |
// Array for entities
|
378 |
+
$umlaute = array('„','“','–',' \"','–','—','‘','’','“','”','„','•','…' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�',utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),utf8_encode('�'),chr(128),chr(129),chr(130),chr(131),chr(132),chr(133),chr(134),chr(135),chr(136),chr(137),chr(138),chr(139),chr(140),chr(141),chr(142),chr(143),chr(144),chr(145),chr(146),chr(147),chr(148),chr(149),chr(150),chr(151),chr(152),chr(153),chr(154),chr(155),chr(156),chr(157),chr(158),chr(159),chr(160),chr(161),chr(162),chr(163),chr(164),chr(165),chr(166),chr(167),chr(168),chr(169),chr(170),chr(171),chr(172),chr(173),chr(174),chr(175),chr(176),chr(177),chr(178),chr(179),chr(180),chr(181),chr(182),chr(183),chr(184),chr(185),chr(186),chr(187),chr(188),chr(189),chr(190),chr(191),chr(192),chr(193),chr(194),chr(195),chr(196),chr(197),chr(198),chr(199),chr(200),chr(201),chr(202),chr(203),chr(204),chr(205),chr(206),chr(207),chr(208),chr(209),chr(210),chr(211),chr(212),chr(213),chr(214),chr(215),chr(216),chr(217),chr(218),chr(219),chr(220),chr(221),chr(222),chr(223),chr(224),chr(225),chr(226),chr(227),chr(228),chr(229),chr(230),chr(231),chr(232),chr(233),chr(234),chr(235),chr(236),chr(237),chr(238),chr(239),chr(240),chr(241),chr(242),chr(243),chr(244),chr(245),chr(246),chr(247),chr(248),chr(249),chr(250),chr(251),chr(252),chr(253),chr(254),chr(255),chr(256));
|
379 |
+
$htmlcode = array('„','“','–',' "','–','—','‘','’','“','”','„','•' ,'…','€','‚','ƒ','„','…','†','‡','ˆ','‰','Š','‹','Œ','Ž','‘','’','“','”','•','–','—','˜','™','š','›','œ','ž','Ÿ','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','®','¯','°','±','²','³','´','µ','¶','·','¸','&supl;','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ','€','‚','ƒ','„','…','†','‡','ˆ','‰','Š','‹','Œ','Ž','‘','’','“','”','•','–','—','˜','™','š','›','œ','ž','Ÿ','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','®','¯','°','±','²','³','´','µ','¶','·','¸','&supl;','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ','€','','‚','ƒ','„','…','†','‡','ˆ','‰','Š','‹','Œ','','Ž','','','‘','’','“','”','•','–','—','˜','™','š','›','œ','','ž','Ÿ',' ','¡','¡','¡','¡','¥','¦','§','¨','©','ª','«','¬','�­','®','¯','°','±','²','³','´','µ','¶','·','¸','&supl;','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ');
|
380 |
//$s_String = str_replace($umlaute, $htmlcode, $s_String);
|
381 |
if ( version_compare(phpversion(), '5.0.0', '>=') )
|
382 |
$s_String = utf8_encode( html_entity_decode( str_replace($umlaute, $htmlcode, $s_String) ) );
|
450 |
}
|
451 |
|
452 |
function RSSImport_Shortcode($atts) {
|
453 |
+
extract(
|
454 |
+
shortcode_atts( array(
|
455 |
+
'display' => 5,
|
456 |
+
'feedurl' => 'http://bueltge.de/feed/',
|
457 |
+
'before_desc' => '<br />',
|
458 |
+
'displaydescriptions' => 0,
|
459 |
+
'after_desc' => '',
|
460 |
+
'html' => 0,
|
461 |
+
'truncatedescchar' => 200,
|
462 |
+
'truncatedescstring' => ' ... ',
|
463 |
+
'truncatetitlechar' => '',
|
464 |
+
'truncatetitlestring' => ' ... ',
|
465 |
+
'before_date' => ' <small>',
|
466 |
+
'date' => 0,
|
467 |
+
'after_date' => '</small>',
|
468 |
+
'date_format' => '',
|
469 |
+
'before_creator' => ' <small>',
|
470 |
+
'creator' => 0,
|
471 |
+
'after_creator' => '</small>',
|
472 |
+
'start_items' => '<ul>',
|
473 |
+
'end_items' => '</ul>',
|
474 |
+
'start_item' => '<li>',
|
475 |
+
'end_item' => '</li>',
|
476 |
+
'target' => '',
|
477 |
+
'rel' => '',
|
478 |
+
'desc4title' => 0,
|
479 |
+
'charsetscan' => 0,
|
480 |
+
'debug' => 0,
|
481 |
+
'before_noitems' => '<p>',
|
482 |
+
'noitems' => __('No items, feed is empty.', FB_RSSI_TEXTDOMAIN ),
|
483 |
+
'after_noitems' => '</p>',
|
484 |
+
'before_error' => '<p>',
|
485 |
+
'error' => __('Error: Feed has a error or is not valid', FB_RSSI_TEXTDOMAIN ),
|
486 |
+
'after_error' => '</p>',
|
487 |
+
'paging' => 0,
|
488 |
+
'prev_paging_link' => __( '« Previous', FB_RSSI_TEXTDOMAIN ),
|
489 |
+
'next_paging_link' => __( 'Next »', FB_RSSI_TEXTDOMAIN ),
|
490 |
+
'prev_paging_title' => __( 'more items', FB_RSSI_TEXTDOMAIN ),
|
491 |
+
'next_paging_title' => __( 'more items', FB_RSSI_TEXTDOMAIN ),
|
492 |
+
'use_simplepie' => 0,
|
493 |
+
'view' => 0
|
494 |
+
), $atts)
|
495 |
+
);
|
496 |
//var_dump($atts);
|
497 |
|
498 |
$display = intval($display);
|
528 |
$use_simplepie = intval($use_simplepie);
|
529 |
|
530 |
$return = RSSImport(
|
531 |
+
$display, $feedurl,
|
532 |
+
$before_desc, $displaydescriptions, $after_desc, $html,
|
533 |
+
$truncatedescchar, $truncatedescstring,
|
534 |
+
$truncatetitlechar, $truncatetitlestring,
|
535 |
+
$before_date, $date, $after_date, $date_format,
|
536 |
+
$before_creator, $creator, $after_creator,
|
537 |
+
$start_items, $end_items,
|
538 |
+
$start_item, $end_item,
|
539 |
+
$target,
|
540 |
+
$rel,
|
541 |
+
$desc4title,
|
542 |
+
$charsetscan, $debug,
|
543 |
+
$before_noitems, $noitems, $after_noitems,
|
544 |
+
$before_error, $error, $after_error,
|
545 |
+
$paging, $prev_paging_link, $next_paging_link, $prev_paging_title, $next_paging_title,
|
546 |
+
$use_simplepie,
|
547 |
+
$view
|
548 |
+
);
|
549 |
+
|
550 |
return $return;
|
551 |
}
|
552 |
|
577 |
<script type="text/javascript">
|
578 |
//<![CDATA[
|
579 |
var length = edButtons.length;
|
580 |
+
edButtons[length] = new edButton(\'RSSImport\', \'$context\', \'[RSSImport display="5" feedurl="http://feedurl.com/" before_desc="<br />" displaydescriptions="TRUE" after_desc=" " html="FALSE" truncatedescchar="200" truncatedescstring=" ... " truncatetitlechar=" " truncatetitlestring=" ... " before_date=" <small>" date="FALSE" after_date="</small>" date_format="" before_creator=" <small>" creator="FALSE" after_creator="</small>" start_items="<ul>" end_items="</ul>" start_item="<li>" end_item="</li>" target="" rel="" desc4title="" charsetscan="FALSE" debug="FALSE" before_noitems="<p>" noitems="No items, feed is empty." after_noitems="</p>" before_error="<p>" error="Error: Feed has a error or is not valid" after_error="</p>" paging="FALSE" prev_paging_link="« Previous" next_paging_link="Next »" prev_paging_title="more items" next_paging_title="more items" use_simplepie="FALSE"]\', \'\', \'\');
|
581 |
function RSSImport_tag(id) {
|
582 |
id = id.replace(/RSSImport_/, \'\');
|
583 |
edInsertTag(edCanvas, id);
|
930 |
$charsetscan = empty($instance['charsetscan']) ? '0' : $instance['charsetscan'];
|
931 |
$debug = empty($instance['debug']) ? '0' : $instance['debug'];
|
932 |
$before_noitems = empty($instance['before_noitems']) ? '<p>' : $instance['before_noitems'];
|
933 |
+
$noitems = empty($instance['noitems']) ? __('No items, feed is empty.', FB_RSSI_TEXTDOMAIN) : $instance['noitems'];
|
934 |
$after_noitems = empty($instance['after_noitems']) ? '</p>' : $instance['after_noitems'];
|
935 |
$before_error = empty($instance['before_error']) ? '<p>' : $instance['before_error'];
|
936 |
+
$error = empty($instance['error']) ? __('Error: Feed has a error or is not valid', FB_RSSI_TEXTDOMAIN) : $instance['error'];
|
937 |
$after_error = empty($instance['after_error']) ? '</p>' : $instance['after_error'];
|
938 |
$paging = empty($instance['paging']) ? '0' : $instance['paging'];
|
939 |
+
$prev_paging_link = empty($instance['prev_paging_link']) ? __('« Previous', FB_RSSI_TEXTDOMAIN) : $instance['prev_paging_link'];
|
940 |
+
$next_paging_link = empty($instance['next_paging_link']) ? __('Next »', FB_RSSI_TEXTDOMAIN) : $instance['next_paging_link'];
|
941 |
+
$prev_paging_title = empty($instance['prev_paging_title']) ? __('more items', FB_RSSI_TEXTDOMAIN) : $instance['prev_paging_title'];
|
942 |
+
$next_paging_title = empty($instance['next_paging_title']) ? __('more items', FB_RSSI_TEXTDOMAIN) : $instance['next_paging_title'];
|
943 |
$use_simplepie = empty($instance['use_simplepie']) ? '0' : $instance['use_simplepie'];
|
944 |
$view = empty($instance['view']) ? '1' : $instance['view'];
|
945 |
|
948 |
$title = '<a href="' . $titlelink . '">' . $title . '</a>';
|
949 |
echo $before_title . $title . $after_title;
|
950 |
RSSImport(
|
951 |
+
$display, $feedurl,
|
952 |
+
$before_desc, $displaydescriptions, $after_desc, $html, $truncatedescchar, $truncatedescstring,
|
953 |
+
$truncatetitlechar, $truncatetitlestring,
|
954 |
+
$before_date, $date, $after_date, $date_format,
|
955 |
+
$before_creator, $creator, $after_creator,
|
956 |
+
$start_items, $end_items,
|
957 |
+
$start_item, $end_item,
|
958 |
+
$target,
|
959 |
+
$rel,
|
960 |
+
$desc4title,
|
961 |
+
$charsetscan, $debug,
|
962 |
+
$before_noitems, $noitems, $after_noitems,
|
963 |
+
$before_error, $error, $after_error,
|
964 |
+
$paging, $prev_paging_link, $next_paging_link, $prev_paging_title, $next_paging_title,
|
965 |
+
$use_simplepie,
|
966 |
+
$view
|
967 |
+
);
|
968 |
echo $after_widget;
|
969 |
}
|
970 |
|
1019 |
}
|
1020 |
|
1021 |
function form($instance) {
|
1022 |
+
$instance = wp_parse_args(
|
1023 |
+
(array) $instance, array(
|
1024 |
+
'title' => '',
|
1025 |
+
'titlelink' => '',
|
1026 |
+
'display' => 5,
|
1027 |
+
'feedurl' => 'http://bueltge.de/feed/',
|
1028 |
+
'before_desc' => '',
|
1029 |
+
'displaydescriptions' => 0,
|
1030 |
+
'after_desc' => '',
|
1031 |
+
'html' => 0,
|
1032 |
+
'truncatedescchar' => 200,
|
1033 |
+
'truncatedescstring' => ' ... ',
|
1034 |
+
'truncatetitlechar' => '',
|
1035 |
+
'truncatetitlestring' => ' ... ',
|
1036 |
+
'before_date' => ' <small>',
|
1037 |
+
'date' => 0,
|
1038 |
+
'after_date' => '</small>',
|
1039 |
+
'date_format' => '',
|
1040 |
+
'before_creator' => ' <small>',
|
1041 |
+
'creator' => 0,
|
1042 |
+
'after_creator' => '</small>',
|
1043 |
+
'start_items' => '<ul>',
|
1044 |
+
'end_items' => '</ul>',
|
1045 |
+
'start_item' => '<li>',
|
1046 |
+
'end_item' => '</li>',
|
1047 |
+
'target' => '',
|
1048 |
+
'rel' => '',
|
1049 |
+
'desc4title' => 0,
|
1050 |
+
'charsetscan' => 0,
|
1051 |
+
'debug' => 0,
|
1052 |
+
'view' => 1,
|
1053 |
+
'before_noitems' => '<p>',
|
1054 |
+
'noitems' => __('No items, feed is empty.', FB_RSSI_TEXTDOMAIN),
|
1055 |
+
'after_noitems' => '</p>',
|
1056 |
+
'before_error' => '<p>',
|
1057 |
+
'error' => __('Error: Feed has a error or is not valid', FB_RSSI_TEXTDOMAIN),
|
1058 |
+
'after_error' => '</p>',
|
1059 |
+
'paging' => 0,
|
1060 |
+
'prev_paging_link' => __('« Previous', FB_RSSI_TEXTDOMAIN),
|
1061 |
+
'next_paging_link' => __('Next »', FB_RSSI_TEXTDOMAIN),
|
1062 |
+
'prev_paging_title' => __('more items', FB_RSSI_TEXTDOMAIN),
|
1063 |
+
'next_paging_title' => __('more items', FB_RSSI_TEXTDOMAIN),
|
1064 |
+
'use_simplepie' => 0
|
1065 |
+
)
|
1066 |
+
);
|
1067 |
+
|
1068 |
$title = strip_tags($instance['title']);
|
1069 |
$titlelink = esc_url($instance['titlelink']);
|
1070 |
$display = (int) $instance['display'];
|