vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=288098

Calling recent blog posts externally
by Fuzz
21 Sep 2012 00:22

Hey guys,

I have scoured the forums and can't seem to find a straight answer on this, so can someone please help me out?

How can you call external data from my vBulletin 'blog'? I know how to use the external.php and get the last 5 threads on a non-vb page, however, I would like to know how to do the same for blogs? Is this possible? is that what the 'blog_external.php" file is for? Do i do it like this?

<div class="smallfont">
<script type="text/javascript" src="http://www.thefinalfantasy.com/forums/blog_external.php?type=rss"></script>
<script language="" type="text/javascript">
<!--
for (var x in threads)
{
document.writeln("<img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <span class=\"time\">($vbphrase[posted_by]: "+threads[x].poster+")</span><br />");
}
//-->
</script></div>


Notice the rest after the JS call are for the latest threads (external.php) not blog, since I don't even know what variables or data I can even pull. Is there a list of such variables?

I have everything switched enabled in the admin panel for external data... so I guess my question is HOW to call the last 5 blog posts on a NON vbulletin page externally?

I appreciate any help you can provide.

Thank you,

kh99 21 Sep 2012 22:04

blog_external.php doesn't support javascript output, only RSS, so you can't use it that way. I think you'd have to write your own custom script to do it (which you might be able to do by combining the blog_external.php script with the javascript portion of external.php).

Fuzz 23 Sep 2012 05:03

Thanks for the reply and clearing that up for me. I attempted to combine the JS elements of the 'external.php' to the 'blog_external.php' file and calling it that way, but couldn't get it to work. I ended up just doing a custom query. Thanks again


All times are GMT. The time now is 23:28.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.