RSS Feed (by forum & by cat)

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/56247?pagenum=1
05 November 2025, 01:39

Topic


MarcelG
RSS Feed (by forum & by cat)
21 December 2004, 16:17


I've been tuning the rss-feed functionality, and have come up with a RSS feed that should run on virtually all Snitz fora. Installation ; very very very easy.

21-12-2004 ; Initial version, tested at oxle.com. 22-12-2004 ; Version 1.1, working at oxle.com. 18-01-2005 ; Version 1.2, working at oxle.com. Functionallity
  • Creates a general RSS feed for all public fora : rss.asp
  • Creates a rss feed per cat, by using rss.asp?cat_id=xx
  • Creates a rss feed per forum, by using rss.asp?forum_id=xx
  • RSS 0.92 compliant
  • Includes RFC-822-compliant dates
  • Shows last post-author per topic
How to install: Copy the code below, and save it as RSS.ASP
View source of RSS.ASP (login required, use user: demo, password demo if you're a guest)

The image Create an image of your own, and save it as RSS.GIF. Be sure to adjust lines 122 and 123 to make it fit:
Code:
xml = xml & "<width>128</width>"
xml = xml & "<height>29</height>"
The Timezone Be sure to adjust lines 154 and 155 to select the correct timezone of your forum:
Code:
' define your timezone offset below. Examples : "+0100" for GMT+1, "EST", "GMT"
rfc822timezone = " +0100"
That's all.
Examples:
http://oxle.com/rss.asp
http://oxle.com/rss.asp?cat_id=14
http://www.scoutingkeentmoesel.nl/rss.asp (with different LCID, showing that the RFC822 formatting does work)

Enjoy. Any improvements/suggestions are very welcome!
BTW ; food for thought ; should 'views' by RSS feed be counted as a topic-view ? (so, increase viewcount ???)

Support -> this topic: http://www.oxle.com/topic.asp?TOPIC_ID=1865
Update 18-1-2005 Updated version, fixed some bugs.<

 

Replies ...


Etymon
28 December 2004, 09:39


Thank you for the code Marcel! I haven't yet ever used RSS, but it's nice to have this just in case. smile
Happy New Year,

Etymon
<
ILLHILL
01 January 2005, 20:26


What script to use to display the RSS on your site? The one from the original syndication mod? And, if so, what does need to be changed?<
Podge
16 January 2005, 09:19


I just noticed something Marcel.
Should the <i> </i> tags be included in the rss feed?
I think its causing Trillian (and maybe other rss readers) to display the topic titles incorrectly.
This is a fragment from your own rss feed.
Code:
- <title>
Sticky: Usefull sites on the web, add to favorites
<i>(16-01-2005 13:19:10)</i>
</title>

You can see that the date and time are a new child element when they shouldn't be.
<
MarcelG
16 January 2005, 14:43


Yep, well spotted. That piece should go!<
Podge
16 January 2005, 15:02


It solved the problem in Trillian for me when I took out the <i> tags.
Not sure that the date & time should be there either, its already included in the pubDate element.
I like the way you can get rss feeds by forum & category.<
Jorrit787
24 January 2005, 17:22


I installed it, and it seems to work fine, except for 2 things - This is the beginning of the RSS code:

<rss version="0.92">
-
<channel>
<title>The Anything Goes Forum</title>
<link>http://www.ag-forum.com/</link>
<description>The Anything Goes Forum</description>
<author/>
<image2>http://www.ag-forum.com/rss.gif</image2> -
<image>
<link>http://www.ag-forum.com/default.asp</link>
<url>http://www.ag-forum.com/oxle.jpg</url> <title>The Anything Goes Forum RSS Feed</title>
<width>42</width>
<height>20</height>
</image>

The first problem is that my forum uses an images folder, so I would like the RSS Feed to use images/RSS.gif in stead of root/RSS.gif . The second problem I'm not sure about... What does Oxle have to do with my RSS Feed?<
MarcelG
25 January 2005, 02:39


Jorrit, oxle has nothing to do with your site. So, you should replace these lines with your images, and you can hardcode the Images folder into it, or use the variable for it. <
Jorrit787
25 January 2005, 17:56


Ok, I will try that. What exactly does the image do if I may ask?<
dayve
25 January 2005, 21:02


I've been checking this version out and not sure if it is me or my site, but it seems sluggish when rendering the page...
http://www.burningsoulsforum.com/forum/bsf_rss.asp?forum_id=1<
Podge
25 January 2005, 21:06


Seems fine to me. Lightning fast.<
MarcelG
26 January 2005, 01:58


Originally posted by Jorrit787
Ok, I will try that. What exactly does the image do if I may ask?
The image is shown in (most) RSS readers. Example:
<
Jorrit787
26 January 2005, 11:49


All that is showing when opening my forum's RSS feed with SharpReader is this:

There are 45 replies, with the last one on Jan 26 2005 at 05:10:57 by suzyQ222

Isn't the whole topic supposed to show?<
MarcelG
26 January 2005, 14:43


That depends on what you want ; I made this one to show only the info about the topic. I've also got the headlines.asp (http://www.oxle.com/source.asp?page=headlines.asp) and that one shows the content of the topic (not the replies).<
gelliott
31 January 2005, 22:33


Marcel - thanks for the code, this works great. A few notes though - (a) the TTL tag is a element of Channel, not Item, thus needs to be up near the title (line 115-116 maybe?). Also, in your source you have an author tag at line 116 using a Topic_Last_Post_Author variable that has not yet been defined. I have changed that to the title of my forum.<
MarcelG
01 February 2005, 02:35


Thanks for the feedback Gelliot. I'll be looking into it later today, when I get back from the dentists.....(I don't wánt to.....boohoo)<
pianomagic
02 February 2005, 17:49


Hi guys,

