XF 2.2 External JS Data Provider Like vBulletin?

RobNH

Member
I've conducted some searches here, but really couldn't find anything. Does XenForo have an external JS Data Provider set up like vBulletin?

The reason I ask is I used to be able to embed the 10 most recent posts from a particular forum into a static HTML page on my site and I'm wondering if I can still do that now that I've converted over to Xenforo?
 
I'm not 100% sure the form that what you're referring to took, but we don't expose any data in a JS (or JSONP) format. The closest would be the RSS feed, though you'd likely need a JS library to fetch/parse that.
 
Thanks for responding Mike. The code that was used on my site to pull in the threads from the vbulletin forums is as follows:

Code:
<script type="text/javascript" src="/forums/external.php?type=js&forumids=250,215,36,214,273,221,269,230"></script>
<script language="" type="text/javascript">
<!--
for (x = 0; x < 12; x++)
{
if (typeof(threads[x]) != "undefined")
{
document.writeln("<li style=\"padding-bottom: 5px;\"><a href=\"/forums/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> Posted By: "+threads[x].poster+"</li>");
}
}
//-->
</script>
 
I might be missing something here, but why not just create a page and throw a new posts widget on there with a display condition?

$xf.reply.containerKey == 'node-xxx'

EDIT: Actually, you wouldn't even need the conditional - was thinking of something else there.
 
Last edited:
Back
Top Bottom