RSSImport - Version 4.4

Version Description

Download this release

Release Info

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

Code changes from version 4.3 to 4.4

languages/rssimport-by_BY.mo ADDED
Binary file
languages/rssimport-by_BY.po ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WP-RSSImport\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-06-08 13:26+0100\n"
6
+ "PO-Revision-Date: 2009-06-11 23:25+0300\n"
7
+ "Last-Translator: Fat Cow <zhr@tut.by>\n"
8
+ "Language-Team: Fat Cow <zhr@tut.by>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: Russian\n"
14
+ "X-Poedit-Country: RUSSIAN FEDERATION\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;__ngettext_noop:1,2;_c\n"
17
+ "X-Poedit-Basepath: ../\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+
20
+ #: rssimport.php:63
21
+ msgid "Error in file: "
22
+ msgstr "Ошибка в файле:"
23
+
24
+ #: rssimport.php:373
25
+ msgid "RSSImport"
26
+ msgstr "Импорт RSS"
27
+
28
+ #: rssimport.php:373
29
+ msgid "Import a feed with RSSImport"
30
+ msgstr "Импортировать ленту с RSSImport"
31
+
32
+ #: rssimport.php:385
33
+ msgid "New version, however the plugin has been modified with many new parameters. Please see the new <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">possibilities</a>."
34
+ msgstr "Новая версия, однако модуль был изменен с большим количеством новых параметров. Пожалуйста, ознакомьтесь с новыми <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">возможностями</a>."
35
+
36
+ #~ msgid "Error: Feed has a error or is not valid"
37
+ #~ msgstr "Fehler: der Feed hat einen Fehler oder ist nicht valide."
38
+ #~ msgid "RSSImport einf&uuml;gen"
39
+ #~ msgstr "RSSImport einfügen"
40
+
languages/rssimport-de_DE.mo CHANGED
Binary file
languages/rssimport-de_DE.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP-RSSImport v4.2.4\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-06-08 13:26+0100\n"
6
- "PO-Revision-Date: 2009-06-08 13:27+0100\n"
7
  "Last-Translator: Frank Bueltge <frank@bueltge.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -17,24 +17,43 @@ msgstr ""
17
  "X-Poedit-Basepath: ../\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
 
20
- #: rssimport.php:63
21
  msgid "Error in file: "
22
  msgstr "Fehler in Datei:"
23
 
24
  #: rssimport.php:373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  msgid "RSSImport"
26
  msgstr "RSSImport"
27
 
28
- #: rssimport.php:373
29
  msgid "Import a feed with RSSImport"
30
  msgstr "Importiere einen Feed mit RSSImport"
31
 
32
- #: rssimport.php:385
33
  msgid "New version, however the plugin has been modified with many new parameters. Please see the new <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">possibilities</a>."
34
  msgstr "Neue Version: das Plugin wurde mit vielen Parametern aktualisiert. Bitte beachte die neuen <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">Möglichkeiten</a>."
35
 
36
- #~ msgid "Error: Feed has a error or is not valid"
37
- #~ msgstr "Fehler: der Feed hat einen Fehler oder ist nicht valide."
38
  #~ msgid "RSSImport einf&uuml;gen"
39
  #~ msgstr "RSSImport einfügen"
40
 
2
  msgstr ""
3
  "Project-Id-Version: WP-RSSImport v4.2.4\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-06-18 10:58+0100\n"
6
+ "PO-Revision-Date: 2009-06-18 10:59+0100\n"
7
  "Last-Translator: Frank Bueltge <frank@bueltge.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
17
  "X-Poedit-Basepath: ../\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
 
20
+ #: rssimport.php:72
21
  msgid "Error in file: "
22
  msgstr "Fehler in Datei:"
23
 
24
  #: rssimport.php:373
25
+ msgid "No items, feed is empty."
26
+ msgstr "Keine Einträge, der Feed ist leer."
27
+
28
+ #: rssimport.php:376
29
+ msgid "Error: Feed has a error or is not valid"
30
+ msgstr "Fehler: der Feed hat einen Fehler oder ist nicht valide."
31
+
32
+ #: rssimport.php:379
33
+ msgid "&laquo; Previous"
34
+ msgstr "&laquo; zurück"
35
+
36
+ #: rssimport.php:380
37
+ msgid "Next &raquo;"
38
+ msgstr "nächste &raquo;"
39
+
40
+ #: rssimport.php:381
41
+ #: rssimport.php:382
42
+ msgid "more items"
43
+ msgstr "mehr Einträge"
44
+
45
+ #: rssimport.php:424
46
  msgid "RSSImport"
47
  msgstr "RSSImport"
48
 
49
+ #: rssimport.php:424
50
  msgid "Import a feed with RSSImport"
51
  msgstr "Importiere einen Feed mit RSSImport"
52
 
53
+ #: rssimport.php:436
54
  msgid "New version, however the plugin has been modified with many new parameters. Please see the new <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">possibilities</a>."
55
  msgstr "Neue Version: das Plugin wurde mit vielen Parametern aktualisiert. Bitte beachte die neuen <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">Möglichkeiten</a>."
56
 
 
 
57
  #~ msgid "RSSImport einf&uuml;gen"
58
  #~ msgstr "RSSImport einfügen"
59
 
languages/rssimport-xx_XX.pot CHANGED
@@ -2,36 +2,58 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP-RSSImport v4.2.4\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-06-08 13:26+0100\n"
6
- "PO-Revision-Date: 2009-06-08 13:27+0100\n"
7
  "Last-Translator: Frank Bueltge <frank@bueltge.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
 
 
 
12
  "X-Poedit-SourceCharset: utf-8\n"
13
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;__ngettext_noop:1,2;_c\n"
14
  "X-Poedit-Basepath: ../\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
- #: rssimport.php:63
18
  msgid "Error in file: "
19
  msgstr "Fehler in Datei:"
20
 
21
  #: rssimport.php:373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  msgid "RSSImport"
23
  msgstr "RSSImport"
24
 
25
- #: rssimport.php:373
26
  msgid "Import a feed with RSSImport"
27
  msgstr "Importiere einen Feed mit RSSImport"
28
 
29
- #: rssimport.php:385
30
  msgid "New version, however the plugin has been modified with many new parameters. Please see the new <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">possibilities</a>."
31
  msgstr "Neue Version: das Plugin wurde mit vielen Parametern aktualisiert. Bitte beachte die neuen <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">M�glichkeiten</a>."
32
 
33
- #~ msgid "Error: Feed has a error or is not valid"
34
- #~ msgstr "Fehler: der Feed hat einen Fehler oder ist nicht valide."
35
  #~ msgid "RSSImport einf&uuml;gen"
36
  #~ msgstr "RSSImport einf�gen"
37
 
2
  msgstr ""
3
  "Project-Id-Version: WP-RSSImport v4.2.4\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-06-18 10:58+0100\n"