marcel, I especially thank you for the rss feed. Yesterday I was able to hook it up and bring the last TEN TOPICS to the front page of my web site! bigsmile It works in conjunction with the javascript translator via RSSDIGEST.

I have two questions:
  • Do you know how to make the first 200 characters of the last post visible, instead of showing the number of replies?
  • I'm really The Villiage Idiot regarding XSL and XML, but is it possible to bypass using RSS DIGEST for the translation services? Instead of having to wait for the cache to 'refresh' at RSS DIGEST, is there a way I can have everything work directly on my site and display changes immediately as they occur?
Hopefully my questions make sense. I'm doing the best i can here...and that's pretty good for TVI! blackeye
Hope the dentist was gentle!clown
Again, sincere thanks for your input; as well as everyone else here. I've learned enough to be dangerous, but having fun in the effort!bigsmile

Mike

www.pianomagic.com<
cl_dk
03 February 2005, 03:13


Hi Mike,

I think the RSS functionality is GREAT for many things, but in your case - piping forum content to your website, I am wondering if the "Content Display" mod could be of any help?
This MOD allows you to display content from your forum in many different manners and styles all from a single file. This zip also includes article.asp which allows you to have an article system by adding only 2 new ASP pages. You could even make it a column, news postings...whatever! This MOD is also designed to display forum content outside your forum!
Please note I have not installed it my self yet - so I am not 100% sure on how it works... Get it here: http://www.snitzbitz.com/mods/details.asp?Version=3.4&mid=63

Kind regards,
CL<
pianomagic
03 February 2005, 12:13


Thanks for the suggestion cl_dk, but RSS is the route I think I need. The reason? I'm in the process of setting up an Affiliate Program for my members, and the RSS feed could easily be added to their promotional pages, as well as my own.

Still, I'll have a look at the mod you suggest. Might find another use for it, too!smile
I just LOVE these forums!bigsmile

Mike

www.pianomagic.com<
pianomagic
03 February 2005, 18:33


I found my answer for making the first 200 characters of an RSS feed HERE in Snitz.com.
Still would like to know about XML/XSL if anyone can assist. Thanks!
Mike

www.pianomagic.com<
Podge
03 February 2005, 19:21


XML/XSL is a rather big subject. Youcould start here;

http://www.w3.org/XML/
http://www.w3.org/Style/XSL/

If you want to change XML (RSS, etc.) into html to show on your webpage you need to learn how to transfrom it using XSLT (eXtensible StyLesheet Transformation). Basically XSLT transforms one text document (XML) into another (HTML).
You should have a good grasp of XML before you attempt XSL/XSLT. I have always found XSLT to be rather difficult but extremely versatile.
If you want the easy way out, use the Syndication mod by Kurt - http://www.snitzbitz.com/mods/details.asp?Version=All&mid=195<
pianomagic
04 February 2005, 20:39


Thanks Podge,

The syndication mod installed EZ! But...I also want to display the last post (or about 200 characters of it).

I don't suppose anybody has modified this mod to also show the last post??...eh? THAT would make it P*E*R*F*E*C*T for me!bigsmile
And about the XMl/XSl stuff...it seems very complicated for my brain. I don't know if I'll be able to figure it out or not. If I do, I'll post it here!
Mike

www.pianomagic.com<
Scottie
22 February 2005, 19:22


Marcel, this is an excellent mod. Thanks for posting it.

Question. I noticed that the mod only lists RSS for the posts from today. Should it not compile posts for the entire database, or is this not required? Does the search engine read the RSS everyday and gather the past data ?

Also, I would like to submit the content of each post to the search engine, too.

Thanks!<
Scottie
22 February 2005, 20:26


Also, it is my understanding that when a browser requests an asp file, IIS should send back an htm file. Why does rss.asp open as rss.asp on my browser.

--Scottie
bmwturbos.scottiesharpe.com<
MarcelG
23 February 2005, 03:48


Scottie, the RSS page is not intended for search engines. It's intended for RSS readers/aggregators.
It doesn't parse ALL topics (that would be somewhat ridiculous, to parse all 10000 topics at once). It now parses the last 10 sorted on t_last_post_date (edit/reply). You can change this, by chaning the var intResults.
The content of the (original) post is added as the <description></description>.
About parsing HTML ; it doesn't parse HTML, it parses XML ; the format for RSS. The fact that your browser-address-bar shows rss.asp doesn't mean the content isn't HTML or XML. This topic is also shown in the browser as topic.asp?TOPIC_ID=56247 but it _is_ HTML.<
morbidpalooza
23 February 2005, 08:48


heres mine it works great!
http://www.morbidpalooza.com/forum/rss.asp<
Scottie
23 February 2005, 21:06


I think I understand. I understand that RSS readers can be used to get a "quick view" of the dynamic contents of a snitz forum. I am still confused as to the method of aggregating the entire contents of a Snitz database (yes, all the thousands of posts and ALL of their contents) into an RSS that a search engine can read and absorb.

The reason for my quest is that my web site is not being spidered properly by search engines. I would like the engines to crawl each individual topic post-by-post.

I think the best way to do this wouuld be to create an RSS feed of every topic, the contents of the post, and the link to the original post topic.asp?topic_id=xxxx

It seems quite odd that no one has done this before. I don't mind being the "first one" to hack through it (it should not be too difficult because I can build it on top of your excellent script of course! bigsmilebigsmile )

And point well taken on the html changing to asp blah blah blah. I must have "lost my mind .... just for a moment" bigsmile
Scottie
http://bmwturbos.scottiesharpe.com
<
modifichicci
04 March 2005, 08:42


