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)
 One more RSS Feed MOD (RSS Snitz Multiple Feed)
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

balexandre
Junior Member

Denmark
418 Posts

Posted - 05 December 2008 :  03:45:04  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
I always wanted to give users (well, myself!) a way to subscribe a Topic, Forum, Category, or All of the above RSS Feed, kinda like, if you are in a topic, you can subscribe the Feed for that topic, that topic's Forum, that category's Forum, and all of it.

So, this dawn I just did it and give to Marcel (www.oxle.com) as well because as I said before, I wanted this to my own

the code of the <b>rssFeed.asp</b> file can be found here

and this is the code header:

' ##############################################################################################
' #  RSS Snitz Multiple Feed
' ##############################################################################################

' ##############################################################################################
' # Coded by:			Bruno Alexandre < bruno.in.dk [at] gmail.com >
' # Last Update date:	Saturday, 7 August 2010
' # 
' # This RSS Feed is valid to all Categories, Forums and Topcis, Specific Category, 
' #  specific Forum and Specific Topic
' # To use just pass the Cat_ID or Forum_ID or Topic_ID in the URL
' # 
' # Examples:
' # 
' # rssFeed.asp					Default Mode: 	Shows all categories, forums, topics, replies
' # rssFeed.asp?Cat_ID=321		category Mode: 	Shows all forums, topics and replies for that Category
' # rssFeed.asp?Forum_ID=321	Forum Mode: 	Shows all topics, replies for that Forum
' # rssFeed.asp?Topic_ID=123	Topic Mode: 	Shows all replies for that Topic
' #
' # Usage:
' #  Rename the file to rssFeed.asp
' #
' # <link rel="alternate" type="application/rss+xml" title="Fórum GAPE (All public)" href="http://www.mySnitzForum.com/rssFeed.asp" />
' # <link rel="alternate" type="application/rss+xml" title="Fórum GAPE (Category)" href="http://www.mySnitzForum.com/rssFeed.asp?url=category,123" />
' # <link rel="alternate" type="application/rss+xml" title="Fórum GAPE (Forum)" href="http://www.mySnitzForum.com/rssFeed.asp?url=forum,123" />
' # <link rel="alternate" type="application/rss+xml" title="Fórum GAPE (Topic)" href="http://www.mySnitzForum.com/rssFeed.asp?url=topic,123" />
' #
' # Replace 123 with the 
' #  Request.QueryString("Cat_ID")
' #  Request.QueryString("Forum_ID")
' #  Request.QueryString("Topic_ID")
' # according
' #
' ##############################################################################################

' ############################################################################################## 
' # v.1.2 (07.Aug.2010):	Added ability to not display replies (only Topics)
' #							Changed encode to UTF-8, instead ISO-8859-1
' # v.1.1 (06.Dec.2008):	Added Encode, Decode url parameters
' # 						Will show only public forums
' # v.1.0 (05.Dec.2008):	Hello World!	
' ##############################################################################################


to use this, all you need is to edit and add the LINK tag to the <b>inc_header.asp</b>

You can add the below code to inc_header.asp after the SNITZ FORUMS 2000 LICENSE AGREEMENT ending around line 230

' ###########################################################################
' # RSS Snitz Multiple Feed MOD by Bruno Alexandre
' # Snitz Topic in: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=67930
' ###########################################################################

Dim feedType, feedAvailable, queryID, rssCategoryID, rssForumID
Dim rssTopicID, rssCategoryTitle, rssForumTitle, rssTopicTitle

rssCategoryID = ""
rssForumID = ""
rssTopicID = ""
rssCategoryTitle = ""
rssForumTitle = ""
rssTopicTitle = ""
feedAvailable = true

if Request.QueryString("cat_id") <> "" then
feedType = "category"
queryID = Request.QueryString("cat_id")
elseif Request.QueryString("forum_id") <> "" then
feedType = "forum"
queryID = Request.QueryString("forum_id")
elseif Request.QueryString("topic_id") <> "" then
feedType = "topic"
queryID = Request.QueryString("topic_id")
end if

if feedType <> "" then
strSql = ""
strSql = strSql & "SELECT "
if feedType = "category" or feedType = "forum" or feedType = "topic" then strSql = strSql & "c.CAT_ID, c.CAT_NAME, "
if feedType = "forum" or feedType = "topic" then strSql = strSql & "f.FORUM_ID, f.F_SUBJECT, "
if feedType = "topic" then strSql = strSql & "t.TOPIC_ID, t.T_SUBJECT, "
strSql = strSql & "f.F_PRIVATEFORUMS, "
strSql = Left(strSql, Len(strSql) - 2)
strSql = strSql & " FROM "
if feedType = "category" or feedType = "forum" or feedType = "topic" then strSql = strSql & "FORUM_CATEGORY AS c, "
if feedType = "forum" or feedType = "topic" then strSql = strSql & "FORUM_FORUM AS f, "
if feedType = "topic" then strSql = strSql & "FORUM_TOPICS AS t, "
if feedType = "category" then strSql = strSql & "FORUM_FORUM AS f, "
strSql = Left(strSQL, Len(strSql) - 2)
strSql = strSql & " WHERE "
if feedType = "category" then strSql = strSql & "f.CAT_ID = c.CAT_ID "
if feedType = "forum" or feedType = "topic" then strSql = strSql & "c.CAT_ID = f.CAT_ID "
if feedType = "topic" then strSql = strSql & "AND f.FORUM_ID = t.FORUM_ID "
strSql = strSql & "AND f.F_PRIVATEFORUMS = 0 "
if feedType = "category" then strSql = strSql & "AND c.CAT_ID = " & Request.QueryString("Cat_ID") & ";"
if feedType = "forum" then strSql = strSql & "AND f.FORUM_ID = " & Request.QueryString("Forum_ID") & ";"
if feedType = "topic" then strSql = strSql & "AND t.TOPIC_ID = " & Request.QueryString("Topic_ID") & ";"

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

