RSSImport - Version 4.4.10

Version Description

Download this release

Release Info

Developer Bueltge
Plugin Icon wp plugin RSSImport
Version 4.4.10
Comparing to
See all releases

Code changes from version 4.4.9 to 4.4.10

Files changed (2) hide show
  1. readme.txt +0 -2
  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.9
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&uuml;ltge
15
- Version: 4.4.9
16
  License: GPL
17
  Author URI: http://bueltge.de/
18
- Last change: 14.09.2010 15:07:32
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
- $display = 5, $feedurl = 'http://bueltge.de/feed/',
93
- $before_desc = '', $displaydescriptions = 0, $after_desc = '', $html = 0, $truncatedescchar = 200, $truncatedescstring = ' ... ',
94
- $truncatetitlechar = '', $truncatetitlestring = ' ... ',
95
- $before_date = ' <small>', $date = 0, $after_date = '</small>', $date_format = '',
96
- $before_creator = ' <small>', $creator = 0, $after_creator = '</small>',
97
- $start_items = '<ul>', $end_items = '</ul>',
98
- $start_item = '<li>', $end_item = '</li>',
99
- $target = '',
100
- $rel = '',
101
- $desc4title = 0,
102
- $charsetscan = 0, $debug = 0,
103
- $before_noitems = '<p>', $noitems = 'No items, feed is empty.', $after_noitems = '</p>',
104
- $before_error = '<p>', $error = 'Error: Feed has a error or is not valid', $after_error = '</p>',
105
- $paging = 0, $prev_paging_link = '&laquo; Previous', $next_paging_link = 'Next &raquo;', $prev_paging_title = 'more items', $next_paging_title = 'more items',
106
- $use_simplepie = 1,
107
- $view = 1
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('„','“','–',' \&#34;','&#8211;','&#8212;','&#8216;','&#8217;','&#8220;','&#8221;','&#8222;','&#8226;','&#8230;' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�',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('&bdquo;','&ldquo;','&ndash;',' &#34;','&ndash;','&mdash;','&lsquo;','&rsquo;','&ldquo;','&rdquo;','&bdquo;','&bull;' ,'&hellip;','&euro;','&sbquo;','&fnof;','&bdquo;','&hellip;','&dagger;','&Dagger;','&circ;','&permil;','&Scaron;','&lsaquo;','&OElig;','&#x017D;','&lsquo;','&rsquo;','&ldquo;','&rdquo;','&bull;','&ndash;','&mdash;','&tilde;','&trade;','&scaron;','&rsaquo;','&oelig;','&#x017E;','&Yuml;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&supl;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&euro;','&sbquo;','&fnof;','&bdquo;','&hellip;','&dagger;','&Dagger;','&circ;','&permil;','&Scaron;','&lsaquo;','&OElig;','&#x017D;','&lsquo;','&rsquo;','&ldquo;','&rdquo;','&bull;','&ndash;','&mdash;','&tilde;','&trade;','&scaron;','&rsaquo;','&oelig;','&#x017E;','&Yuml;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&supl;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&euro;','','&sbquo;','&fnof;','&bdquo;','&hellip;','&dagger;','&Dagger;','&circ;','&permil;','&Scaron;','&lsaquo;','&OElig;','','&#x017D;','','','&lsquo;','&rsquo;','&ldquo;','&rdquo;','&bull;','&ndash;','&mdash;','&tilde;','&trade;','&scaron;','&rsaquo;','&oelig;','','&#x017E;','&Yuml;','&nbsp;','&iexcl;','&iexcl;','&iexcl;','&iexcl;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','�&shy;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&supl;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;');
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( shortcode_atts( array(
439
- 'display' => 5,
440
- 'feedurl' => 'http://bueltge.de/feed/',
441
- 'before_desc' => '<br />',
442
- 'displaydescriptions' => 0,
443
- 'after_desc' => '',
444
- 'html' => 0,
445
- 'truncatedescchar' => 200,
446
- 'truncatedescstring' => ' ... ',
447
- 'truncatetitlechar' => '',
448
- 'truncatetitlestring' => ' ... ',
449
- 'before_date' => ' <small>',
450
- 'date' => 0,
451
- 'after_date' => '</small>',
452
- 'date_format' => '',
453
- 'before_creator' => ' <small>',
454
- 'creator' => 0,
455
- 'after_creator' => '</small>',
456
- 'start_items' => '<ul>',
457
- 'end_items' => '</ul>',
458
- 'start_item' => '<li>',
459
- 'end_item' => '</li>',
460
- 'target' => '',
461
- 'rel' => '',
462
- 'charsetscan' => 0,
463
- 'debug' => 0,
464
- 'before_noitems' => '<p>',
465
- 'noitems' => __('No items, feed is empty.', FB_RSSI_TEXTDOMAIN ),
466
- 'after_noitems' => '</p>',
467
- 'before_error' => '<p>',
468
- 'error' => __('Error: Feed has a error or is not valid', FB_RSSI_TEXTDOMAIN ),
469
- 'after_error' => '</p>',
470
- 'paging' => 0,
471
- 'prev_paging_link' => __( '&laquo; Previous', FB_RSSI_TEXTDOMAIN ),
472
- 'next_paging_link' => __( 'Next &raquo;', FB_RSSI_TEXTDOMAIN ),
473
- 'prev_paging_title' => __( 'more items', FB_RSSI_TEXTDOMAIN ),
474
- 'next_paging_title' => __( 'more items', FB_RSSI_TEXTDOMAIN ),
475
- 'use_simplepie' => 0,
476
- 'view' => 0
477
- ), $atts) );
 
 
 
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
- $display, $feedurl,
514
- $before_desc, $displaydescriptions, $after_desc, $html,
515
- $truncatedescchar, $truncatedescstring,
516
- $truncatetitlechar, $truncatetitlestring,
517
- $before_date, $date, $after_date, $date_format,
518
- $before_creator, $creator, $after_creator,
519
- $start_items, $end_items,
520
- $start_item, $end_item,
521
- $target,
522
- $rel,
523
- $desc4title,
524
- $charsetscan, $debug,
525
- $before_noitems, $noitems, $after_noitems,
526
- $before_error, $error, $after_error,
527
- $paging, $prev_paging_link, $next_paging_link, $prev_paging_title, $next_paging_title,
528
- $use_simplepie,
529
- $view
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="&laquo; Previous" next_paging_link="Next &raquo;" 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']) ? '&laquo; Previous' : $instance['prev_paging_link'];
922
- $next_paging_link = empty($instance['next_paging_link']) ? 'Next &raquo;' : $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
- $display, $feedurl,
934
- $before_desc, $displaydescriptions, $after_desc, $html, $truncatedescchar, $truncatedescstring,
935
- $truncatetitlechar, $truncatetitlestring,
936
- $before_date, $date, $after_date, $date_format,
937
- $before_creator, $creator, $after_creator,
938
- $start_items, $end_items,
939
- $start_item, $end_item,
940
- $target,
941
- $rel,
942
- $desc4title,
943
- $charsetscan, $debug,
944
- $before_noitems, $noitems, $after_noitems,
945
- $before_error, $error, $after_error,
946
- $paging, $prev_paging_link, $next_paging_link, $prev_paging_title, $next_paging_title,
947
- $use_simplepie,
948
- $view
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( (array) $instance, array( 'title' => '',
1005
- 'titlelink' => '',
1006
- 'display' => 5,
1007
- 'feedurl' => 'http://bueltge.de/feed/',
1008
- 'before_desc' => '',
1009
- 'displaydescriptions' => 0,
1010
- 'after_desc' => '',
1011
- 'html' => 0,
1012
- 'truncatedescchar' => 200,
1013
- 'truncatedescstring' => ' ... ',
1014
- 'truncatetitlechar' => '',
1015
- 'truncatetitlestring' => ' ... ',
1016
- 'before_date' => ' <small>',
1017
- 'date' => 0,
1018
- 'after_date' => '</small>',
1019
- 'date_format' => '',
1020
- 'before_creator' => ' <small>',
1021
- 'creator' => 0,
1022
- 'after_creator' => '</small>',
1023
- 'start_items' => '<ul>',
1024
- 'end_items' => '</ul>',
1025
- 'start_item' => '<li>',
1026
- 'end_item' => '</li>',
1027
- 'target' => '',
1028
- 'rel' => '',
1029
- 'desc4title' => 0,
1030
- 'charsetscan' => 0,
1031
- 'debug' => 0,
1032
- 'view' => 1,
1033
- 'before_noitems' => '<p>',
1034
- 'noitems' => 'No items, feed is empty.',
1035
- 'after_noitems' => '</p>',
1036
- 'before_error' => '<p>',
1037
- 'error' => 'Error: Feed has a error or is not valid',
1038
- 'after_error' => '</p>',
1039
- 'paging' => 0,
1040
- 'prev_paging_link' => '&laquo; Previous',
1041
- 'next_paging_link' => 'Next &raquo;',
1042
- 'prev_paging_title' => 'more items',
1043
- 'next_paging_title' => 'more items',
1044
- 'use_simplepie' => 0
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&uuml;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&uuml;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 = '&laquo; Previous', $next_paging_link = 'Next &raquo;',
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('&#038;', '&', $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('„','“','–',' \&#34;','&#8211;','&#8212;','&#8216;','&#8217;','&#8220;','&#8221;','&#8222;','&#8226;','&#8230;' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�' ,'�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�','�',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('&bdquo;','&ldquo;','&ndash;',' &#34;','&ndash;','&mdash;','&lsquo;','&rsquo;','&ldquo;','&rdquo;','&bdquo;','&bull;' ,'&hellip;','&euro;','&sbquo;','&fnof;','&bdquo;','&hellip;','&dagger;','&Dagger;','&circ;','&permil;','&Scaron;','&lsaquo;','&OElig;','&#x017D;','&lsquo;','&rsquo;','&ldquo;','&rdquo;','&bull;','&ndash;','&mdash;','&tilde;','&trade;','&scaron;','&rsaquo;','&oelig;','&#x017E;','&Yuml;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&supl;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&euro;','&sbquo;','&fnof;','&bdquo;','&hellip;','&dagger;','&Dagger;','&circ;','&permil;','&Scaron;','&lsaquo;','&OElig;','&#x017D;','&lsquo;','&rsquo;','&ldquo;','&rdquo;','&bull;','&ndash;','&mdash;','&tilde;','&trade;','&scaron;','&rsaquo;','&oelig;','&#x017E;','&Yuml;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&supl;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&euro;','','&sbquo;','&fnof;','&bdquo;','&hellip;','&dagger;','&Dagger;','&circ;','&permil;','&Scaron;','&lsaquo;','&OElig;','','&#x017D;','','','&lsquo;','&rsquo;','&ldquo;','&rdquo;','&bull;','&ndash;','&mdash;','&tilde;','&trade;','&scaron;','&rsaquo;','&oelig;','','&#x017E;','&Yuml;','&nbsp;','&iexcl;','&iexcl;','&iexcl;','&iexcl;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','�&shy;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&supl;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;');
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' => __( '&laquo; Previous', FB_RSSI_TEXTDOMAIN ),
489
+ 'next_paging_link' => __( 'Next &raquo;', 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="&laquo; Previous" next_paging_link="Next &raquo;" 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']) ? __('&laquo; Previous', FB_RSSI_TEXTDOMAIN) : $instance['prev_paging_link'];
940
+ $next_paging_link = empty($instance['next_paging_link']) ? __('Next &raquo;', 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' => __('&laquo; Previous', FB_RSSI_TEXTDOMAIN),
1061
+ 'next_paging_link' => __('Next &raquo;', 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'];