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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 RSS 2.0 feed - by forum & by category
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 01 July 2005 :  06:24:47  Show Profile  Visit MarcelG's Homepage
Here's version 2 of the RSS feed, this time fully validated RSS v2; the improved version of this mod.
If you want an RSS feed that works with private forums, check this mod by gelliott.

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
  • Images and smilies are disabled!!!(comment lines 64 and 65 to enable them)


How to install:
Copy the code below, and save it as RSS.ASP
View source of RSS.ASP (login required, use user: demo, password demoif you're a guest, feel free to register )

The image & Title
Create an image of your own, and save it as you want on your site, but be sure to adjust lines 151 to 154 to suit your own title and image:
xml = xml & "<url>" & strForumURL & "images/oxlerss.gif</url>" & vbNewLine
xml = xml & "<title>" & strForumTitle & " RSS Feed</title>" & vbNewLine
xml = xml & "<width>144</width>" & vbNewLine
xml = xml & "<height>47</height>" & vbNewLine


The Timezone
Be sure to adjust lines 214 to select the correct timezone of your forum:
' define your timezone offset below. Examples : " +0100" for GMT+1, "EST", "GMT"
rfc822timezone = " +0200"

That's all.

Examples:
http://www.oxle.com/rss.asp (all forums on the entire board)
http://www.oxle.com/rss.asp?cat_id=14 (all forums from the INT category)
http://www.oxle.com/rss.asp?forum_id=43 (all topics from the 'Help' forum)

Remark
The only thing I haven't found a fix for is replacing relative URL's with absolute URL's.
..if someone has a fix, it's welcome!


Enjoy. Any improvements/suggestions are very welcome!

Support -> http://www.oxle.com/topic.asp?TOPIC_ID=1865

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 01 July 2005 07:26:07

NiteOwl
Junior Member

Canada
403 Posts

Posted - 05 July 2005 :  11:48:56  Show Profile  Visit NiteOwl's Homepage
MySQL - Make the following changes to work with a MySQL database.

Find:
strSql = "SELECT TOP " & intResults

Replace with:
strSql = "SELECT "


Find:
strSql = strSql & " ORDER BY T_LAST_POST DESC"

Make a new, empty line below, and ADD this code:
strSql = strSql & " LIMIT 1,15"



The above code is no longer necessary as the base files have been changed and MySQL works, thanks guys!


-=NiteOwl=-

Edited by - NiteOwl on 05 July 2005 15:52:53
Go to Top of Page

gelliott
Junior Member

USA
268 Posts

Posted - 05 July 2005 :  12:19:47  Show Profile
Macrel, per NiteOwl's comments above we probably need to revise our rss.asp file to test the strDBType variable and build the SQL statement accordingly...

* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.
Go to Top of Page

gelliott
Junior Member

USA
268 Posts

Posted - 05 July 2005 :  13:08:57  Show Profile
OK, I've uploaded a new file which uses the strDBType variable and incorporates Macrel's new rss.asp 2.0 standard...

http://www.snitzbitz.com/mods/details.asp?Version=&mid=209

* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 05 July 2005 :  13:22:21  Show Profile
If you're including inc_func_common.asp anywhere, there's already a function called TopSQL in there for that very purpose. Build your SQL query as normal, without using TOP or LIMIT and, then, when executing your query/opening your recordset use:

set rs=my_Conn.execute(TopSQL(strSQL))


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

gelliott
Junior Member

USA
268 Posts

Posted - 05 July 2005 :  13:56:05  Show Profile
Thanks Shaggy! Didn't know that! Isn't it funny how you write all these mods and play with the code for several years and still discover little nuggets of slick stuff... I'll make a note of that (although, in this case, we have no other use of inc_func_common.asp and for the sake of speed will simply do it with an if-then...).

But this prompts a general comment - thanks yet again to all the folks that put this software together - it is very well thought out and designed!

* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.
Go to Top of Page

gelliott
Junior Member

USA
268 Posts

Posted - 05 July 2005 :  13:59:33  Show Profile
OK, now that I'm looking at the function, it's more complex and robust than what I had, so I'll add it into our collection of RSS functions and re-upload a v1b file to SnitzBitz. Thanks for the tip Shaggy!

* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 05 July 2005 :  14:50:06  Show Profile  Visit MarcelG's Homepage
Indeed, thanks Shaggy! Never knew that function existed!
Also updated my RSS.ASP file.

portfolio - linkshrinker - oxle - twitter
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.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07