if rs.EOF then
feedAvailable = false
else
if feedType = "category" or feedType = "forum" or feedType = "topic" then
rssCategoryID = rs("CAT_ID")
rssCategoryTitle = rs("CAT_NAME")
else
rssCategoryID = ""
rssCategoryTitle = ""
end if
if feedType = "forum" or feedType = "topic" then
rssForumID = rs("FORUM_ID")
rssForumTitle = rs("F_SUBJECT")
else
rssForumID = ""
end if
if feedType = "topic" then
rssTopicID = rs("TOPIC_ID")
rssTopicTitle = rs("T_SUBJECT")
else
rssTopicID = ""
rssTopicTitle = ""
end if
end if

rs.close
set rs = nothing
end if

Response.Write "<link rel=""alternate"" type=""application/rss+xml"" title=""" & strForumTitle & " (All public)"" href=""" & strForumURL & "/rssFeed.asp"" />"

if feedAvailable then
if isNumeric(rssCategoryID) Then Response.Write "<link rel=""alternate"" type=""application/rss+xml"" title=""" & strForumTitle & " (Category: " & rssCategoryTitle & ")"" href=""" & strForumURL & "/rssFeed.asp?url=" & Encode("category," & rssCategoryID) & """ />"
if isNumeric(rssForumID) Then Response.Write "<link rel=""alternate"" type=""application/rss+xml"" title=""" & strForumTitle & " (Forum: " & rssForumTitle & ")"" href=""" & strForumURL & "/rssFeed.asp?url=" & Encode("forum," & rssForumID) & """ />"
if isNumeric(rssTopicID) Then Response.Write "<link rel=""alternate"" type=""application/rss+xml"" title=""" & strForumTitle & " (Topic: " & rssTopicTitle & ")"" href=""" & strForumURL & "/rssFeed.asp?url=" & Encode("topic," & rssTopicID) & """ />"
end if

Function Encode(sIn)
dim x, y, abfrom, abto
Encode="": ABFrom = ""
For x = 0 To 25: ABFrom = ABFrom & Chr(65 + x): Next
For x = 0 To 25: ABFrom = ABFrom & Chr(97 + x): Next
For x = 0 To 9: ABFrom = ABFrom & CStr(x): Next
abto = Mid(abfrom, 14, Len(abfrom) - 13) & Left(abfrom, 13)
For x=1 to Len(sin): y = InStr(abfrom, Mid(sin, x, 1))
If y = 0 Then
Encode = Encode & Mid(sin, x, 1)
Else
Encode = Encode & Mid(abto, y, 1)
End If
Next
End Function

' # End RSS Snitz Multiple Feed MOD
' ###########################################################################


A <b><font color="red">live example</font id="red"></b> can be found here:
http://www.balexandre.com/sf2k_v34_06/

you can always just use it in the normal RSS Feed way, just, this gives you much more options.

fell free to criticize

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 07 August 2010 11:21:18

Etymon
Advanced Member

United States
2360 Posts

Posted - 05 December 2008 :  05:34:44  Show Profile  Reply with Quote
Oh boy ... I have permission to criticize!!!

I think it is a GREAT MOD IDEA! THANKS!!! <

Edited by - Etymon on 05 December 2008 05:37:56
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 05 December 2008 :  07:12:03  Show Profile  Visit SiSL's Homepage  Reply with Quote
Question tho: By guessing ForumID or CategoryID, can users reach to forums and categories or even threads they don't have access to?
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 05 December 2008 :  10:27:16  Show Profile  Reply with Quote
Haven't added the script but I cursory glance would suggest that they can.

<

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

balexandre
Junior Member

Denmark
418 Posts

Posted - 05 December 2008 :  10:58:46  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
quote:
Originally posted by SiSL

Question tho: By guessing ForumID or CategoryID, can users reach to forums and categories or even threads they don't have access to?



A straight answer: Yes!

But one can only Subscribe a topic that one can see, unless they hack it (changing the Cat_ID, Forum_ID or Topic_ID, but for that you can prevent them to read the message content:
vgShowFullPost	= false
vgShowMaxChars	= 0


that will only give the topic name and that is all, soon they click "read more" link from there Rss Reader, the Forum will ask them to login and give an error for that topic to be read

is this ok?<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 05 December 2008 11:05:24
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 05 December 2008 :  11:48:04  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
I just remember ... I can always encode the QueryString and pass the user ID as well, and this will prevent any other user that does not have access to the message to retrieve it, and any other bad user to hack the encoded URL, unless one knows the encoding password.

Does this help(of course it will help, but, is this ok for you SiSL)?
to everyone else, should I do this?<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 05 December 2008 :  14:12:47  Show Profile  Visit SiSL's Homepage  Reply with Quote
Well, may be you may place a forum cookie check before XML Response, so if user did not checked "Save password", they may not reach the topics... If they do and have access they could... ;)

Based on QueryStrings, some problematic users can always think they hacked(!) it and see (for example Moderator boards a topic called: Should we ban 'SiSL'?") ofcourse as you said, there is always chance to shut them down manually but hey, in the end, why not perfectise it while you are at it :)
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 05 December 2008 14:15:33
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 05 December 2008 :  14:42:05  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
Cookies are never a good idea...

Imagine that the user opens the Google reader only in an online caffe. He will never see new topics/messages/replies because the lack of the cookie

if the RSS Feed is something like

http://www.mydomain.com/rssFedd.asp?url=wtey7866twWTY812Byh3xxwe

then what can the User do?

he is subscribing to that URL, and that contains Topic, Category, Forum and even UserID so the rssFeed script can hide from him all the foruns, replies, etc that he can not access from Snitz Forum

how about that?

I did inplemented this approach in a client website to send the correct officeID and date gap in order to see a PDF report or see the report online, for my prespective, it's the safer route.<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 05 December 2008 :  18:59:58  Show Profile  Visit SiSL's Homepage  Reply with Quote
I think sounds nice :)

I'd say: go for it :)<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 06 December 2008 :  16:57:04  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
Updated to v.1.1

With this version there are Good News and Bad News...

the bads
  • I almost killed myself looking for a free way to Encode/Decode strings in Classic ASP (with a user password) but I found nothing! (ASP.NET has this in the framwork, so it will be esier to implement such feature in the ASP.NET version of Snitz
  • For this I do not use UserID on the parameter


the goods
  • I still encode the feed type and the feed ID (Cat_ID, Forum_ID, Topic_ID)
  • I do not show messages in the RSS that the forum is not public (as you can see in the live example)
  • The MOD is free to everyone

<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 06 December 2008 16:59:46
Go to Top of Page

AnonJr
Moderator

United States
5765 Posts

Posted - 06 December 2008 :  23:42:01  Show Profile  Visit AnonJr's Homepage  Reply with Quote
There's another RSS MOD floating around out there that does pass a partial hash of the password. Might be worth looking into.<
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 07 December 2008 :  09:39:24  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
is it me or there is no such code on this forum AnonJr?

I searched for rss mod but I just found mini MOD and Marcel RSS Feed

can you provide me the link for that please <

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

AnonJr
Moderator

United States
5765 Posts

Posted - 07 December 2008 :  19:49:33  Show Profile  Visit AnonJr's Homepage  Reply with Quote
I'll have to look and see which one it was. It may be up on Snitzbitz.com and wasn't posted here.

There are more than just those two floating around. Some have been archived, some use different terminology (Atom feed, rss feed, etc.). I'll have a lot more time this week so I may spend a little time making the improvements to the one I have and release it back.<
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 07 August 2010 :  11:05:53  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
new version with the ability to hide replies from Feed, in other words, just show Topics.


Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

vrossi
Starting Member

Italy
15 Posts

Posted - 13 March 2012 :  04:57:01  Show Profile  Visit vrossi's Homepage  Reply with Quote
After installing this RSS mod, all my Joomla sites containing RSS feeds stopped working. They just displayed a message like this:

Fatal error: Maximum execution time of 30 seconds exceeded in D:\inetpub\vhosts\vrconsulting.it\httpdocs\libraries\simplepie\simplepie.php on line 7693

The same issue was not only on the domain where the forum is located, but also on two other sites, belonging to different domains, which have nothing to do with this forum, but just happen to be hosted on the same server!

I restored the old forum configuration (removing rssfeed.asp and reloading the original inc_header.asp ) but the problem was still there.

I reinstalled these sites from yesterday's backup in order to get them working again. But even the full restore was not enough: I had to remove completely any RSS feed from all the domains hosted on my server.

That mod has changed some general server configuration, without giving any warning !

I am usually very careful in updating software on my server, but all the mods I installed in my forum have always affected only the forum itself, and nothing else.

Can anybody please tell me what RSS parameters at server level does this mod change, and where they are, so that I can try to restore a working situation, without having to perform a full restore of the whole server ?

Thank you

Vittorio
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20550 Posts

Posted - 13 March 2012 :  05:30:54  Show Profile  Visit HuwR's Homepage  Reply with Quote
there are no RSS server level parameters that I am aware of, RSS is simply a request protocol for delivering news feeds, the file is simply a file that gets data from the database and creates an xml rssfeed rather than a webpage, I don't see how it can have had anything to do with the problems you have described, it is most likely a complete coincidence.

simply having the rssfeed file in your forum can not possibly cause any problems, it has to be accessed for it to even run any code, it can't do it on it's own.

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07