PDA

View Full Version : How do I make a RSS to PHP file


1uxkz
09-04-2009, 04:49 PM
I would like to make a separate .php file for my forum that will display the latest news on the homepage using RSS, and use the IFRAME tags to place it on my site, I was wondering if any one could point me in the right direction to a tutorial, advice, or exactly how to do it.


Example of what I'm trying to accomplish :http://www.boxden.com/tracksandalbums.php

if some one could point me in the right direction that would be great, thank you very much

Lynne
09-04-2009, 05:38 PM
See these threads for methods to pull threads via javascript:
[HowTo] Display your latest threads on an external page using an RSS2 feed (http://www.vbulletin.com/forum/showthread.php?t=159044)
[HowTo] Display your latest threads on an external page using an XML feed (http://www.vbulletin.com/forum/showthread.php?t=158934)
[HowTo] Display your latest threads on an external page using an RSS feed (http://www.vbulletin.com/forum/showthread.php?t=158916)
As for iframe tags, I suppose just modify the javascript to do it.

UNRE4L
09-05-2009, 04:09 PM
How do you actually format the RSS into a form that suits your webpage though?

I have got the RSS to post, but I want to put it in a table all one one line, add images etc.

Lynne
09-05-2009, 04:18 PM
You have to modify the javascript to output it how you want. Right now, you get a bunch of lines defined by this:
$rss_output .= "<dt><strong><a href='" . trim($link) . "'>" . htmlspecialchars(trim($title)) . "</a></strong></dt><dd>" . htmlspecialchars(trim($description)) . "</dd>";


If you want it in a table, you'll have to modify that line and probably add the <table> tags around the whole thing.

UNRE4L
09-05-2009, 09:08 PM
Thanks Lynne.

Is there a list of the full array that external is able to use? Things like how many times a thread has been viewed etc, basically all the thread information I can get inside vb.

I'm looking for things like how many times its been viewed, the forum the thread is in, when was the last post, what time was the last post. I've seen forums have external sites with the last post showing as "yesterday" etc

Lynne
09-05-2009, 09:12 PM
It's in the external.php page. There are not a lot - I think the five (I think?) used in the tutorial are it.