6
+ "PO-Revision-Date: 2009-06-18 10:59+0100\n"
7
  "Last-Translator: Frank Bueltge <frank@bueltge.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: German\n"
14
+ "X-Poedit-Country: GERMANY\n"
15
  "X-Poedit-SourceCharset: utf-8\n"
16
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;__ngettext_noop:1,2;_c\n"
17
  "X-Poedit-Basepath: ../\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
 
20
+ #: rssimport.php:72
21
  msgid "Error in file: "
22
  msgstr "Fehler in Datei:"
23
 
24
  #: rssimport.php:373
25
+ msgid "No items, feed is empty."
26
+ msgstr "Keine Eintr�ge, der Feed ist leer."
27
+
28
+ #: rssimport.php:376
29
+ msgid "Error: Feed has a error or is not valid"
30
+ msgstr "Fehler: der Feed hat einen Fehler oder ist nicht valide."
31
+
32
+ #: rssimport.php:379
33
+ msgid "&laquo; Previous"
34
+ msgstr "&laquo; zur�ck"
35
+
36
+ #: rssimport.php:380
37
+ msgid "Next &raquo;"
38
+ msgstr "n�chste &raquo;"
39
+
40
+ #: rssimport.php:381
41
+ #: rssimport.php:382
42
+ msgid "more items"
43
+ msgstr "mehr Eintr�ge"
44
+
45
+ #: rssimport.php:424
46
  msgid "RSSImport"
47
  msgstr "RSSImport"
48
 
49
+ #: rssimport.php:424
50
  msgid "Import a feed with RSSImport"
51
  msgstr "Importiere einen Feed mit RSSImport"
52
 
53
+ #: rssimport.php:436
54
  msgid "New version, however the plugin has been modified with many new parameters. Please see the new <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">possibilities</a>."
55
  msgstr "Neue Version: das Plugin wurde mit vielen Parametern aktualisiert. Bitte beachte die neuen <a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/rss-import/\">M�glichkeiten</a>."
56
 
 
 
57
  #~ msgid "RSSImport einf&uuml;gen"
58
  #~ msgstr "RSSImport einf�gen"
59
 
