View Full Version : Still in the dark about RSS (Not anymore!!!)
harlequin2k5
10-27-2005, 11:41 PM
Ok so this isn't my first post about RSS and I'm still asking the same question and I'm just not getting it
Coding Forums has an RSS feed...
If I wanted to display the contents on my website - how do I do it?
I understand how to make my own feed - but how do I display someone else's?
I went through the doc's on w3c on what rss is and a couple of other sites that have been suggested in previous posts and I'm sorry to be so gosh darn thick about this...:confused:
gsnedders
10-28-2005, 12:07 AM
On the OS level there's applications like NewsFire (http://www.newsfirerss.com/), and you can parse it using PHP and a script such as SimplePie (http://skyzyx.com/projects/simplepie/).
harlequin2k5
10-28-2005, 12:34 AM
Wow I really am being stupid about this...
Does that mean that a software is required to do this? I've seen the SimplePie one and I've even looked into a couple of DreamWeaver extensions as that's the editor I'm using to design this site.
I've read articles on how to import/export feeds (which of course I would be importing) and still can't understand how it works
I would prefer to look up my own feeds and there are only 1 or 2 possible feeds that I could find that I would even use for a bowling website (and of course now I can't remember what they were - I know one of them was for a discount bowling equipment website)
I think my question then is - Is a software required?
gsnedders
10-28-2005, 12:56 AM
Yes. A piece of software or a script is required.
harlequin2k5
10-28-2005, 03:38 AM
Now I understand why I couldn't understand how to do it *chuckles* :rolleyes:
Thank you for your patience and thank you for your help error404!!
harlequin2k5
10-28-2005, 04:01 PM
I finally got it!!!
I went out to InterAKT and bought their RSS Reader/Writer and just fooling around I threw a page (http://www.swegerconstruction.com/test/untitled-2.cfm) up using the CodingForums rss - I even went so far as to apply a font style and change the size of the table!!
Thanks again Error404!!!
gsnedders
10-28-2005, 04:14 PM
On that page you posted, why all the whitespace above the source? The XML declaration has to start at the first character of the document, no whitespace or anything preceding it.
harlequin2k5
10-28-2005, 04:24 PM
All of the CF code is up there - if I'm not mistaken I can move it to within the document...Please advise if that's not correct
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfparam name="PageNum_rsRSS" default="1">
<cfscript>
MXRSS_rsRSS = Request.Create_MX_Rss('MX_RssReader');
MXRSS_rsRSS.setConnection('sci');
MXRSS_rsRSS.setCacheTime(60);
MXRSS_rsRSS.getFeed("http://www.codingforums.com/external.php?type=rss");
</cfscript>
<cfset rsRSS = MXRSS_rsRSS.getRssRecordset()>
<cfset MaxRows_rsRSS=5>
<cfset StartRow_rsRSS=Min((PageNum_rsRSS-1)*MaxRows_rsRSS+1,Max(rsRSS.RecordCount,1))>
<cfset EndRow_rsRSS=Min(StartRow_rsRSS+MaxRows_rsRSS-1,rsRSS.RecordCount)>
<cfset TotalPages_rsRSS=Ceiling(rsRSS.RecordCount/MaxRows_rsRSS)>
<cfset QueryString_rsRSS=Iif(CGI.QUERY_STRING NEQ "",DE("&"&CGI.QUERY_STRING),DE(""))>
<cfset tempPos=ListContainsNoCase(QueryString_rsRSS,"PageNum_rsRSS=","&")>
<cfif tempPos NEQ 0>
<cfset QueryString_rsRSS=ListDeleteAt(QueryString_rsRSS,tempPos,"&")>
</cfif>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
oracleguy
10-28-2005, 07:10 PM
Actually, if you have access to the ColdFusion administrator for the server, there is a setting in there that like basically removes the whitespace left where the ColdFusion code was. Which can be nice to do since then your pages don't have a huge ammount of extra whitespace from where all your code was.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.