Warning: stripos() expects parameter 1 to be string, array given in /home/blevins/thedonkeysmouth.com/wp-content/plugins/wp-slimstat/wp-slimstat.php on line 269
Wordpress RSS Thumbs Widget | The Donkey’s Mouth

WordPress RSS Thumbs Widget

This is a plugin which will provide you with a widget in which you can pull thumbnails from up to two RSS feeds.  I created it to showcase the latest posts from my daughters’ blogs with thumbnails of the posts along with the title of the post and a link to the original post.

Download RSS Thumbs Widget here.

I wrote this because I was originally trying to use the very nice KB Advanced RSS Widget, but apparently, the feed parser in WordPress doesn’t support enclosures.  I still use the KB widget for other feeds on my blog.

Since I’m using SimplePie, I also could have just included the necessary SimplePie code in my template, but I wanted to include it with the other widgets on my blog and be able to move it around from within the WP Admin.  Besides, what’s the fun in that?

Requirements:

  • The RSS feed from which you are pulling must contain thumbnails.  I use the plugin MediaRSS on the WordPress blog(s) providing the feed, which works great.
  • Requires that both SimplePie Core and SimplePie Plugin for WordPress plugins be installed.

Installation

You MUST be using a widgets-enabled theme. If you are using pre-2.2 WordPress, you’ll also need the sidebar widgets plugin.

  1. WP 2.7+: Use the plugin installer (oops, not yet, I still have to submit it to WordPress). Upload the rss-thumbs-widget folder to either /wp-content/plugins/widgets/ or /wp-content/plugins/.
  2. Activate the widget through the ‘Plugins’ menu in WordPress.
  3. Add the new RSS Thumbs widget to your sidebar through the ‘Presentation => Sidebar Widgets’ menu in WordPress.

Features:

  • Provides a control panel where you can specify name, two feeds (one feed is also okay), how many items to display from each feed, what html should come before and after the feed(s) and the individual posts (defaults are <ul></ul>, and <li></li> respectively).
  • If there is more than one thumbnail associated with a post, it will pull only the first one.
  • Degrades gracefully.  If there are no thumbnails for a particluar feed or post, only the post title is included with a link to the post.

The Options and what they do:

Title

Pretty obvious, I think.  If you put a title in here, then that shows up, otherwise it doesn’t.

Feed 1 & Feed 2

The urls, including http://, but not including feed:, of the feeds you want to use.  The plugin uses SimplePie, so if you don’t know the exact url, SimplePie might be able to locate it.

Both feeds will be merged together and appear in the same list.

Max number of posts per feed (Default: 2)

If you have two feeds, then each feed will only be allowed to show x number of posts.

Total number of posts

This is the total number of combined posts that will be shown.

Before Feed, After Feed

The HTML you would like to have appear before the list begins.  Defaults to <ul> and </ul> respectively.

Before Item, After Item

Same as above, except this appears before each post.  Defaults to <li> and </li> respectively.

Here’s some example code using the default before and after values:

<ul>
<li>
<a href="http://link-to-blog-one">Blog One Name:</a><br /><a href="http://permalink-to-post">Post Title<br />
<img src="http://link-to-thumb.jpg" /></a>
</li>
<li>
<a href="http://link-to-blog-two">Blog Two Name:</a><br /><a href="http://permalink-to-post">Post Title<br />
<img src="http://link-to-thumb.jpg" /></a>
</li>
...
</ul>

TO-DO List

  • Add support for multiple instances of the widget
  • Templating
  • any suggestions?

If SimplePie ever comes out with a widget, then this plugin will (probably) become obsolete.

If you like this plugin please considering making a donation:




12 Comments

  1. just looking for the download location for your plugin. It hasn’t shown up yet on WordPress Plugins.

  2. great article. thank

  3. @bradley Sorry, I hadn’t submitted it yet, and I also forgot to include a download link here.

    You can download it here: http://thedonkeysmouth.com/attachments/rss-thumbs-widget-1-0.zip

    I have submitted it to WordPress so hopefully it will be available for download from there really soon.

  4. Hej, its just the plugin that I’m looking for! Unfortunately, it does not work yet:

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ‘,’ or ‘;’ in /www/htdocs/fburga/wp-content/plugins/rss-thumbs-widget/rss-thumbs-widget-1-0/rss-thumbs-widget.php on line 114

    Can you tell me how to solve the problem?

  5. Hello Eva,
    I’m sorry it’s not working for you. I can’t understand why, but I must admit I’m not a PHP Guru, either. Do you know what version of PHP you have? Version 4 or 5? I’m not sure this matters, but that could be an issue.

    Also, maybe you could just try downloading it again from the link above. I’ve made some changes since the first version and it might be fixed now.

    I’m working on the next version, but I’m pretty busy now so that won’t be done anytime soon. Besides that, I’m traveling to Uganda today, so I may not be able to answer much during the next week.

  6. [...] WordPress RSS Thumbs Widget | The Donkey’s Mouth (tags: tools wordpress plugins rss) [...]

  7. hi.. great work!
    Im wanting to publish a feed from a wesites blog to the homepage with thumbs. Ill give this a go.

    All the other solutions ive found seem to not work with wordpress 2.7.x Does this work with 2.7?

    Really all i want is to add thumb to my feed, then parse it as html and style it with css.

    thanks
    steve

  8. @Bristol

    Yes, this works with 2.7.x, hopefully. I say hopefully since it appears Eva (who commented earlier) had some difficulties with it. Anyway, the version you can download directly in the plugin downloader should work just fine.

  9. I started using this widget, and it works, except it is giving me this error right above everything that is working just fine:

    Warning: file_get_contents(http:) [function.file-get-contents]: failed to open stream: No such file or directory in /home/misterl1/public_html/lib_blogs/wp-content/plugins/simplepie-core/simplepie.inc on line 7792

    any ideas?

  10. Hmmm, not sure. Do you have the latest version of the simplepie-core plugin (not sure that matters, just grasping for straws)?

    Actually, on second thought, it sounds more like one of the streams you’re trying to use is not working. How many are you using and are they both showing up?

    If you’re using more than one and it’s not showing up, try removing it from the widget and see if that takes away the warning.

    Hope it works.

  11. Just installed this plugin and it says it doesnt have a valid header. Then the plugin doesnt display on my list of installed plugins, but is available if I find it through my host file manager. I deleted and tried a few times and still can’t get it activated. Am using the latest version of WP.

  12. Hi there,
    I am sorry to hear you are having trouble with this plugin.

    First of all, do you have both the SimplePie Core and SimplePie Plugin for WordPress plugins installed and activated?

    Also, you might look into disabling your other plugins one by one to see if there is a conflict with one of them (obviously, you should not disable the SimplePie plugins).

    I will also try to reproduce this error myself and see if I can find something out.

Leave a Reply