ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 5th, 2005, 02:52 PM
Panther893's Avatar
Panther893 Panther893 is offline
MostarDesigns.com
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Posts: 834 Panther893 User rank is Second Lieutenant (5000 - 10000 Reputation Level)Panther893 User rank is Second Lieutenant (5000 - 10000 Reputation Level)Panther893 User rank is Second Lieutenant (5000 - 10000 Reputation Level)Panther893 User rank is Second Lieutenant (5000 - 10000 Reputation Level)Panther893 User rank is Second Lieutenant (5000 - 10000 Reputation Level)Panther893 User rank is Second Lieutenant (5000 - 10000 Reputation Level)Panther893 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 22 h 29 m 4 sec
Reputation Power: 56
Send a message via MSN to Panther893
Exclamation creating an RSS feed

ok im trieing to make an rss news feed from my database, this is what i have so far but it isnt working for some reason:

Code:
<cfsetting enablecfoutputonly="yes">

<cfquery name="news_list" datasource="#datasourcename#" blockfactor="100">
SELECT ID, title, content, dateposted, poster, image, layout
FROM news
ORDER BY ID DESC
</cfquery>
<cfsavecontent variable="theXML">
<cfoutput><?xml version="1.0" encoding="ISO-8859-1" ?>
	<!--RSS GENERATED BY FMREHAB.COM ON #now()#-->
	<rss version="2.0">
		<channel>
		<title>#sitename#</title>
		<description>#description#</description>
		<language>en-us</language>
		<copyright>#sitename# 2005</copyright>
		<docs>#address#/rss/</docs>
		<lastBuildDate>#dateFormat(now())# #timeFormat(now())# EST</lastBuildDate>
</cfoutput>
  <cfloop from="1" to="#news_list.recordcount#" index="ctr">
  	<cfscript>
	title = relpace(news_list.title[crt], "<", "<", "ALL");
	content = relpace(news_list.content[crt], "<", "<", "ALL");
	content = relpace(content, "&", "&", "ALL");
	content = relpace(content, "", "'", "ALL");
	date = dateformat(news_list.dateposted[crt], "ddd, dd mmm yyyy");
	poster = relpace(news_list.poster[crt], "<", "<", "ALL");
	</cfscript>
	<cfoutput>
		<item>
		<title>#title#</title>
		<description>#paragraphFormat(content)#</description>
		<link>http://www.fmrehab.com/news.cfm?ID=#ID#</link>
		<author>#poster#</author>
		<pubDate>#date#</pubDate>
		</item>	
	</cfoutput>
  </cfloop>
<cfoutput>
	</channel>
	</rss>
</cfoutput>
</cfsavecontent>

<cfx_filemanager action = "write"

userid = "hidden"

password = "hidden"

file = "#directory#/rss/rss_news.xml"

output = "#thexml#"

>


my host is making me use a special replacement tag for cffile.

and this is the error

"Error Diagnostic Information

An error occurred while evaluating the expression:


title = relpace(news_list.title[crt], "<", "<", "ALL");
content = relpace(news_list.content[crt], "<", "<", "ALL");
content = relpace(content, "&", "&", "ALL");
content = relpace(content, "", "'", "ALL");
date = dateformat(news_list.dateposted[crt], "ddd, dd mmm yyyy");
poster = relpace(news_list.poster[crt], "<", "<", "ALL");

"

Any help is appreciated.
__________________
MostarDesigns.com

Reply With Quote
  #2  
Old September 5th, 2005, 03:34 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,700 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 17 h 45 m 21 sec
Reputation Power: 53
Not sure what the error actually is (I'm assuming it is something inside the CFX file but no idea what...).

I did find this article on creating RSS with CF, but if the problem is in the CFX tag it might not help much. Here it is anyway: http://www.alphafilter.com/?inc=article&aid=97
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > creating an RSS feed


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT