Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 21 Sep 2012, 01:22
Fuzz Fuzz is offline
 
Join Date: Jan 2002
Post Calling recent blog posts externally

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,
Reply With Quote
  #2  
Old 21 Sep 2012, 23:04
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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).
Reply With Quote
  #3  
Old 23 Sep 2012, 06:03
Fuzz Fuzz is offline
 
Join Date: Jan 2002
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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

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

Layout Options | Width: Wide Color: