Plugin Directory

RSSImport

Author: Frank Bültge

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

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 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.

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

  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
  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. before_creator - string before creator of the item, Default is <small>
  15. creator - (bool) return the creator of th item, Default is false
  16. after_creator - string after creator of the item, Default is </small>
  17. start_items - string before all items, Default is <ul>
  18. end_items - string after all items, Default is </ul>
  19. start_item - string before the item, Default is <li>
  20. end_item - string after the items, Default is </li>
  21. target - string with the target-attribut, Default is empty; use blank, self, parent, top
  22. charsetscan - Scan for charset-type, load slowly; use this for problems with strings on the return content, Default is false
  23. debug - activate debug-mode, echo the array of Magpie-Object; Default is false, Use only for debug purpose
  24. view - echo or return the content of the function RSSImport, Default is true; Shortcode Default is false
  25. before_noitems - HTML or string before message, when the feed is empty, Default is <p>
  26. noitems- Message, when the feed is empty, Default is No items, feed is empty.
  27. after_noitems - HTML or string before message, when the feed is empty, Default is </p>
  28. before_error - HTML or string before message, when the feed have an error, Default is <p>
  29. error - Errormessage, Default is Error: Feed has a error or is not valid
  30. after_error - HTML or string before message, when the feed have an error, Default is </p>
  31. paging - Pagination on, set true, Default is false
  32. prev_paging_link - Linkname for previous page, Default is &laquo; Previous
  33. next_paging_link - Linkname for next page, Default is Next &raquo;
  34. prev_paging_title - Title for the link of previous page, Default is more items
  35. next_paging_title - Title for the link of next page, Default is more items

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 paramters 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 paramters:

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 paramters:

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

Please visit the official website for further details and the latest information on this plugin.

Tags: , , ,