readme.txt ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === RSSImport ===
2
+ Contributors: Bueltge
3
+ Donate link: http://bueltge.de/wunschliste/
4
+ Tags: rss, post, content, post, feed
5
+ Requires at least: 1.5
6
+ Tested up to: 2.8
7
+
8
+ Import and display Feeds in your blog, use PHP or the Shortcode.
9
+
10
+
11
+ == Description ==
12
+ Import and display Feeds in your blog, use PHP or the Shortcode.
13
+
14
+ Use following code with a PHP-Plugin or in a template, example `sidebar.php` or `single.php`, for WordPress:
15
+
16
+ _Example:_
17
+ `&lt;?php RSSImport(10, 'http://bueltge.de/feed/'); ?&gt;`
18
+
19
+ This is smallest code for use the plugin with your own feed-url. The plugin have many paramters for custom import of content form a feed. See the list of paramters. You can also use all paramters with shorcode in posts and pages.
20
+
21
+ _Example for Shortcode:_
22
+ [RSSImport display="5" feedurl="http://bueltge.de/feed/"]
23
+
24
+ 1. `display` - How many items, Default is `5`
25
+ 1. `feedurl` - Feed-Adress, Default is `http://bueltge.de/feed/`
26
+ 1. `before_desc` - string before description, Default is `empty`
27
+ 1. `displaydescriptions` - (bool) true or false for display description of the item, Default is `false`
28
+ 1. `after_desc` - string after description, Default is `empty`
29
+ 1. `html` - (bool) display description include HTML-tags, Default is `false`
30
+ 1. `truncatedescchar` - truncate description, number of chars, Default is `200`, set the value to empty `''` for non truncate
31
+ 1. `truncatedescstring` - string after truncate description, Default is ` ... `
32
+ 1. `truncatetitlechar` - (int) truncate title, number of chars, Default is `empty`, set a integer `50` to the value for truncate
33
+ 1. `truncatetitlestring` - string after truncate title, Default is `' ... '`
34
+ 1. `before_date` - string before date, Default is ` <small>`
35
+ 1. `date` - (bool) return the date of the item, Default is `false`
36
+ 1. `after_date` - string after the date, Default is `</small>`
37
+ 1. `before_creator` - string before creator of the item, Default is ` <small>`
38
+ 1. `creator` - (bool) return the creator of th item, Default is `false`
39
+ 1. `after_creator` - string after creator of the item, Default is `</small>`
40
+ 1. `start_items` - string before all items, Default is `<ul>`
41
+ 1. `end_items` - string after all items, Default is `</ul>`
42
+ 1. `start_item` - string before the item, Default is `<li>`
43
+ 1. `end_item` - string after the items, Default is `</li>`
44
+ 1. `target` - string with the target-attribut, Default is `empty`; use `blank`, `self`, `parent`, `top`
45
+ 1. `charsetscan` - Scan for charset-type, load slowly; use this for problems with strings on the return content, Default is `false`
46
+ 1. `debug` - activate debug-mode, echo the array of Magpie-Object; Default is `false`, Use only for debug purpose
47
+ 1. `view` - echo or return the content of the function `RSSImport`, Default is `true`; Shortcode Default is `false`
48
+ 1. `before_noitems` - HTML or string before message, when the feed is empty, Default is `<p>`
49
+ 1. `noitems`- Message, when the feed is empty, Default is `No items, feed is empty.`
50
+ 1. `after_noitems` - HTML or string before message, when the feed is empty, Default is `</p>`
51
+ 1. `before_error` - HTML or string before message, when the feed have an error, Default is `<p>`
52
+ 1. `error` - Errormessage, Default is `Error: Feed has a error or is not valid`
53
+ 1. `after_error` - HTML or string before message, when the feed have an error, Default is `</p>`
54
+ 1. `paging` - Pagination on, set `true`, Default is `false`
55
+ 1. `prev_paging_link` - Linkname for previous page, Default is `&laquo; Previous`
56
+ 1. `next_paging_link` - Linkname for next page, Default is `Next &raquo;`
57
+ 1. `prev_paging_title` - Title for the link of previous page, Default is `more items`
58
+ 1. `next_paging_title` - Title for the link of next page, Default is `more items`
59
+
60
+ The pagination function add a div with the class `rsspaging` for design with CSS. Also youcan style the previous and next link with the classes: `rsspaging_prev` and `rsspaging_next`.
61
+
62
+ All paramters it is possible to use in the function, only in templates with PHP, and also with the Shortcode in posts and pges.
63
+
64
+ = Examples: =
65
+ _The function with many paramters:_
66
+
67
+ `RSSImport(
68
+ ` $display = 5, $feedurl = 'http://bueltge.de/feed/',`
69
+ ` $before_desc = '', $displaydescriptions = false, $after_desc = '', $html = false, $truncatedescchar = 200, $truncatedescstring = ' ... ',`
70
+ ` $truncatetitlechar = '', $truncatetitlestring = ' ... ',`
71
+ ` $before_date = ' <small>', $date = false, $after_date = '</small>',`
72
+ ` $before_creator = ' <small>', $creator = false, $after_creator = '</small>',`
73
+ ` $start_items = '<ul>', $end_items = '</ul>',`
74
+ ` $start_item = '<li>', $end_item = '</li>'`
75
+ ` )`
76
+
77
+ _The shortcode with a lot of paramters:_
78
+
79
+ `[RSSImport display="10", feedurl="http://your_feed_url/", `
80
+ `displaydescriptions="true", html="true"`
81
+ `start_items="<ol>", end_items="</ol>", paging="true" ]`
82
+
83
+ Please visit [the official website](http://bueltge.de/wp-rss-import-plugin/55/ "RSSImport") for further details and the latest information on this plugin.
84
+
85
+
86
+ == Installation ==
87
+ 1. Unpack the download-package
88
+ 1. Upload all files to the `/wp-content/plugins/` directory
89
+ 1. Activate the plugin through the 'Plugins' menu in WordPress
90
+ 1. Create a new site in WordPress or edit your template
91
+ 1. Copy the code in site-content or edit templates
92
+
93
+ = Changelog =
94
+ See on [the official website](http://bueltge.de/wp-rss-import-plugin/55/#historie "RSSImport Changelog").
95
+
96
+
97
+ == Other Notes ==
98
+ = Acknowledgements =
99
+ Thanks to [Dave Wolf](http://www.davewolf.net, "Dave Wolf") for the idea, to [Thomas Fischer](http://www.securityfocus.de "Thomas Fischer") and [Gunnar Tillmann](http://www.gunnart.de "Gunnar Tillmann") for better code and Ilya Shindyapin, http://skookum.com for the idea and solution of pagination.
100
+ Russian translation by [Fat Cow](http://www.fatcow.com "Fat Cow")
101
+
102
+ = Licence =
103
+ Good news, this plugin is free for everyone! Since it's released under the GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you can thank me and leave a [small donation](http://bueltge.de/wunschliste/ "Wishliste and Donate") for the time I've spent writing and supporting this plugin. And I really don't want to know how many hours of my life this plugin has already eaten ;)
104
+
105
+ = Translations =
106
+ The plugin comes with various translations, please refer to the [WordPress Codex](http://codex.wordpress.org/Installing_WordPress_in_Your_Language "Installing WordPress in Your Language") for more information about activating the translation. If you want to help to translate the plugin to your language, please have a look at the sitemap.pot file which contains all defintions and may be used with a [gettext](http://www.gnu.org/software/gettext/) editor like [Poedit](http://www.poedit.net/) (Windows).
107
+
108
+
109
+ == Frequently Asked Questions ==
110
+ = Where can I get more information? =
111
+ Please visit [the official website](http://bueltge.de/wp-rss-import-plugin/55/ "RSSImport") for the latest information on this plugin.
112
+
113
+ = Changelog? =
114
+ Please visit [the official website](http://bueltge.de/wp-rss-import-plugin/55/#historie "RSSImport Changelog") for the latest information on this plugin.
115
+
116
+ = I love this plugin! How can I show the developer how much I appreciate his work? =
117
+ Please visit [the official website](http://bueltge.de/wp-rss-import-plugin/55/ "RSSImport") and let him know your care or see the [wishlist](http://bueltge.de/wunschliste/ "Wishlist") of the author.
118
+
119
+ == Make more with the plugin ==
120
+ Please visit [RSSImportTwo](http://bueltge.de/wp-rssimporttwo-plugin/165/ "RSSImportTwo") for more features and tutorial to import with more HTML. It give it a tutorial and a plugin.
rssimport.php CHANGED
@@ -1,13 +1,19 @@
1
  <?php
 
 
 
 
 
 
2
  /*
3
  Plugin Name: WP-RSSImport
4
  Plugin URI: http://bueltge.de/wp-rss-import-plugin/55/
5
  Description: Import and display Feeds in your blog, use the function RSSImport() or Shortcode [RSSImport]. Please see the new <a href="http://wordpress.org/extend/plugins/rss-import/">possibilities</a>.
6
  Author: Frank B&uuml;ltge
7
- Version: 4.3
8
  License: GPL
9
  Author URI: http://bueltge.de/
10
- Last change: 08.06.2009 13:05:32
11
  */
12
 
13
  /*
@@ -18,6 +24,9 @@ Original and Idea: Dave Wolf, http://www.davewolf.net
18
  Thx to Thomas Fischer, http://www.securityfocus.de and
19
  Gunnar Tillmann http://www.gunnart.de for a better code
20
 
 
 
 
21
  USAGE: Use following code with a PHP-Plugin for WordPress:
22
  Example: <?php RSSImport(10, "http://bueltge.de/feed/"); ?>
23
  ------------------------------------------------------------
@@ -89,13 +98,15 @@ function RSSImport(
89
  $charsetscan = false, $debug = false,
90
  $view = true,
91
  $before_noitems = '<p>', $noitems = 'No items, feed is empty.', $after_noitems = '</p>',
92
- $before_error = '<p>', $error = 'Error: Feed has a error or is not valid', $after_error = '</p>'
 
93
  ) {
94
 
95
  $display = intval($display);
 
96
  $truncatedescchar = intval($truncatedescchar);
97
  $truncatetitlechar = intval($truncatetitlechar);
98
- $echo = '';
99
 
100
  if ( $charsetscan && function_exists('file_get_contents') ) {
101
  // read in file for search charset
@@ -117,87 +128,102 @@ function RSSImport(
117
  define('MAGPIE_CACHE_ON', false);
118
  }
119
 
120
- foreach ($rss->items as $item) {
121
- if ($display == 0)
122
- break;
 
 
 
 
 
 
 
 
 
 
123
 
124
- $echo .= $start_item;
125
- // import title
126
- if ( isset($item['title']) )
127
- $title = wp_specialchars( $item['title'] );
128
- // import link
129
- if ( isset($item['link']) )
130
- $href = wp_filter_kses( $item['link'] );
131
- // import date
132
- if ($date && isset($item['pubdate']) )
133
- $pubDate = date_i18n( get_option('date_format'), strtotime( $item['pubdate'] ) );
134
- // import creator
135
- if ($creator && isset($item['dc']['creator']) )
136
- $creator = wp_specialchars( $item['dc']['creator'] );
137
- elseif ($creator && isset($item['creator']) )
138
- $creator = wp_specialchars( $item['creator'] );
139
- // import desc
140
- if ( $displaydescriptions && $html && isset($item['content']['encoded']) && $item['content']['encoded'] != 'A' )
141
- $desc = $item['content']['encoded']; // For import with HTML
142
- elseif ( $displaydescriptions && $html && isset($item['content']['atom_content']) && $item['content']['atom_content'] != 'A' )
143
- $desc = $item['content']['atom_content']; // For import with HTML
144
- elseif ( $displaydescriptions && $html && isset($item['content']) && !is_array($item['content']) )
145
- $desc = $item['content'];
146
- elseif ( $displaydescriptions && $html && isset($item['description']) )
147
- $desc = $item['description'];
148
- elseif ( $displaydescriptions && !$html && isset($item['description']) )
149
- $desc = wp_specialchars($item['description']); // For import without HTML
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
 
151
- if ( isset($a) && eregi('ISO', $a) ) {
152
- if ($debug)
153
- $echo .= 'ISO Feed' . "\n";
154
- if ( isset($title) )
155
- isodec($title);
156
- if ( isset($creator) )
157
- isodec($creator);
158
- if ( isset($desc) )
159
- isodec($desc);
160
- } else {
161
- if ($debug)
162
- $echo .= 'NonISO Feed' . "\n";
163
  if ( isset($title) )
164
- utf8dec($title);
165
  if ( isset($creator) )
166
- utf8dec($creator);
167
  if ( isset($desc) )
168
- utf8dec($desc);
169
- }
170
 
171
- if ( isset($title) )
172
- all_convert($title);
173
- if ( isset($creator) )
174
- all_convert($creator);
175
- if ( isset($desc) )
176
- all_convert($desc);
177
 
178
- if ( isset($title) && $truncatetitlechar && (strlen($title) > $truncatetitlechar) ) {
179
- $title = substr($title, 0, $truncatetitlechar);
180
- $title = RSSImport_end_on_word($title) . $truncatetitlestring;
181
- }
 
 
 
182
 
183
- if ( isset($desc) && $truncatedescchar && (strlen($desc) > $truncatedescchar) ) {
184
- $desc = substr($desc, 0, $truncatedescchar);
185
- $desc = RSSImport_end_on_word($desc) . $truncatedescstring;
 
 
 
 
 
 
 
186
  }
187
 
188
- if ( isset($target) && $target != '' )
189
- $target = ' target="_' . $target . '"';
190
-
191
- $echo .= '<a' . $target . ' href="' . $href . '" title="'. ereg_replace("[^A-Za-z0-9 ]", "", $item['title']) . '">' . $title . '</a>';
192
- if ( isset($pubDate) && $date && $pubDate != '' )
193
- $echo .= $before_date . $pubDate . $after_date;
194
- if ( isset($creator) && $creator && $creator != '' )
195
- $echo .= $before_creator . $creator . $after_creator;
196
- if ( isset($desc) && $displaydescriptions && $desc != '' )
197
- $echo .= $before_desc . $desc . $after_desc;
198
- $echo .= $end_item;
199
-
200
- $display--;
201
  }
202
 
203
  if ($echo)
@@ -209,6 +235,16 @@ function RSSImport(
209
  $echo = wptexturize($before_error . $error . $rss->ERROR . $after_error);
210
  }
211
 
 
 
 
 
 
 
 
 
 
 
212
  if ($view)
213
  echo $echo;
214
  else
@@ -216,12 +252,18 @@ function RSSImport(
216
  }
217
 
218
  function utf8dec($s_String) {
219
- $s_String = html_entity_decode(htmlentities($s_String." ", ENT_COMPAT, 'UTF-8'));
 
 
 
220
  return substr($s_String, 0, strlen($s_String)-1);
221
  }
222
 
223
  function isodec($s_String) {
224
- $s_String = html_entity_decode(htmlentities($s_String." ", ENT_COMPAT, 'ISO-8859-1'));
 
 
 
225
  return substr($s_String, 0, strlen($s_String)-1);
226
  }
227
 
@@ -231,8 +273,11 @@ function all_convert($s_String) {
231
  $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));
232
  $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;');
233
  //$s_String = str_replace($umlaute, $htmlcode, $s_String);
234
- $s_String = utf8_encode( html_entity_decode( str_replace($umlaute, $htmlcode, $s_String) ) );
235
-
 
 
 
236
  // &hellip; , &#8230;
237
  $s_String = preg_replace('~\xC3\xA2\xE2\x82\xAC\xC2\xA6~', '&hellip;', $s_String);
238
  $s_String = preg_replace('~\xC3\x83\xC2\xA2\xC3\xA2\xE2\x80\x9A\xC2\xAC\xC3\x82\xC2\xA6~', '&hellip;', $s_String);
@@ -325,11 +370,16 @@ function RSSImport_Shortcode($atts) {
325
  'charsetscan' => false,
326
  'debug' => false,
327
  'before_noitems' => '<p>',
328
- 'noitems' => 'No items, feed is empty.',
329
  'after_noitems' => '</p>',
330
  'before_error' => '<p>',
331
- 'error' => 'Error: Feed has a error or is not valid',
332
- 'after_error' => '</p>'
 
 
 
 
 
333
  ), $atts) );
334
 
335
  $return = RSSImport(
@@ -344,7 +394,8 @@ function RSSImport_Shortcode($atts) {
344
  $charsetscan, $debug,
345
  $view = false,
346
  $before_noitems, $noitems, $after_noitems,
347
- $before_error, $error, $after_error
 
348
  );
349
 
350
  return $return;
@@ -364,7 +415,7 @@ function RSSImport_insert_button() {
364
  <script type="text/javascript">
365
  //<![CDATA[
366
  var length = edButtons.length;
367
- 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>" before_creator=" <small>" creator="false" after_creator=" </small>" start_items=" <ul>" end_items=" </ul>" start_item=" <li>" end_item=" </li>" target="" 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>"]\', \'\', \'\');
368
  function RSSImport_tag(id) {
369
  id = id.replace(/RSSImport_/, \'\');
370
  edInsertTag(edCanvas, id);
@@ -394,4 +445,292 @@ if ( is_admin() ) {
394
  if (FB_RSSI_QUICKTAG)
395
  add_filter( 'admin_footer', 'RSSImport_insert_button' );
396
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
  ?>
1
  <?php
2
+ /**
3
+ * @package WP-RSSImport
4
+ * @author Frank B&uuml;ltge
5
+ * @version 4.4
6
+ */
7
+
8
  /*
9
  Plugin Name: WP-RSSImport
10
  Plugin URI: http://bueltge.de/wp-rss-import-plugin/55/
11
  Description: Import and display Feeds in your blog, use the function RSSImport() or Shortcode [RSSImport]. Please see the new <a href="http://wordpress.org/extend/plugins/rss-import/">possibilities</a>.
12
  Author: Frank B&uuml;ltge
13
+ Version: 4.4
14
  License: GPL
15
  Author URI: http://bueltge.de/
16
+ Last change: 18.06.2009 11:23:25
17
  */
18
 
19
  /*
24
  Thx to Thomas Fischer, http://www.securityfocus.de and
25
  Gunnar Tillmann http://www.gunnart.de for a better code
26
 
27
+ Paging: Ilya Shindyapin, http://skookum.com
28
+
29
+ ------------------------------------------------------------
30
  USAGE: Use following code with a PHP-Plugin for WordPress:
31
  Example: <?php RSSImport(10, "http://bueltge.de/feed/"); ?>
32
  ------------------------------------------------------------
98
  $charsetscan = false, $debug = false,
99
  $view = true,
100
  $before_noitems = '<p>', $noitems = 'No items, feed is empty.', $after_noitems = '</p>',
101
+ $before_error = '<p>', $error = 'Error: Feed has a error or is not valid', $after_error = '</p>',
102
+ $paging = false, $prev_paging_link = '&laquo; Previous', $next_paging_link = 'Next &raquo;', $prev_paging_title = 'more items', $next_paging_title = 'more items'
103
  ) {
104
 
105
  $display = intval($display);
106
+ $page = ( ( !empty( $_GET['rsspage'] ) && intval($_GET['rsspage']) > 0 ) ? intval($_GET['rsspage']) : 1 );
107
  $truncatedescchar = intval($truncatedescchar);
108
  $truncatetitlechar = intval($truncatetitlechar);
109
+ $echo = '';
110
 
111
  if ( $charsetscan && function_exists('file_get_contents') ) {
112
  // read in file for search charset
128
  define('MAGPIE_CACHE_ON', false);
129
  }
130
 
131
+ if ( isset($target) && $target != '' )
132
+ $target = ' target="_' . $target . '"';
133
+
134
+ $displaylimit = ($page * $display);
135
+ $display = (($page-1) * $display);
136
+ $nextitems = TRUE;
137
+ $previousitems = FALSE;
138
+ if ( $page > 1 )
139
+ $previousitems = TRUE;
140
+
141
+ while($display < $displaylimit) {
142
+
143
+ if ( array_key_exists( $display, $rss->items ) ) {
144
 
145
+ $item = $rss->items[$display];
146
+ $echo .= $start_item;
147
+ // import title
148
+ if ( isset($item['title']) )
149
+ $title = wp_specialchars( $item['title'] );
150
+ // import link
151
+ if ( isset($item['link']) )
152
+ $href = wp_filter_kses( $item['link'] );
153
+ // import date
154
+ if ($date && isset($item['pubdate']) )
155
+ $pubDate = date_i18n( get_option('date_format'), strtotime( $item['pubdate'] ) );
156
+ // import creator
157
+ if ($creator && isset($item['dc']['creator']) )
158
+ $creator = wp_specialchars( $item['dc']['creator'] );
159
+ elseif ($creator && isset($item['creator']) )
160
+ $creator = wp_specialchars( $item['creator'] );
161
+ // import desc
162
+ if ( $displaydescriptions && $html && isset($item['content']['encoded']) && $item['content']['encoded'] != 'A' )
163
+ $desc = $item['content']['encoded']; // For import with HTML
164
+ elseif ( $displaydescriptions && $html && isset($item['content']['atom_content']) && $item['content']['atom_content'] != 'A' )
165
+ $desc = $item['content']['atom_content']; // For import with HTML
166
+ elseif ( $displaydescriptions && $html && isset($item['content']) && !is_array($item['content']) )
167
+ $desc = $item['content'];
168
+ elseif ( $displaydescriptions && $html && isset($item['description']) )
169
+ $desc = $item['description'];
170
+ elseif ( $displaydescriptions && !$html && isset($item['description']) )
171
+ $desc = wp_specialchars(strip_tags($item['description'])); // For import without HTML
172
+
173
+ if ( isset($a) && eregi('ISO', $a) ) {
174
+ if ($debug)
175
+ $echo .= 'ISO Feed' . "\n";
176
+ if ( isset($title) )
177
+ isodec($title);
178
+ if ( isset($creator) )
179
+ isodec($creator);
180
+ if ( isset($desc) )
181
+ isodec($desc);
182
+ } else {
183
+ if ($debug)
184
+ $echo .= 'NonISO Feed' . "\n";
185
+ if ( isset($title) )
186
+ utf8dec($title);
187
+ if ( isset($creator) )
188
+ utf8dec($creator);
189
+ if ( isset($desc) )
190
+ utf8dec($desc);
191
+ }
192
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  if ( isset($title) )
194
+ all_convert($title);
195
  if ( isset($creator) )
196
+ all_convert($creator);
197
  if ( isset($desc) )
198
+ all_convert($desc);
 
199
 
200
+ if ( isset($title) && $truncatetitlechar && (strlen($title) > $truncatetitlechar) ) {
201
+ //$title = substr($title, 0, $truncatetitlechar);
202
+ //$title = RSSImport_end_on_word($title) . $truncatetitlestring;
203
+ $title = wp_html_excerpt($title, $truncatetitlechar) . $truncatetitlestring;
204
+ }
 
205
 
206
+ if ( isset($desc) && $truncatedescchar && (strlen($desc) > $truncatedescchar) ) {
207
+ //$desc = substr($desc, 0, $truncatedescchar);
208
+ //$desc = RSSImport_end_on_word($desc) . $truncatedescstring;
209
+ $desc = wp_html_excerpt($desc, $truncatedescchar) . $truncatedescstring;
210
+ }
211
+
212
+ // Moved the target outside the loop
213
 
214
+ $echo .= '<a' . $target . ' href="' . $href . '" title="'. ereg_replace("[^A-Za-z0-9 ]", "", $item['title']) . '">' . $title . '</a>';
215
+ if ( isset($pubDate) && $date && $pubDate != '' )
216
+ $echo .= $before_date . $pubDate . $after_date;
217
+ if ( isset($creator) && $creator && $creator != '' )
218
+ $echo .= $before_creator . $creator . $after_creator;
219
+ if ( isset($desc) && $displaydescriptions && $desc != '' )
220
+ $echo .= $before_desc . $desc . $after_desc;
221
+ $echo .= $end_item;
222
+ } else {
223
+ $nextitems = FALSE;
224
  }
225
 
226
+ $display++;
 
 
 
 
 
 
 
 
 
 
 
 
227
  }
228
 
229
  if ($echo)
235
  $echo = wptexturize($before_error . $error . $rss->ERROR . $after_error);
236
  }
237
 
238
+ if ($paging) {
239
+ $echo .= '<div class="rsspaging">';
240
+ if ($previousitems)
241
+ $echo .= '<a href="' . add_query_arg( 'rsspage', ($page-1) ) . '" class="rsspaging_prev" title="' . $prev_paging_title . '">' . $prev_paging_link . '</a>';
242
+ if ($nextitems)
243
+ $echo .= '<a href="' . add_query_arg( 'rsspage', ($page+1) ) . '" class="rsspaging_next" title="' . $next_paging_title . '">' . $next_paging_link .'</a>';
244
+ $echo .= '<br style="clear: both" />';
245
+ $echo .= '</div>';
246
+ }
247
+
248
  if ($view)
249
  echo $echo;
250
  else
252
  }
253
 
254
  function utf8dec($s_String) {
255
+ if ( version_compare(phpversion(), '5.0.0', '>=') )
256
+ $s_String = html_entity_decode(htmlentities( $s_String." ", ENT_COMPAT, 'UTF-8') );
257
+ else
258
+ $s_String = RSSImport_html_entity_decode_php4( htmlentities($s_String." ") );
259
  return substr($s_String, 0, strlen($s_String)-1);
260
  }
261
 
262
  function isodec($s_String) {
263
+ if ( version_compare(phpversion(), '5.0.0', '>=') )
264
+ $s_String = html_entity_decode(htmlentities($s_String." ", ENT_COMPAT, 'ISO-8859-1'));
265
+ else
266
+ $s_String = RSSImport_html_entity_decode_php4( htmlentities($s_String." ") );
267
  return substr($s_String, 0, strlen($s_String)-1);
268
  }
269
 
273
  $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));
274
  $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;');
275
  //$s_String = str_replace($umlaute, $htmlcode, $s_String);
276
+ if ( version_compare(phpversion(), '5.0.0', '>=') )
277
+ $s_String = utf8_encode( html_entity_decode( str_replace($umlaute, $htmlcode, $s_String) ) );
278
+ else
279
+ $s_String = utf8_encode( RSSImport_html_entity_decode_php4( str_replace($umlaute, $htmlcode, $s_String) ) );
280
+
281
  // &hellip; , &#8230;
282
  $s_String = preg_replace('~\xC3\xA2\xE2\x82\xAC\xC2\xA6~', '&hellip;', $s_String);
283
  $s_String = preg_replace('~\xC3\x83\xC2\xA2\xC3\xA2\xE2\x80\x9A\xC2\xAC\xC3\x82\xC2\xA6~', '&hellip;', $s_String);
370
  'charsetscan' => false,
371
  'debug' => false,
372
  'before_noitems' => '<p>',
373
+ 'noitems' => __('No items, feed is empty.', FB_RSSI_TEXTDOMAIN ),
374
  'after_noitems' => '</p>',
375
  'before_error' => '<p>',
376
+ 'error' => __('Error: Feed has a error or is not valid', FB_RSSI_TEXTDOMAIN ),
377
+ 'after_error' => '</p>',
378
+ 'paging' => false,
379
+ 'prev_paging_link' => __( '&laquo; Previous', FB_RSSI_TEXTDOMAIN ),
380
+ 'next_paging_link' => __( 'Next &raquo;', FB_RSSI_TEXTDOMAIN ),
381
+ 'prev_paging_title' => __( 'more items', FB_RSSI_TEXTDOMAIN ),
382
+ 'next_paging_title'=> __( 'more items', FB_RSSI_TEXTDOMAIN )
383
  ), $atts) );
384
 
385
  $return = RSSImport(
394
  $charsetscan, $debug,
395
  $view = false,
396
  $before_noitems, $noitems, $after_noitems,
397
+ $before_error, $error, $after_error,
398
+ $paging, $prev_paging_link, $next_paging_link, $prev_paging_title, $next_paging_title
399
  );
400
 
401
  return $return;
415
  <script type="text/javascript">
416
  //<![CDATA[
417
  var length = edButtons.length;
418
+ 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>" before_creator=" <small>" creator="false" after_creator=" </small>" start_items=" <ul>" end_items=" </ul>" start_item=" <li>" end_item=" </li>" target="" 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"]\', \'\', \'\');
419
  function RSSImport_tag(id) {
420
  id = id.replace(/RSSImport_/, \'\');
421
  edInsertTag(edCanvas, id);
445
  if (FB_RSSI_QUICKTAG)
446
  add_filter( 'admin_footer', 'RSSImport_insert_button' );
447
  }
448
+
449
+ /**
450
+ * code to utf-8 in PHP 4
451
+ *
452
+ * @package WP-RSSImport
453
+ */
454
+ function RSSImport_code_to_utf8($num) {
455
+
456
+ if ($num <= 0x7F) {
457
+ return chr($num);
458
+ } elseif ($num <= 0x7FF) {
459
+ return chr(($num >> 0x06) + 0xC0) . chr(($num & 0x3F) + 128);
460
+ } elseif ($num <= 0xFFFF) {
461
+ return chr(($num >> 0x0C) + 0xE0) . chr((($num >> 0x06) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80);
462
+ } elseif ($num <= 0x1FFFFF) {
463
+ return chr(($num >> 0x12) + 0xF0) . chr((($num >> 0x0C) & 0x3F) + 0x80) . chr((($num >> 0x06) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80);
464
+ }
465
+
466
+ return '';
467
+ }
468
+
469
+
470
+ /**
471
+ * html_entity_decode for PHP 4
472
+ *
473
+ * @package WP-RSSImport
474
+ */
475
+ function RSSImport_html_entity_decode_php4($str) {
476
+ $htmlentities = array (
477
+ "&Aacute;" => chr(195).chr(129),
478
+ "&aacute;" => chr(195).chr(161),
479
+ "&Acirc;" => chr(195).chr(130),
480
+ "&acirc;" => chr(195).chr(162),
481
+ "&acute;" => chr(194).chr(180),
482
+ "&AElig;" => chr(195).chr(134),
483
+ "&aelig;" => chr(195).chr(166),
484
+ "&Agrave;" => chr(195).chr(128),
485
+ "&agrave;" => chr(195).chr(160),
486
+ "&alefsym;" => chr(226).chr(132).chr(181),
487
+ "&Alpha;" => chr(206).chr(145),
488
+ "&alpha;" => chr(206).chr(177),
489
+ "&amp;" => chr(38),
490
+ "&and;" => chr(226).chr(136).chr(167),
491
+ "&ang;" => chr(226).chr(136).chr(160),
492
+ "&Aring;" => chr(195).chr(133),
493
+ "&aring;" => chr(195).chr(165),
494
+ "&asymp;" => chr(226).chr(137).chr(136),
495
+ "&Atilde;" => chr(195).chr(131),
496
+ "&atilde;" => chr(195).chr(163),
497
+ "&Auml;" => chr(195).chr(132),
498
+ "&auml;" => chr(195).chr(164),
499
+ "&bdquo;" => chr(226).chr(128).chr(158),
500
+ "&Beta;" => chr(206).chr(146),
501
+ "&beta;" => chr(206).chr(178),
502
+ "&brvbar;" => chr(194).chr(166),
503
+ "&bull;" => chr(226).chr(128).chr(162),
504
+ "&cap;" => chr(226).chr(136).chr(169),
505
+ "&Ccedil;" => chr(195).chr(135),
506
+ "&ccedil;" => chr(195).chr(167),
507
+ "&cedil;" => chr(194).chr(184),
508
+ "&cent;" => chr(194).chr(162),
509
+ "&Chi;" => chr(206).chr(167),
510
+ "&chi;" => chr(207).chr(135),
511
+ "&circ;" => chr(203).chr(134),
512
+ "&clubs;" => chr(226).chr(153).chr(163),
513
+ "&cong;" => chr(226).chr(137).chr(133),
514
+ "&copy;" => chr(194).chr(169),
515
+ "&crarr;" => chr(226).chr(134).chr(181),
516
+ "&cup;" => chr(226).chr(136).chr(170),
517
+ "&curren;" => chr(194).chr(164),
518
+ "&dagger;" => chr(226).chr(128).chr(160),
519
+ "&Dagger;" => chr(226).chr(128).chr(161),
520
+ "&darr;" => chr(226).chr(134).chr(147),
521
+ "&dArr;" => chr(226).chr(135).chr(147),
522
+ "&deg;" => chr(194).chr(176),
523
+ "&Delta;" => chr(206).chr(148),
524
+ "&delta;" => chr(206).chr(180),
525
+ "&diams;" => chr(226).chr(153).chr(166),
526
+ "&divide;" => chr(195).chr(183),
527
+ "&Eacute;" => chr(195).chr(137),
528
+ "&eacute;" => chr(195).chr(169),
529
+ "&Ecirc;" => chr(195).chr(138),
530
+ "&ecirc;" => chr(195).chr(170),
531
+ "&Egrave;" => chr(195).chr(136),
532
+ "&egrave;" => chr(195).chr(168),
533
+ "&empty;" => chr(226).chr(136).chr(133),
534
+ "&emsp;" => chr(226).chr(128).chr(131),
535
+ "&ensp;" => chr(226).chr(128).chr(130),
536
+ "&Epsilon;" => chr(206).chr(149),
537
+ "&epsilon;" => chr(206).chr(181),
538
+ "&equiv;" => chr(226).chr(137).chr(161),
539
+ "&Eta;" => chr(206).chr(151),
540
+ "&eta;" => chr(206).chr(183),
541
+ "&ETH;" => chr(195).chr(144),
542
+ "&eth;" => chr(195).chr(176),
543
+ "&Euml;" => chr(195).chr(139),
544
+ "&euml;" => chr(195).chr(171),
545
+ "&euro;" => chr(226).chr(130).chr(172),
546
+ "&exist;" => chr(226).chr(136).chr(131),
547
+ "&fnof;" => chr(198).chr(146),
548
+ "&forall;" => chr(226).chr(136).chr(128),
549
+ "&frac12;" => chr(194).chr(189),
550
+ "&frac14;" => chr(194).chr(188),
551
+ "&frac34;" => chr(194).chr(190),
552
+ "&frasl;" => chr(226).chr(129).chr(132),
553
+ "&Gamma;" => chr(206).chr(147),
554
+ "&gamma;" => chr(206).chr(179),
555
+ "&ge;" => chr(226).chr(137).chr(165),
556
+ "&harr;" => chr(226).chr(134).chr(148),
557
+ "&hArr;" => chr(226).chr(135).chr(148),
558
+ "&hearts;" => chr(226).chr(153).chr(165),
559
+ "&hellip;" => chr(226).chr(128).chr(166),
560
+ "&Iacute;" => chr(195).chr(141),
561
+ "&iacute;" => chr(195).chr(173),
562
+ "&Icirc;" => chr(195).chr(142),
563
+ "&icirc;" => chr(195).chr(174),
564
+ "&iexcl;" => chr(194).chr(161),
565
+ "&Igrave;" => chr(195).chr(140),
566
+ "&igrave;" => chr(195).chr(172),
567
+ "&image;" => chr(226).chr(132).chr(145),
568
+ "&infin;" => chr(226).chr(136).chr(158),
569
+ "&int;" => chr(226).chr(136).chr(171),
570
+ "&Iota;" => chr(206).chr(153),
571
+ "&iota;" => chr(206).chr(185),
572
+ "&iquest;" => chr(194).chr(191),
573
+ "&isin;" => chr(226).chr(136).chr(136),
574
+ "&Iuml;" => chr(195).chr(143),
575
+ "&iuml;" => chr(195).chr(175),
576
+ "&Kappa;" => chr(206).chr(154),
577
+ "&kappa;" => chr(206).chr(186),
578
+ "&Lambda;" => chr(206).chr(155),
579
+ "&lambda;" => chr(206).chr(187),
580
+ "&lang;" => chr(226).chr(140).chr(169),
581
+ "&laquo;" => chr(194).chr(171),
582
+ "&larr;" => chr(226).chr(134).chr(144),
583
+ "&lArr;" => chr(226).chr(135).chr(144),
584
+ "&lceil;" => chr(226).chr(140).chr(136),
585
+ "&ldquo;" => chr(226).chr(128).chr(156),
586
+ "&le;" => chr(226).chr(137).chr(164),
587
+ "&lfloor;" => chr(226).chr(140).chr(138),
588
+ "&lowast;" => chr(226).chr(136).chr(151),
589
+ "&loz;" => chr(226).chr(151).chr(138),
590
+ "&lrm;" => chr(226).chr(128).chr(142),
591
+ "&lsaquo;" => chr(226).chr(128).chr(185),
592
+ "&lsquo;" => chr(226).chr(128).chr(152),
593
+ "&macr;" => chr(194).chr(175),
594
+ "&mdash;" => chr(226).chr(128).chr(148),
595
+ "&micro;" => chr(194).chr(181),
596
+ "&middot;" => chr(194).chr(183),
597
+ "&minus;" => chr(226).chr(136).chr(146),
598
+ "&Mu;" => chr(206).chr(156),
599
+ "&mu;" => chr(206).chr(188),
600
+ "&nabla;" => chr(226).chr(136).chr(135),
601
+ "&nbsp;" => chr(194).chr(160),
602
+ "&ndash;" => chr(226).chr(128).chr(147),
603
+ "&ne;" => chr(226).chr(137).chr(160),
604
+ "&ni;" => chr(226).chr(136).chr(139),
605
+ "&not;" => chr(194).chr(172),
606
+ "&notin;" => chr(226).chr(136).chr(137),
607
+ "&nsub;" => chr(226).chr(138).chr(132),
608
+ "&Ntilde;" => chr(195).chr(145),
609
+ "&ntilde;" => chr(195).chr(177),
610
+ "&Nu;" => chr(206).chr(157),
611
+ "&nu;" => chr(206).chr(189),
612
+ "&Oacute;" => chr(195).chr(147),
613
+ "&oacute;" => chr(195).chr(179),
614
+ "&Ocirc;" => chr(195).chr(148),
615
+ "&ocirc;" => chr(195).chr(180),
616
+ "&OElig;" => chr(197).chr(146),
617
+ "&oelig;" => chr(197).chr(147),
618
+ "&Ograve;" => chr(195).chr(146),
619
+ "&ograve;" => chr(195).chr(178),
620
+ "&oline;" => chr(226).chr(128).chr(190),
621
+ "&Omega;" => chr(206).chr(169),
622
+ "&omega;" => chr(207).chr(137),
623
+ "&Omicron;" => chr(206).chr(159),
624
+ "&omicron;" => chr(206).chr(191),
625
+ "&oplus;" => chr(226).chr(138).chr(149),
626
+ "&or;" => chr(226).chr(136).chr(168),
627
+ "&ordf;" => chr(194).chr(170),
628
+ "&ordm;" => chr(194).chr(186),
629
+ "&Oslash;" => chr(195).chr(152),
630
+ "&oslash;" => chr(195).chr(184),
631
+ "&Otilde;" => chr(195).chr(149),
632
+ "&otilde;" => chr(195).chr(181),
633
+ "&otimes;" => chr(226).chr(138).chr(151),
634
+ "&Ouml;" => chr(195).chr(150),
635
+ "&ouml;" => chr(195).chr(182),
636
+ "&para;" => chr(194).chr(182),
637
+ "&part;" => chr(226).chr(136).chr(130),
638
+ "&permil;" => chr(226).chr(128).chr(176),
639
+ "&perp;" => chr(226).chr(138).chr(165),
640
+ "&Phi;" => chr(206).chr(166),
641
+ "&phi;" => chr(207).chr(134),
642
+ "&Pi;" => chr(206).chr(160),
643
+ "&pi;" => chr(207).chr(128),
644
+ "&piv;" => chr(207).chr(150),
645
+ "&plusmn;" => chr(194).chr(177),
646
+ "&pound;" => chr(194).chr(163),
647
+ "&prime;" => chr(226).chr(128).chr(178),
648
+ "&Prime;" => chr(226).chr(128).chr(179),
649
+ "&prod;" => chr(226).chr(136).chr(143),
650
+ "&prop;" => chr(226).chr(136).chr(157),
651
+ "&Psi;" => chr(206).chr(168),
652
+ "&psi;" => chr(207).chr(136),
653
+ "&radic;" => chr(226).chr(136).chr(154),
654
+ "&rang;" => chr(226).chr(140).chr(170),
655
+ "&raquo;" => chr(194).chr(187),
656
+ "&rarr;" => chr(226).chr(134).chr(146),
657
+ "&rArr;" => chr(226).chr(135).chr(146),
658
+ "&rceil;" => chr(226).chr(140).chr(137),
659
+ "&rdquo;" => chr(226).chr(128).chr(157),
660
+ "&real;" => chr(226).chr(132).chr(156),
661
+ "&reg;" => chr(194).chr(174),
662
+ "&rfloor;" => chr(226).chr(140).chr(139),
663
+ "&Rho;" => chr(206).chr(161),
664
+ "&rho;" => chr(207).chr(129),
665
+ "&rlm;" => chr(226).chr(128).chr(143),
666
+ "&rsaquo;" => chr(226).chr(128).chr(186),
667
+ "&rsquo;" => chr(226).chr(128).chr(153),
668
+ "&sbquo;" => chr(226).chr(128).chr(154),
669
+ "&Scaron;" => chr(197).chr(160),
670
+ "&scaron;" => chr(197).chr(161),
671
+ "&sdot;" => chr(226).chr(139).chr(133),
672
+ "&sect;" => chr(194).chr(167),
673
+ "&shy;" => chr(194).chr(173),
674
+ "&Sigma;" => chr(206).chr(163),
675
+ "&sigma;" => chr(207).chr(131),
676
+ "&sigmaf;" => chr(207).chr(130),
677
+ "&sim;" => chr(226).chr(136).chr(188),
678
+ "&spades;" => chr(226).chr(153).chr(160),
679
+ "&sub;" => chr(226).chr(138).chr(130),
680
+ "&sube;" => chr(226).chr(138).chr(134),
681
+ "&sum;" => chr(226).chr(136).chr(145),
682
+ "&sup1;" => chr(194).chr(185),
683
+ "&sup2;" => chr(194).chr(178),
684
+ "&sup3;" => chr(194).chr(179),
685
+ "&sup;" => chr(226).chr(138).chr(131),
686
+ "&supe;" => chr(226).chr(138).chr(135),
687
+ "&szlig;" => chr(195).chr(159),
688
+ "&Tau;" => chr(206).chr(164),
689
+ "&tau;" => chr(207).chr(132),
690
+ "&there4;" => chr(226).chr(136).chr(180),
691
+ "&Theta;" => chr(206).chr(152),
692
+ "&theta;" => chr(206).chr(184),
693
+ "&thetasym;" => chr(207).chr(145),
694
+ "&thinsp;" => chr(226).chr(128).chr(137),
695
+ "&THORN;" => chr(195).chr(158),
696
+ "&thorn;" => chr(195).chr(190),
697
+ "&tilde;" => chr(203).chr(156),
698
+ "&times;" => chr(195).chr(151),
699
+ "&trade;" => chr(226).chr(132).chr(162),
700
+ "&Uacute;" => chr(195).chr(154),
701
+ "&uacute;" => chr(195).chr(186),
702
+ "&uarr;" => chr(226).chr(134).chr(145),
703
+ "&uArr;" => chr(226).chr(135).chr(145),
704
+ "&Ucirc;" => chr(195).chr(155),
705
+ "&ucirc;" => chr(195).chr(187),
706
+ "&Ugrave;" => chr(195).chr(153),
707
+ "&ugrave;" => chr(195).chr(185),
708
+ "&uml;" => chr(194).chr(168),
709
+ "&upsih;" => chr(207).chr(146),
710
+ "&Upsilon;" => chr(206).chr(165),
711
+ "&upsilon;" => chr(207).chr(133),
712
+ "&Uuml;" => chr(195).chr(156),
713
+ "&uuml;" => chr(195).chr(188),
714
+ "&weierp;" => chr(226).chr(132).chr(152),
715
+ "&Xi;" => chr(206).chr(158),
716
+ "&xi;" => chr(206).chr(190),
717
+ "&Yacute;" => chr(195).chr(157),
718
+ "&yacute;" => chr(195).chr(189),
719
+ "&yen;" => chr(194).chr(165),
720
+ "&yuml;" => chr(195).chr(191),
721
+ "&Yuml;" => chr(197).chr(184),
722
+ "&Zeta;" => chr(206).chr(150),
723
+ "&zeta;" => chr(206).chr(182),
724
+ "&zwj;" => chr(226).chr(128).chr(141),
725
+ "&zwnj;" => chr(226).chr(128).chr(140),
726
+ "&gt;" => ">",
727
+ "&lt;" => "<"
728
+ );
729
+
730
+ $return = strtr($str, $htmlentities);
731
+ $return = preg_replace('~&#x([0-9a-f]+);~ei', 'RSSImport_code_to_utf8(hexdec("\\1"))', $return);
732
+ $return = preg_replace('~&#([0-9]+);~e', 'RSSImport_code_to_utf8(\\1)', $return);
733
+
734
+ return $return;
735
+ }
736
  ?>
screenshot-1.png ADDED
Binary file