Plugin Directory

RSSImport

Import and display Feeds in your blog, use PHP or the Shortcode.

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 or SimplePie for parse feeds.

Use following code with a PHP-Plugin or in a template, example sidebar.php or single.php, for WordPress:

Example:

<?php RSSImport(10, 'http://bueltge.de/feed/'); ?>

This is smallest code for use the plugin with your own feed-url. The plugin have many parameters for custom import of content form a feed. See the list of parameters. You can also use all parameters with shorcode in posts and pages.

Example for Shortcode: [RSSImport display="5" feedurl="http://bueltge.de/feed/"]

For all boolean parameter it is possible to use the string true or false or the integer value 0 or 1.

  1. display - How many items, Default is 5
  2. feedurl - Feed-Adress, Default is http://bueltge.de/feed/
  3. before_desc - string before description, Default is empty
  4. displaydescriptions - (bool) true or false for display description of the item, Default is false
  5. after_desc - string after description, Default is empty; you can use the follow strings for custom html %title% for title of entry and %href% for link of entry
  6. html - (bool) display description include HTML-tags, Default is false
  7. truncatedescchar - truncate description, number of chars, Default is 200, set the value to empty '' for non truncate
  8. truncatedescstring - string after truncate description, Default is ...
  9. truncatetitlechar - (int) truncate title, number of chars, Default is empty, set a integer 50 to the value for truncate
  10. truncatetitlestring - string after truncate title, Default is ' ... '
  11. before_date - string before date, Default is <small>
  12. date - (bool) return the date of the item, Default is false
  13. after_date - string after the date, Default is </small>
  14. date_format- your format for the date, leave empty for use format of your WordPress installation, alternativ give the php date string, Example: F j, Y; see also doku in Codex
  15. before_creator - string before creator of the item, Default is <small>
  16. creator - (bool) return the creator of th item, Default is false
  17. after_creator - string after creator of the item, Default is </small>
  18. start_items - string before all items, Default is <ul>
  19. end_items - string after all items, Default is </ul>
  20. start_item - string before the item, Default is <li>
  21. end_item - string after the items, Default is </li>
  22. target - string with the target-attribut, Default is empty; use blank, self, parent, top
  23. rel - string with the rel-attribut, Default is empty, use string, nofollow, follow
  24. desc4title - Use description for the title-attribut on the title-link, Default is false
  25. charsetscan - Scan for charset-type, load slowly; use this for problems with strings on the return content, Default is false
  26. debug - activate debug-mode, echo the array of Magpie-Object; Default is false, Use only for debug purpose
  27. before_noitems - HTML or string before message, when the feed is empty, Default is <p>
  28. noitems- Message, when the feed is empty, Default is No items, feed is empty.
  29. after_noitems - HTML or string before message, when the feed is empty, Default is </p>
  30. before_error - HTML or string before message, when the feed have an error, Default is <p>
  31. error - Errormessage, Default is Error: Feed has a error or is not valid
  32. after_error - HTML or string before message, when the feed have an error, Default is </p>
  33. paging - Pagination on, set TRUE, Default is FALSE
  34. prev_paging_link - Linkname for previous page, Default is &laquo; Previous
  35. next_paging_link - Linkname for next page, Default is Next &raquo;
  36. prev_paging_title - Title for the link of previous page, Default is more items
  37. next_paging_title - Title for the link of next page, Default is more items
  38. use_simplepie- Use the class SimplePie for parse the feed; SimplePie is include with WordPress 2.8 and can parse RSS and ATOM-Feeds, Default is false
  39. view - echo or return the content of the function RSSImport, Default is true; Shortcode Default is false

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.

All parameters it is possible to use in the function, only in templates with PHP, and also with the Shortcode in posts and pges.

Examples:

The function with many parameters:

RSSImport(
    $display = 5, $feedurl = 'http://bueltge.de/feed/', 
    $before_desc = '', $displaydescriptions = false, $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>' 
)

The shortcode with a lot of parameters:

[RSSImport display="10" feedurl="http://your_feed_url/" 
displaydescriptions="true" html="true" 
start_items="<ol>" end_items="</ol>" paging="true" ]

Interested in WordPress tips and tricks

You may also be interested in WordPress tips and tricks at WP Engineer or for german people bueltge.de

Requires: 1.5 or higher
Compatible up to: 3.4
Last Updated: 2012-4-24
Downloads: 98,566

Average Rating

4 stars
(42 ratings)

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
1 person says it's broken.

100,1,1 100,1,1
100,1,1
100,1,1 100,1,1 100,1,1
100,1,1
100,8,8
100,5,5
100,3,3 100,1,1
100,2,2 100,3,3
67,3,2
100,1,1
100,1,1
100,1,1
67,3,2
100,1,1
100,3,3 100,1,1
100,4,4
100,7,7 100,2,2
50,2,1