How to get your latest posts from vbulletin via RSS

By Aaron on January 31, 2009
You need to enable the External Data Provider in your vbulletin settings in order for this to work. RSS2 http://www.yourdomain.com/forums/external.php?lastpost=true&type=rss2 Example: http://www.ozsource.org/forums/external.php?lastpost=true&type=rss2 RSS http://www.yourdomain.com/forums/external.php?lastpost=true&type=rss Example: http://www.ozsource.org/forums/external.php?lastpost=true&type=rss To display only new posts use external.php?newpost=true&type=rss instead. Now how do you get this into wordpress? Out of the box, WordPress can retrieve and pass an RSS feed. WordPress […]

You need to enable the External Data Provider in your vbulletin settings in order for this to work.

RSS2

  • http://www.yourdomain.com/forums/external.php?lastpost=true&type=rss2

Example: http://www.ozsource.org/forums/external.php?lastpost=true&type=rss2

RSS

  • http://www.yourdomain.com/forums/external.php?lastpost=true&type=rss

Example: http://www.ozsource.org/forums/external.php?lastpost=true&type=rss

To display only new posts use external.php?newpost=true&type=rss instead.

Now how do you get this into wordpress?

Out of the box, WordPress can retrieve and pass an RSS feed. WordPress uses the MagpieRSS and RSSCache functions for parsing and automatic caching and the Snoopy HTTP client for the actual retrieval. See Fetch_rss.

A code sample to fetch your 10 latest posts:

<?php // Get RSS Feed(s)
include_once(ABSPATH . WPINC . '/rss.php');
$rss = fetch_rss('http://www.your domain.com/forums/external.php?lastpost=true&type=rss');
$maxitems = 10;
$items = array_slice($rss->items, 0, $maxitems);
?>

Article written by Aaron

This is for the latests threads, not posts. Is there a way built into vBulletin to get the latest posts? (Even if the thread is a month old, but someone posts to it today, I want that at the top of the list)

  • Ok, now I realize what you meant:

    external.php?lastpost=true&type=rss - gives you the Most Recent posts in any thread on the forums

    external.php?newpost=true&type=rss - gives you only the most recent threads in the forum, doesn't matter when last post was entered, only when thread was created.

    Thanks so much for this help, I almost edited external.php to make it do something it already does... you'd be surprised how hard it is to find this information!

  • Leave a Reply to Sean Kendle Cancel reply

    Your email address will not be published.