The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
I have had a good look through the site for an rss feed. I see that a few have been developed but they all only hold the last post in any active topic. What I would like is an rss feed that will hold the last 100 posts on the forum by time irrespective of which topic they are in.
When trying to find an rss feed that will do this I see that a few other people have asked for the same in the threads about rss feed but have largely gone unanswered or directed towards the active topics mod which is not what I want.
Thanks
Acne
When trying to find an rss feed that will do this I see that a few other people have asked for the same in the threads about rss feed but have largely gone unanswered or directed towards the active topics mod which is not what I want.
Thanks
Acne
Posted
here is a copy of the file rssfeed
I can not guarentee that this will work on anything other than an MS SQL database
you will need to set 2 values which are near the top of the file, below the copyright and includes,they are.
intResults = 25
TimeZoneOffset="-0500"
intResults is the number of posts to fetch. TimeZoneOffset should be set to the same as your forum time offset, for example here the offset is -5 so the TimeZoneOffset is "-0500", if yours was +3 TimeZoneOffset would be "+0300".
you will need to set 2 values which are near the top of the file, below the copyright and includes,they are.
intResults = 25
TimeZoneOffset="-0500"
intResults is the number of posts to fetch. TimeZoneOffset should be set to the same as your forum time offset, for example here the offset is -5 so the TimeZoneOffset is "-0500", if yours was +3 TimeZoneOffset would be "+0300".
Posted
I set up the feed so that it can be filtered by forum_category, but if you would prefer that it could be filtered by forums instead let me know (you can't have both I'm afraid)
Posted
It looks perfect now thank you so much. I'll direct our website tinkerer here now so he can find the file and resolve any queries he may have.
Again many thanks
Nigel
Again many thanks
Nigel
Posted
Very nice Huw.
Posted
Originally posted by HuwR
here is a copy of the file rssfeed I can not guarentee that this will work on anything other than an MS SQL database
The following SQL works (so far, in limited testing) on Access and MS SQL Server 2005.
Code:
strSql = "SELECT TOP " & intResults
strSql = strSql & " TopicId, ReplyId, Author, PageCounter, Title, Descript, PostDate, Category "
strSql = strSql & "FROM "
strSql = strSql & "(SELECT TOP 100 PERCENT "
strSql = strSql & "C.CAT_NAME AS Category, "
strSql = strSql & "R.TOPIC_ID AS TopicId, "
strSql = strSql & "R.REPLY_ID AS ReplyId, "
strSql = strSql & "M.M_NAME AS Author, "
strSql = strSql & "T.T_REPLIES AS PageCounter, "
strSql = strSql & "T.T_SUBJECT AS Title, "
strSql = strSql & "R.R_MESSAGE AS Descript, "
Select Case strDBType
case "sqlserver", "mysql"
strSql = strSql & "COALESCE(R.R_LAST_EDIT, R.R_DATE) AS PostDate "
case "access"
strSql = strSql & "IIf(R.R_LAST_EDIT, R.R_DATE) AS PostDate "
End Select
strSql = strSql & "FROM (((" & strTablePrefix & "REPLY R "
strSql = strSql & "INNER JOIN " & strTablePrefix & "TOPICS T ON R.TOPIC_ID = T.TOPIC_ID) "
strSql = strSql & "INNER JOIN " & strTablePrefix & "FORUM F ON R.FORUM_ID = F.FORUM_ID) "
strSql = strSql & "INNER JOIN " & strMemberTablePrefix & "MEMBERS M ON R.R_AUTHOR = M.MEMBER_ID) "
strSql = strSql & "INNER JOIN " & strTablePrefix & "CATEGORY C ON R.CAT_ID = C.CAT_ID "
strSql = strSql & "WHERE (F.F_PRIVATEFORUMS = 0) AND T.T_STATUS=1 "
strSql = strSql & "UNION ALL "
strSql = strSql & "SELECT TOP 100 PERCENT "
strSql = strSql & "C.CAT_NAME AS Category, "
strSql = strSql & "T.TOPIC_ID AS TopicId, "
strSql = strSql & "(-1) AS ReplyId, "
strSql = strSql & "M.M_NAME AS Author, "
strSql = strSql & "T.T_REPLIES AS PageCounter, "
strSql = strSql & "T.T_SUBJECT AS Title, "
strSql = strSql & "T.T_MESSAGE AS Descript,"
strSql = strSql & "T.T_DATE AS PostDate "
strSql = strSql & "FROM ((" & strTablePrefix & "TOPICS T "
strSql = strSql & "INNER JOIN " & strTablePrefix & "FORUM F ON T.FORUM_ID = F.FORUM_ID) "
strSql = strSql & "INNER JOIN " & strMemberTablePrefix & "MEMBERS M ON T.T_AUTHOR = M.MEMBER_ID) "
strSql = strSql & "INNER JOIN " & strTablePrefix & "CATEGORY C ON T.CAT_ID = C.CAT_ID "
strSql = strSql & "WHERE (F.F_PRIVATEFORUMS = 0) AND T.T_STATUS=1 "
strSql = strSql & "ORDER BY PostDate DESC "
strSql = strSql & ") AS Posts "
strSql = strSql & "ORDER BY PostDate DESC;"Correct me if I'm wrong, but wouldn't it just be the "TOP " sections that would need to be changed to make it work on MySQL?
Last edited by AnonJr on 28 December 2009, 15:49
Posted
This rss feed has been working perfectly on our forum now for a while - so thank you very much all those who assisted here.
Today I noticed that one thread was being ommited - not just one post but the whole thread. The Thread was titled "DVDs 3 for £10!!" Is it possible the use of the £ or the !! is somehow causing the problem or should i shutup before I demonstrate any further how little i know about any of this?
Thanks
Acne
Today I noticed that one thread was being ommited - not just one post but the whole thread. The Thread was titled "DVDs 3 for £10!!" Is it possible the use of the £ or the !! is somehow causing the problem or should i shutup before I demonstrate any further how little i know about any of this?
Thanks
Acne
Posted
It appeared in my RSS feed, although has since been deleted from the forum
Posted
I had some issues with it breaking my feed. I put "£" in my bad word filter and changed it to "£" and it's fixed it so far.
Posted
I've been using this feed for a few months without any problems but I have just moved my forum to a new host and changed the forum path. Now when I use Google Reader it shows the feed but goes to an invalid path when I click on it. I've tried looking at it in IE and it goes to the correct path.
Here's and example
Link from google reader
http://forum.leylandtown.info/forum/topic.asp?whichpage=-1&TOPIC_ID=3595&REPLY_ID=45876
Correct link
http://forum.leylandtown.info/topic.asp?whichpage=-1&TOPIC_ID=3595&REPLY_ID=45876
Here's and example
Link from google reader
http://forum.leylandtown.info/forum/topic.asp?whichpage=-1&TOPIC_ID=3595&REPLY_ID=45876
Correct link
http://forum.leylandtown.info/topic.asp?whichpage=-1&TOPIC_ID=3595&REPLY_ID=45876
Martin
Leyland Forum Leyland Lancashire UK
Leyland Forum Leyland Lancashire UK
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...