For who has a Mysql db:
Change the lines from 48 to 69 with these:
Code:
strSql = "SELECT "
strSql = strSql & " T.T_REPLIES,"
strSql = strSql & " T.T_SUBJECT,"
strSql = strSql & " T.TOPIC_ID,"
strSql = strSql & " T.T_LAST_POST,"
strSql = strSql & " T.T_LAST_POST_AUTHOR,"
strSql = strSql & " T.T_LAST_POST_REPLY_ID,"
strSql = strSql & " T.T_MESSAGE"
strSql = strSql & " FROM " & strTablePrefix & "TOPICS T," & strTablePrefix & "FORUM F"
strSql = strSql & " WHERE T.FORUM_ID = F.FORUM_ID"
strSql = strSql & " AND F.F_PRIVATEFORUMS = 0"
if Request.QueryString("FORUM_ID") <> "" then
strSql = strSql & " AND T.FORUM_ID = " & cLng(Request.QueryString("FORUM_ID"))
end if
if Request.QueryString("CAT_ID") <> "" then
strSql = strSql & " AND T.CAT_ID = " & cLng(Request.QueryString("CAT_ID"))
end if
strSql = strSql & " AND T.T_STATUS = 1"
'strSql = strSql & " LIMIT " & intResults
strSql = strSql & " ORDER BY T.T_LAST_POST DESC"
strSql = strSql & " LIMIT " & intResults
set rs = Server.CreateObject("ADODB.Recordset")

Look to the corresponding lines, if tyhere are some little variations in numeration. So it's working in MySql
The variation is the elimination of TOP in the select statement, and the adding of the LIMIT value to select the last post.<
sbc
10 March 2005, 08:52


You can get invalid HTML generated when forum titles contain the & sign. This can be fixed by using Server.HtmlEncode:

xml = xml & "<title>" & Response.HtmlEncode(strNewTitle) & "</title>"
xml = xml & "<link>" & strForumURL & "</link>"
xml = xml & "<description>" & Response.HtmlEncode(strForumTitle) & "</description>"
xml = xml & "<author>" & Topic_Last_Post_Author & "</author>"
xml = xml & "<image2>" & strForumURL & "rss.gif</image2>"
xml = xml & "<image>"
xml = xml & "<link>" & strHomeURL & "</link>"
xml = xml & "<url>" & strForumURL & "oxle.jpg</url>"
xml = xml & "<title>" & Response.HtmlEncode(strForumTitle) & " RSS Feed</title>"<
hawkdrean
12 March 2005, 00:04


I'm new to rss but how do I get the rss.asp running and put the rss.gif in my forum<
kensalter
19 March 2005, 16:58


I made a MOD to this to add a <subject> tag to each item and also to add pinned topics to the feed.
If you would like it, you can get it at:

http://www.kensalter.com/downloads/rss.zip<
wildfiction
05 April 2005, 13:04


Many thanks marcel for the code and ken for the extra mod. I've added it to my forum:

http://emini.deltat1.com/forum/default.asp

Regards,
Guy<
MarcelG
05 April 2005, 14:34


Glad you like it!<
kensalter
10 April 2005, 07:49


Originally posted by wildfiction
Many thanks marcel for the code and ken for the extra mod. I've added it to my forum:

http://emini.deltat1.com/forum/default.asp

Regards,
Guy

I have made a new update:

1) conforms to RSS version 2.0 (previous was 0.92)
2) adds the text of replies to a topic to the feed

Same link as before to download:

http://www.kensalter.com/downloads/rss.zip<
MarcelG
10 April 2005, 10:17


Nice work! But...if I validate it, it still gives me lots of 'errors'... (even some more than with my version...) SharpReader works fine with it btw.
I'm now trying to migrate my 'headlines.asp' to your version.<
wildfiction
11 April 2005, 08:50


Originally posted by marcelgoertz
if I validate it, it still gives me lots of 'errors'... (even some more than with my version...) SharpReader works fine with it btw.
I'm now trying to migrate my 'headlines.asp' to your version.

What does the headlines.asp file do - with respect to RSS?
Also, Ken or Marcel: will there be any changes in the near future in an attempt to address some of the validation errors? If so, I won't install that version but wait for the next, otherwise I'll go ahead and install ken's RSS 2.0 file.
Thanks for the time and effort that you guys are putting into this. It is much appreciated. <
MarcelG
11 April 2005, 13:33


Wildfiction ; I've upgraded to Ken's version, so I guess this topic should be locked, and replaced by Ken's RSS mod! Works as a charm!
I haven't converted headlines.asp yet, but that's something that will follow soon.
FYI ; the headlines.asp takes the topics from my Frontpage forum and linkdump forum, and puts them in a seperate RSS feed. It displays the contents of each (starting)post, and not the last reply. So, more or less a 'news'-rss feed.<
wildfiction
12 April 2005, 09:28


thanks for the info marcel and thanks again for the update ken :) - i'll be installing it shortly.<
wildfiction
13 April 2005, 06:22


Originally posted by wildfiction
Many thanks marcel for the code and ken for the extra mod. I've added it to my forum:

http://emini.deltat1.com/forum/default.asp

Regards,
Guy

I have made a new update:

1) conforms to RSS version 2.0 (previous was 0.92)
2) adds the text of replies to a topic to the feed

Same link as before to download:

http://www.kensalter.com/downloads/rss.zip

I can't see any difference in this new RSS.ASP file. Can I confirm that the date stamp on the RSS.ASP (inside the zip) file should be 19 March 2005?<
NiteOwl
20 June 2005, 22:23


Marcel - Since the code on your site appears to be using he "Ken" code does this indicate that we no longer need to define timezones or images?

I am sorry but I am slightly confused as how to install. <
NiteOwl
20 June 2005, 22:57


Originally posted by modification
For who has a Mysql db:
Change the lines from 48 to 69 with these:
Code:
strSql = "SELECT "
---- Original message cut here-----
strSql = strSql & " LIMIT " & intResults
set rs = Server.CreateObject("ADODB.Recordset")

Look to the corresponding lines, if tyhere are some little variations in numeration. So it's working in MySql
The variation is the elimination of TOP in the select statement, and the adding of the LIMIT value to select the last post.

