Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 RSS Feed Code
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

The Impact
Junior Member

Australia
398 Posts

Posted - 18 October 2003 :  19:54:05  Show Profile
I noticed that there is an ASP page which generates the XML for a news feed on this forum.

I am interested in using this code for my forum. Would you be able to supply me with the code ?

Thankyou

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 October 2003 :  20:05:22  Show Profile  Visit dayve's Homepage
http://www23.brinkster.com/richsnitz/rssfeed.zip (right-click and Choose "Save Target As...")


Edited by - dayve on 18 October 2003 22:40:38
Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 18 October 2003 :  20:15:09  Show Profile
Thankyou very much !

Edited by - The Impact on 18 October 2003 20:15:41
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 18 October 2003 :  20:31:51  Show Profile  Visit masterao's Homepage
Try the link posted in this post.

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 18 October 2003 :  20:33:56  Show Profile
Perfect, thankyou very much both of you !
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 18 October 2003 :  20:37:56  Show Profile  Visit masterao's Homepage
You're welcome .

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 18 October 2003 :  21:16:38  Show Profile
I've decided to make a new RSS feed for my site's news but for some reason the page comes up like this http://v8impact.com/news/rss.asp in HTML.
<%@ Language="VBScript" %>

<%

' ## Here we can connect to the database

ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDatabaseLocation"
Set Conn = Server.CreateObject("ADODB.Connection")

' ## Time to actually open the database connection

Conn.Open ConnString

' ## Write the XML header

XML = ""
XML = 		"<?xml version=""1.0"" encoding=""ISO-8859-1"" ?><rss version=""0.92""><channel>"
XML = XML &	"<title>V8Impact Latest News</title>"
XML = XML &	"<link>http://www.v8impact.com/news/</link>"
XML = XML &	"<description>V8Impact Latest News</description>"
XML = XML &	"<image>"
XML = XML &	"<link>http://www.v8impact.com/news/</link>"
XML = XML &	"<url>http://www.v8impact.com/images/v8impact_logo1.jpg</url>"
XML = XML &	"<title>V8Impact Latest News</title>"
XML = XML &	"</image>"

' ## Open recordset object

Set Rs = Server.CreateObject("ADODB.Recordset")

' ## Write the SQL needed for the page

StrQry = "SELECT N_ID, N_Title, N_Date, N_Blurb FROM News ORDER BY N_ID DESC;"

Rs.Open StrQry, Conn

' ## Start database loop

If Not Rs.EOF Then
   For I = 1 to 5
	XML = XML &	"<item>"
	XML = XML &	"<title>" & Rs("N_Title") & "</title>"
	XML = XML &	"<link>http://www.v8impact.com/news/default.asp?article=" & Rs("N_ID") & "</link>"
	XML = XML &	"<description>Report posted on " & Rs("N_Date") & "...<br><br>" & Rs("N_Blurb") & "</description>"
	XML = XML &	"</item>"
   Rs.Movenext
   Next
End If

' ## Time to finish this page off

XML = XML &	"</channel>"
XML = XML &	"</rss>"

Response.Clear
Response.Expires = 0
Response.ContentType = "text/xml"
Response.Write XML

' ## Finish database object

Set Conn = Nothing

' ## Close the recordset

Set Rs = Nothing

' ## Say goodbye to the connection

%>
Any idea what's wrong ?

Edited by - The Impact on 18 October 2003 21:17:20
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 18 October 2003 :  22:28:07  Show Profile
you need to convert & to &amp; in your titles.

you can do that by changing this:

Rs("N_Title")

to this:

replace(Rs("N_Title"),"&","&amp;")
Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 18 October 2003 :  22:44:15  Show Profile
I have done that and uploaded it but it still does not show up like an XML file. I'm sure that I'm missing something simple as this is my first time using XML.
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 October 2003 :  22:54:46  Show Profile  Visit dayve's Homepage
are you seeing the error that is produced?

End tag 'description' does not match the start tag 'br'. Error processing resource 'http://v8impact.com/news/rss.asp'. Line 1, Position 664


Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 October 2003 :  22:56:30  Show Profile  Visit dayve's Homepage
change this line:

XML = XML & "<description>Report posted on " & Rs("N_Date") & "...<br><br>" & Rs("N_Blurb") & "</description>"


to this:

XML = XML & "<description>Report posted on " & Rs("N_Date") & "...<br /><br />" & Rs("N_Blurb") & "</description>"

Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 18 October 2003 :  23:07:39  Show Profile
I just re-opened the browser and it worked ! Thanks for everyone's help !

Edited by - The Impact on 18 October 2003 23:12:01
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 18 October 2003 :  23:35:52  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
I didn't want to interupt till things got fixed. My question is asked out of naivete.
I recently got a RSS parser up and I am grabbing feed into my site. I in no way have enough traffic to even dream about exporting my stuff. My question is:
Do alot of folks pull in RSS from other's forums? Do you guys pull in feeds from specific sites to keep on top of a particular subject the way I hang out here trying learn about asp and Snitz? Just wonderin'
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 October 2003 :  23:49:07  Show Profile  Visit dayve's Homepage
I use Blog Syndications (same thing) for feeds to my reader, not so much for forums although I had Snitz in my list for awhile, but since I visit Snitz on a daily basis I saw no real need for having it on my reader.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07