I have made the following changes, however I still get this error, BTW this is using the only code I can find which is provided by Ken and Marcel. Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
Code:

strSql = "SELECT " & intResults
strSql = strSql & " T.T_REPLIES,"
strSql = strSql & " T.T_SUBJECT,"
strSql = strSql & " T.TOPIC_ID,"
strSql = strSql & " T.T_LAST_POST,"
strSql = strSql & " T.T_LAST_POST_AUTHOR,"
strSql = strSql & " T.T_LAST_POST_REPLY_ID,"
strSql = strSql & " T.T_MESSAGE,"
strSql = strSql & " F.F_SUBJECT,"
strSql = strSql & " R.R_MESSAGE "
strSql = strSql & "FROM (FORUM_TOPICS T INNER JOIN FORUM_FORUM F ON T.FORUM_ID = F.FORUM_ID) LEFT JOIN FORUM_REPLY R ON T.T_LAST_POST_REPLY_ID = R.REPLY_ID"

'strSql = strSql & " FROM " & strTablePrefix & "TOPICS T," & strTablePrefix & "FORUM F," & strTablePrefix & "REPLY R"
Code:


'strSql = strSql & " WHERE T.FORUM_ID = F.FORUM_ID"
'strSql = strSql & " AND R.REPLY_ID = T.T_LAST_POST_REPLY_ID "
strSql = strSql & " WHERE (F.F_PRIVATEFORUMS = 0 OR F.F_PRIVATEFORUMS = 4) "
if Request.QueryString("FORUM_ID") <> "" then
strSql = strSql & " AND T.FORUM_ID = " & cLng(Request.QueryString("FORUM_ID"))
end if
if Request.QueryString("CAT_ID") <> "" then
strSql = strSql & " AND T.CAT_ID = " & cLng(Request.QueryString("CAT_ID"))
end if
strSql = strSql & " AND T.T_STATUS <= 1"
strSql = strSql & " ORDER BY T_LAST_POST DESC"
strSql = strSql & " LIMIT " & intResults

set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText



I receive this error:

[MySQL][ODBC 3.51 Driver][mysqld-4.0.15-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '.T_REPLIES, T.T_SUBJECT, T.TOPIC_ID, T.T_LAST_POST, T.T_LAST_PO

/CIMarE/forum/rss.asp, line 92


<
MarcelG
21 June 2005, 04:35


Originally posted by NiteOwl
Marcel - Since the code on your site appears to be using he "Ken" code does this indicate that we no longer need to define timezones or images?

I am sorry but I am slightly confused as how to install.
Yes you still need to define the timezone. Check the function Date2RFC822(Date2Convert); more specifically these lines:
Code:
' define your timezone offset below. Examples : "+0100" for GMT+1, "EST", "GMT"
rfc822timezone = " +0200"

The images need to be defined here:
Code:
xml = xml & "<title>" & strNewTitle & "</title>"
xml = xml & "<link>" & strForumURL & "</link>"
xml = xml & "<description>" & strForumTitle & "</description>"
xml = xml & "<image2>" & strForumURL & "images/oxlerss.gif</image2>"
xml = xml & "<image>"
xml = xml & "<link>" & strForumURL & strHomeURL & "</link>"
xml = xml & "<url>" & strForumURL & "images/oxlerss.gif</url>"
For the MySQL error; I'm afraid I cannot help you; my MySQL knowledge is zero... <
NiteOwl
21 June 2005, 09:32


Thanks Marcel! I have also sent an email to modifichicci asking if he could review the MySQL code for me. - Fingers are crossed.
BTW - What if one does not have any timezone offset, would entering 0000 be acceptable?

<
MarcelG
21 June 2005, 10:05


NiteOwl ;
The timezone offset that should be used is defined in RFC-822 ;
Code:
        zone             =  "UT"  / "GMT"                ; Universal Time
; North American : UT
/ "EST" / "EDT" ; Eastern: - 5/ - 4
/ "CST" / "CDT" ; Central: - 6/ - 5
/ "MST" / "MDT" ; Mountain: - 7/ - 6
/ "PST" / "PDT" ; Pacific: - 8/ - 7
/ 1ALPHA ; Military: Z = UT;
; A:-1; (J not used)
; M:-12; N:+1; Y:+12
/ ( ("+" / "-") 4DIGIT ) ; Local differential
Here are examples of valid RFC822 dates:
Code:
<pubDate>Wed, 02 Oct 2002 08:00:00 EST</pubDate>
<pubDate>Wed, 02 Oct 2002 13:00:00 GMT</pubDate>
<pubDate>Wed, 02 Oct 2002 15:00:00 +0200</pubDate>
So, in *all* cases you should have a timezone offset, whether it's EST, GMT, or +200<
NiteOwl
21 June 2005, 22:45


Thanks Marcel, that helps a lot!
Now I just have to get the MySQL fixed up and I am away to the races,
any help or suggestions would be greatly appreciated.

<
hans_
22 June 2005, 14:44


Great and how simple to use it![^][^][^]
Originally posted by marcelgoertz
I've been tuning the rss-feed functionality, and have come up with a RSS feed that should run on virtually all Snitz fora. Installation ; very very very easy.

21-12-2004 ; Initial version, tested at oxle.com. 22-12-2004 ; Version 1.1, working at oxle.com. 18-01-2005 ; Version 1.2, working at oxle.com. Functionallity
  • Creates a general RSS feed for all public fora : rss.asp
  • Creates a rss feed per cat, by using rss.asp?cat_id=xx
  • Creates a rss feed per forum, by using rss.asp?forum_id=xx
  • RSS 0.92 compliant
  • Includes RFC-822-compliant dates
  • Shows last post-author per topic
How to install: Copy the code below, and save it as RSS.ASP
View source of RSS.ASP (login required, use user: demo, password demo if you're a guest)

The image Create an image of your own, and save it as RSS.GIF. Be sure to adjust lines 122 and 123 to make it fit:
Code:
xml = xml & "<width>128</width>"
xml = xml & "<height>29</height>"
The Timezone Be sure to adjust lines 154 and 155 to select the correct timezone of your forum:
Code:
' define your timezone offset below. Examples : "+0100" for GMT+1, "EST", "GMT"
rfc822timezone = " +0100"
That's all.
Examples:
http://www.oxle.com/rss.asp
http://www.oxle.com/rss.asp?cat_id=14
http://www.oxle.com/bevers/rss.asp (with different LCID, showing that the RFC822 formatting does work)

Enjoy. Any improvements/suggestions are very welcome!
BTW ; food for thought ; should 'views' by RSS feed be counted as a topic-view ? (so, increase viewcount ???)

Support -> this topic: http://www.oxle.com/topic.asp?TOPIC_ID=1865
Update 18-1-2005 Updated version, fixed some bugs.
<
MarcelG
23 June 2005, 04:21


Glad to see you like it! bigsmile<
hans_
23 June 2005, 04:42


Yes I like it marcelgoertz. One q. maybe. Must I set timezone in rss.asp code if I have, the same timezone like you?
Thanks smile <
MarcelG
23 June 2005, 06:16


No, the timezone you should select, would need to reflect the timezone of your site. So, for example, if you've set the time of your forum to reflect let's say the time in Florida, you should specify the timezone offset in your RSS file to reflect the Florida timezone (of which I have no clue which time zone that is...I guess EST). This to ensure that the reader of the RSS feed knows that the post time of 12:20:12 is 12:20:12 Florida time, and not 12:20:12 local (e.g. the readers) time.<
hans_
23 June 2005, 06:24


I see, thank you.<
Gandiel
23 June 2005, 13:33


Does this also conform to security settings per forum?
Would someone be able to manually add cat_id=XX to their querystring and start viewing private topics?

Gandiel<
hans_
23 June 2005, 14:09


I have probem with the date of the feed. I tested it in Opera 8.01 - here I see the date correct. I tried to use this reader http://feedreadercz.semania.com/ and I see the date of the same feed at 19 hours minus as in Opera. Where could be the problem? I made no changes in the rss.asp with time. Thanks<
MarcelG
23 June 2005, 16:49


Hans, can you provide me a with a link to both the RSS feed using http://feedreadercz.semania.com/ and your direct rss.asp file ? I'll have a look then.<
hans_
24 June 2005, 02:11


Certainly cheerfully
Here is the rss.asp, which I use on my forum: http://flashmedia.cz/2004/v_01/forum/rss.txt
Here is the link to EN version (2.9) of RSS read, what I use: http://feedreader.com/
Please try to test it, because feeds from others sites display the time correctly.

<
MarcelG
24 June 2005, 04:10


That feed is looking splendid ; http://flashmedia.cz/2004/v_01/forum/rss.asp
If I use SkyZyx to view the feed, it shows me the post times with the servertime of SkyZyx (US time, so about 9 hours earlier). So, thát part is working great.
I've tried Feedreader, but it seems that feedreader simply doesn't interpret the RSS feed correctly...I've also tried RssReader, and that one too displays the incorrect times... I'm a bit lost now. Here are two screenshots from your RSS feed. The first in RssReader:
The second in FeedReader:
Let's take that first topic as the key topic ;
The RSS feed gives this info about that topic:
Code:
- <item>
<title>FLASH-oznacenie framov na filter</title>
<author>lamar</author>
<link>http://www.flashmedia.cz/2004/v_01/forum/topic.asp?TOPIC_ID=446</link>
<subject>Zaèal(a) jsem nedávno s Flashem a nevím, jak...</subject>
<ttl>10</ttl>
<pubDate>Fri, 24 Jun 2005 09:09:49 +0200</pubDate> - <description>
- <![CDATA[ removed for layout purposes ]]>
</description>
</item>
So, we've got the time info, which is today at 9:09 am, in the timezone GMT+2. So, when that topic was posted/last replied to, the GMT (Greenwich Mean Time) would be 07:09am. However, when I view it (timezone GMT+1), it shows as being posted at 11:04am in RssReader, and as posted at 14:09 yesterday in Feedreader.... question It's not just your feed that's displayed incorrectly ; also my own feed (http://www.oxle.com/rss.asp) is displayed incorrectly... A topic posted this morning at 09:04 +200 (so, 07:04 GMT) is displayed as being posted at 11:04 in RssReader, and as 14:04 yesterday in FeedReader... I'm lost......<
hans_
24 June 2005, 04:44


Hm, thank for exploration. I used the feed reader in Opera as I written, there was the time of my feeds OK. But if somebody don´t know the problem, use of course own reader and think, that then time of my feeds are correct. <
NiteOwl
25 June 2005, 18:13


Hi Marcel - When one follows this link:

View source of RSS.ASP (login required, use user: demo, password demo if you're a guest)

there is a small piece of code missing at the bottom, the missing code is:

Code:
%>

<
NiteOwl
25 June 2005, 19:05


What are your favorite RSS Readers,, so far I have seen and tried these:

SharpReader Pluck for Internet Explorer FeedReader <
NiteOwl
26 June 2005, 00:01


At one of my sites I am receiving this error: does anyone have an idea what is wrong?
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Whitespace is not allowed at this location. Error processing resource 'http://www.bcfmwu-forum.com/rss.asp'. Line 1, Posit...
<?xml version="1.0" encoding="ISO-8859-1" ?><!-- RSS generation done by Snitz Forums 2000 on 2005/06/25 21:04:52 -...
<
MarcelG
26 June 2005, 04:52


NiteOwl, I'm not experiencing the missing %> in rss.asp ; it works just fine when I check it out. A bit strange.
I'm using SharpReader most of the time ; seems to do the job just ok for me. I also tried your rss feed from BCFMWU-forum.com, and in SharpReader it works. However, the time is also not displayed as it should be. Are you sure you've used my rss.asp file? question <
NiteOwl
26 June 2005, 14:41


HI Marcel:

I am using the rss.asp from your site, and now SharpReader, however I have the following for the time, and maybe thats my problem;
rfc822timezone = "CST"
My Servers are in Newark, Delaware and my site is on the Pacific Coast in BC, Canada

I have now changed it too:
rfc822timezone = "-0700"

seems better?
<
MarcelG
27 June 2005, 05:50


I'll check it tonight when I get home.<
NiteOwl
27 June 2005, 11:20


Something interesting:

When using the RSS code, all security to a site is circumvented...? Even if you do not have an account you are able to pull messages up and read, at least that is what I think I see?
<
MarcelG
27 June 2005, 13:53


Well, the RSS feed pulls only topics from non-private forums. But, I guess you've defined 'require registration', and have nót defined whether or not the forums where private or not. This RSS.asp page does not support public forums which require a visitor to log in. I'm not sure if that's possible at all by the way, but that's something else. The RSS feed should be public afaik, and if you require registration to your forums, there's nothing public (everything is private)....<
NiteOwl
27 June 2005, 17:25


I have two sites:

Marine Forum Totally OPEN

Union Forum Totally PRIVATE

however in your message above you were able to see into the UNION forum without any registration. Pplease don't get me wrong, I very much like this code and want to use it for both my forums, however it seems to be flawed concerning access to areas that should require name and password.
BTW, I notice that of the 3 readers we have discussed, two of them allow username and passwords in the setup, yet the sharp-reader does not.
Anyway, at the moment (unless I have missed something) I don't think this RSS code is ready for prime-time on a MySQL database, which is too bad as it has a lot of really good potential, and I want to thank all those that keep this stuff going! I will keep the RSS feed to myself and not open it to my membership until I hvae a bit more security built in.


<
-gary
28 June 2005, 16:26


Here's an application example using this script as a base.
http://zx6r.com is a blog that is updated by users submitting posts to http://kawiforums.com/forum/forum.asp?FORUM_ID=64 Each new topic becomes an entry on the blog.
I modified the script here to either serve strict RSS http://kawiforums.com/forum/rss.asp?type=forum&id=64 or one with custom fields that are pulled from the Snitz DB http://kawiforums.com/forum/rss.asp?type=forum&id=64&style=raw by adding the "style=raw" flag. You can also specify a specific topic which is useful for creating the single entry pages when the text gets beyond a certain length. http://zx6r.com/entry.asp?id=35109

The raw style doesn't strip any forum code or the custom attachments the forum uses as the strict version does. These are left to be parsed on the display end.
Add a modified version of http://www.tele-pro.co.uk/scripts/rss/ to make it able to read the custom tags and you have a syndication client that is capable of being off the Snitz DB server yet still having access to any field you could serve locally and it caches the XML results to limit the number of hits back to the DB.<
gelliott
29 June 2005, 12:18


For those that asked about security, I have utilized this in my forum which is all private forums. In order to only serve up the topics to which the user has access, my RSS Config page offers each user a custom RSS link, which looks something like

rss.asp?memberid=1&key=a387wo3n

where the key is an excerpt from the middle of their encrypted password as stored in their member record. When rss.asp runs, if it finds a match between the user number and the middle excerpt of the key, then it uses a customized chkForumAccess function to return a array of allowed forums. Thus, instead of using F.F_PRIVATEFORUMS = 0 I build a string that results in something like F.FORUM_ID IN (3,6,13,19,24). Thus, each user gets a custom display of forums to which they have access.<
MarcelG
29 June 2005, 14:16


Nice one! Would you mind sharing pieces of that code, so we could work it into a complete mod? bigsmile<
gelliott
29 June 2005, 23:47


I'd be happy to - I'll need to remove the custom stuff - let me try to get to it over the weekend...bigsmilewink<
NiteOwl
30 June 2005, 02:06


Excellent, I too am looking forward to this! thanks!
<
MarcelG
30 June 2005, 03:46


Originally posted by gelliott
I'd be happy to - I'll need to remove the custom stuff - let me try to get to it over the weekend...bigsmilewink
Take your time, but do hurry! bigsmile hehe<
gelliott
30 June 2005, 15:34


OK fellow Snitzers... had a few extra minutes sooner that I thought...
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=209

I have uploaded a zip to SnitzBitz which will give you the code I used. I wrote it several months back, so I'm a little unsure of what I changed in the rss.asp file, but it shouldn't be much. You should be able to use your own rss.asp file with a few minor changes, but I included mine just in case. Read the readme.txt file for more details.
This set also includes a small FAQ/help screen (since I have to have someplace to distribute the customized urls anyway), and the appropriate images. Let me know what you think. As you look through my function includes, I think you'll find a fairly simple approach...bigsmiletonguewink
[edited for clarifications]<
MarcelG
01 July 2005, 08:56


Nice one Gelliot!!! I've updated my original mod to be fully RSS2 valid (except for the relative URL's). I'll do the same to your mod, if that's ok with you.<
MarcelG
01 July 2005, 09:06


Gelliot; Here's your RSS file, modded to version 2.0. Could you give it a try? I haven't tested it yet.
Attachment: gelliot_rssv2.zip 3672 bytes<
NiteOwl
01 July 2005, 18:22


Hi Marcel - This link is not working at the moment. <
NiteOwl
02 July 2005, 01:59


Gelliot - Could you give me an example on how to utilise this feature:

'#### strSql = strSql & " AND F.F_PRIVATEFORUMS = 0" #### replace this with custom list of allowed forums

<
MarcelG
02 July 2005, 08:24


Link = updated.<
gelliott
03 July 2005, 21:33


NiteOwl - you are not meant to do anything - the line you quoted was from marcel's origional mod, and I was simply trying to note what it was I had changed. The next line is my line, which uses that string...
Marcel - Thanks for updating it to 2.0. It's not quite working on my site - if I get some time tomorrow I'll try to figure out what's giving it trouble, then upload the revised copy to SnitzBitz.<
NiteOwl
04 July 2005, 01:09


Hi Gelliot, just to be clear, I run a private forum, if I use the rss.asp you provided, all I should be mofifying is the information in the rssinfo.asp file and the line in the rss.asp file that refers to my time zone and thats it?
<
gelliott
04 July 2005, 18:10


NiteOwl, Yes, that's it - the other two files are just functions.
Of course, you'll probably want to modify your inc_header.asp file as well to include the rssinfo.asp file in the user menu. However, before you do that, I suggest you create test logins with various levels of access and verify it hides what you want it too - you may have mods I didn't that change it's behavior... unlikely, but possible.<
NiteOwl
04 July 2005, 19:02


Thanks Gelliott, I will keep an eye out for your updated rss.asp file when you upload it to the snitsBIZ.
<
gelliott
05 July 2005, 13:12


Marcel, The error I was getting was that your file was missing a quote in front of the </webmaster> tag. After that, it seems to work fine. Thanks for updating me to RSS 2.0! I've updated the SnitzBitz file.
Everyone else - what do you think? do the private forum add-ons do what you wanted? Does the rssinfo.asp file make it more user friendly?<
NiteOwl
05 July 2005, 16:02


HI Gelliott - Ok, I have updated my site with your 1b code, I was unable to validate though as I was getting an error due to this string:

'xml = xml & "<author>" & Topic_Last_Post_Author & "</author>"

I REMmed out the line and now it seems to work ok. I have inspected Marcel's code and do not see the reference to author, was this something specific to your site, am I ok removing it?
<
NiteOwl
05 July 2005, 18:28


Hi again Gelliot - as I mentioned before, I have two forums, one is without any private area, the other is only private. I have uploaded the rss version 1b (minus the "author line" and the validator says I am ok, yet nothing shows. Would somone mind having a go at this link?
http://www.monkoly.com/bcfmwu_dev_snitz/forumnew/rss.asp

I have a demo account setup demo / demo



<
gelliott
05 July 2005, 18:50


NiteOwl - yes, you can remark out that line - I was trying to provide more data in the absence of an abstract of the posting (since I removed it for security purposes).
I'll try to look at your other link tonight...<
gelliott
05 July 2005, 22:53


NiteOwl, can you post a zip of all 4 of the files you have used, right off the server, and can you email me a admin-level account username and password? I can't tell from the link by itself what is going wrong. The code clearly reverts back to Macrel's original F.F_PRIVATEFORUMS = 0 in the absence of a successful match between userid and key, so in the case of a requested link without any querystring (like you provided above) it should return public forums only (just as you wanted). So I'm a little confused as to why it doesn't. Perhaps if I can see to verify everything is set right, I might find something...<
NiteOwl
07 July 2005, 00:27


Hi gelliott, I have all the items ready, I just need an email adress or the file attachments.
<
gelliott
07 July 2005, 21:03


NiteOwl, I misunderstood part of your question. Your rss.asp link above shows nothing because it is missing the member id and key to go with it. This is your private forum site, so rss.asp with nothing else will show nothing. This is proof that it is protecting your data. Go to the rssinfo.asp page when you are logged in, and THAT is the link you should click on. This is a custom link for each user.
Having said that, when I click on that custom link I get an error that leads me to believe MySQL is having trouble with the strSQL string we build after passing it to the TopSQL function I copied out of inc_func_common.asp. The error I'm getting is:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[MySQL][ODBC 3.51 Driver][mysqld-4.0.15-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND T.T_STATUS = 1 ORDER BY T_LAST_POST DESC LIMIT 10' at lin

/bcfmwu_dev_snitz/forumNEW/rss.asp, line 79
Thus, if you can insert a Response.Write strsql line at line 77 and post the results, we can troubleshoot why the SQL syntax we are using is incorrect. The function seems to work fine elsewhere, but since your manual modification of the SQL string before we used TopSQL had changed the "order by" clause, I'm wondering if TopSQL doesn't quite change everything necessary to make it MySQL compatible (or, more accurately, the assumptions about the formatting of the sql statement passed to TopSQL, as formulated by the original Snitz developers, are not being adhered to in our mod). In other words, Marcel and I may have deviated from the syntax normally followed by the primary Snitz developers when they wrote a sql statement they knew would pass through TopSQL.
Regardless, the solution is to post what is currently being generated, and let the MySQL experts weigh in as to what is amiss so we can program a fix for it.<
NiteOwl
07 July 2005, 22:31


Hi gelliott, I have added the 2 lines at Line 77 of my rss.asp file as you requested. For anyone else interested the link to the DEVelopmnet site we are working on is:

http://www.monkoly.com/bcfmwu_dev_snitz/forumnew/default.asp

One can login with demo / demo and feel free to post as this is just my DEV site.
Now I understand where you are going with the specific string which is built for each user at this location:

http://www.monkoly.com/bcfmwu_dev_snitz/forumnew/rssinfo.asp

And here is a link to my RSS.asp file to be viewed
Thank you guys for looking in and helping me with this. <
gelliott
08 July 2005, 00:09


OK all you MySQL experts - what's wrong with the following SQL string's syntax?question It's generating the error you see two posts above this one... potentially around the last few keywords and/or the LIMIT keyword...
SELECT T.T_REPLIES, T.T_SUBJECT, T.TOPIC_ID, T.T_LAST_POST, T.T_LAST_POST_AUTHOR, T.T_LAST_POST_REPLY_ID, T.T_MESSAGE FROM FORUM_TOPICS T,FORUM_FORUM F WHERE T.FORUM_ID = F.FORUM_ID AND F.FORUM_ID IN (1,3,4,5,6,8,9,10,11,12,14,15,17,19,32,40,47,49,57,58,60,61,62,63,) AND T.T_STATUS = 1 ORDER BY T_LAST_POST DESC LIMIT 10
<
gelliott
08 July 2005, 00:27


This link below seems to indicate the above string is correct. I'm not getting very far Googling for the error number...
http://dev.mysql.com/doc/mysql/en/select.html<
gelliott
08 July 2005, 00:33


Aaarrrggh!!! I think I see it. It's in the IN statement, at the end of the parenthesis - an extra comma. Hold on...
Find this around line 73 in inc_func_rss.asp:
Code:
	if strAllowedForums <> "" then
'strAllowedForums = """," & strAllowedForums & """"
'strAllowedForums = " AND INSTR("","" & F.FORUM_ID & "",""," & strAllowedForums & "99999) <> 0"
strAllowedForums = " AND F.FORUM_ID IN (" & strAllowedForums & ")"
end if

and add this (for that matter, delete the strikeout, although it's not hurting anything - just leftover from debugging):
Code:
	if strAllowedForums <> "" then
'strAllowedForums = """," & strAllowedForums & """" 'strAllowedForums = " AND INSTR("","" & F.FORUM_ID & "",""," & strAllowedForums & "99999) <> 0" strAllowedForums = left(strAllowedForums,len(strAllowedForums)-1) ' remove the extra comma strAllowedForums = " AND F.FORUM_ID IN (" & strAllowedForums & ")"
end if
I'll bet this works...wink<
NiteOwl
08 July 2005, 01:01


Ok change made

And here is a link to my inc_function_rss.asp file to be viewed
Here is the SQL string now:
SELECT T.T_REPLIES, T.T_SUBJECT, T.TOPIC_ID, T.T_LAST_POST, T.T_LAST_POST_AUTHOR, T.T_LAST_POST_REPLY_ID, T.T_MESSAGE FROM FORUM_TOPICS T,FORUM_FORUM F WHERE T.FORUM_ID = F.FORUM_ID AND F.FORUM_ID IN (1,3,4,5,6,8,9,10,11,12,14,15,16,17,19,30,32,34,35,36,37,38,39,40,41,43,45,46,47,49,51,52,53,57,58,60,61,62,63) AND T.T_STATUS = 1 ORDER BY T_LAST_POST DESC LIMIT 10
After I remove the Response.Write strsql code from the rss.asp, it appears to work as expected, what do you think ?

<
gelliott
08 July 2005, 08:34


NiteOwl, YES! [^]bigsmileI believe it's working now. I made a new forum, limited access only to the admins, and made a post. The post shows up in the custom RSS link for the admin acount, but NOT in the custom RSS link for the demo account - exactly the way it should be. I'd say you're in good shape now. I left the new forum in there so you can try this simple test as well. Delete it whenever you wish...
I'll revise my code and repost the correction. That error existed before, but apparently Access is more forgiving than MySQL about that particular error...
Anyway, glad we got it working!tonguecool<
NiteOwl
08 July 2005, 15:08


gelliott, thank you for all your help, this works Great!!! as always, one can never find a better community than what we have here.
I wonder if it's time for the main Snitz site to try the new files as I have been noting that not all the new postings in a day come through for whatever reason.

<
gelliott
08 July 2005, 15:43


Not sure what you meant by the last statement about "not all the new postings in a day come through for whatever reason"... the system only displays the 10 most recent topics. If those ten are all within the past two hours, then I'm sure there will be others which won't display. if those ten are scattered over several days or weeks (for slower, less active forums), then thats what will show.
Of course, it doesn't HAVE to display only the last 10. You could modify the SQL to select the top 20, the top 50, everything since 24 hours ago, 48 hours ago, etc. The problem is most RSS aggregators only display the last few entries, so more than 10 may be made available in your rss feed, but your users may still not see more than the last couple... that SQL to modify is in the rss.asp file...<
gelliott
08 July 2005, 15:58


one other thought - if you do more than 10, the file will take longer to compile, and may cause more aggregators to time-out when attempting to pull your file from your server...<
NiteOwl
08 July 2005, 17:32


Thanks gelliott, food for thought on the last 10 files, I guess if I leave my reader running it will catch all the new Snitz (I am talking about the home forum), that get posted.
as for my site I will have to think carefully about this as I do not want readers to check the rss every few days and only see the last 10 items, or at least I need to educate them so they understand what this is all about. I would say that rss is for the more dedicated surfer who understands that missing a day may mean missing feeds. . . sound fair? <
gelliott
08 July 2005, 18:37


yes, sounds fair - your readers need to understand that RSS is, by definition, current only. If they want an exhaustive listing of everything they have missed since their last visit, the Active Topics link in the main menu is the ideal method and was written exactly for that purpose. RSS, whether for news services or forums, is always a listing of current / most recent issues, and not everything since your last visit.<
SimonDorfman
20 July 2005, 05:15


I have the kensalter RSS mod installed here:
http://spellfire.net/forums/rss.asp

I have question about it that I hope someone here will know the answer to:

The base URL of links from the RSS feed isn't right. For example here's a link:
http://snitz.forum.com/forum/topic.asp?whichpage=-1&TOPIC_ID=774&REPLY_ID=6847

The obvious problem is that the http://snitz.forum.com/forum needs to be changed to http://spellfire.net/forums I looked in the source of the rss.asp document and it doesn't seem to be specified in there. Perhaps it's specified in the database somewhere or a configuration file somewhere else?
I'm not the one who originally installed this forum software, so I'm not familiar with it.
Any ideas?
Many thanks in advance!<
Shaggy
20 July 2005, 05:49


Have a look through your admin options, you can change this URI under Main Forum Configuration.
<
© 2000-2021 Snitz™ Communications