Author |
Topic |
gelliott
Junior Member
USA
268 Posts |
Posted - 08 July 2005 : 00:33:31
|
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: 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): 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...< |
* 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. |
|
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 08 July 2005 : 01:01:58
|
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 ?
< |
-=NiteOwl=-
|
Edited by - NiteOwl on 08 July 2005 07:14:39 |
|
|
gelliott
Junior Member
USA
268 Posts |
Posted - 08 July 2005 : 08:34:41
|
NiteOwl, YES! I 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!< |
* 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. |
|
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 08 July 2005 : 15:08:16
|
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.
< |
-=NiteOwl=-
|
Edited by - NiteOwl on 08 July 2005 15:11:47 |
|
|
gelliott
Junior Member
USA
268 Posts |
Posted - 08 July 2005 : 15:43:54
|
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...< |
* 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. |
|
|
gelliott
Junior Member
USA
268 Posts |
Posted - 08 July 2005 : 15:58:04
|
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...< |
* 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. |
|
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 08 July 2005 : 17:32:31
|
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? < |
-=NiteOwl=-
|
|
|
gelliott
Junior Member
USA
268 Posts |
Posted - 08 July 2005 : 18:37:18
|
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.< |
* 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. |
|
|
SimonDorfman
Starting Member
USA
7 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 July 2005 : 05:49:59
|
Have a look through your admin options, you can change this URI under Main Forum Configuration.
< |
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.” |
|
|
SimonDorfman
Starting Member
USA
7 Posts |
Posted - 20 July 2005 : 07:44:42
|
quote: Originally posted by Shaggy
Have a look through your admin options, you can change this URI under Main Forum Configuration.
Thanks very much! That was easy.
Now I'd like to add an RSS link to the forum in the head using
<link rel="alternate" type="application/rss+xml" href="http://spellfire.net/forums/rss.asp" title="Active Topics on Spellfire.net Forums"> ...like this site does. I'd also like to add a footer link to each page like this:
<a href="http://spellfire.net/forums/rss.asp">RSS Feed</a> I don't think that's possible through the admin interface. I imagine I have to find the right template file and edit it. The questions is, which template file is that?< |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 July 2005 : 08:06:50
|
You'll need inc_header.asp and inc_footer.asp for those, respectively. It'll probably take you a bit of trial and error to place them exactly where you want.
< |
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.” |
|
|
SimonDorfman
Starting Member
USA
7 Posts |
Posted - 22 July 2005 : 01:59:54
|
quote: Originally posted by Shaggy
You'll need inc_header.asp and inc_footer.asp for those, respectively. It'll probably take you a bit of trial and error to place them exactly where you want.
Thank you. I sent in these changes to my forum admin so I don't know if these work yet, but here's my code:
inc_header.asp my changes are on lines 91-93
'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
'## Start SimonDorfman Hack to add RSS link
Response.Write "<link rel=""alternate"" type=""application/rss+xml"" href=""http://spellfire.net/forums/rss.asp"" title=""Active Topics on Spellfire.net Forums"">" & vbNewline
'## End SimonDorfman Hack to add RSS link
Response.Write "</head>" & vbNewLine & _
inc_footer.asp my changes are on lines 45-49
" <tr>" & vbNewLine & _
'## Begin SimonDorfman hack to add RSS link
'## Replace this linke:
'## " <td bgcolor=""" & strForumCellColor & """ align=""left"" valign=""top"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & strForumTitle & "</font></td>" & vbNewLine & _
'## ... with this line:
" <td bgcolor=""" & strForumCellColor & """ align=""left"" valign=""top"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & strForumTitle & "<a href=""http://spellfire.net/forums/rss.asp"">RSS Feed</a></font></td>" & vbNewLine & _
'## End SimonDorfman hack to add RSS link
" <td bgcolor=""" & strForumCellColor & """ align=""right"" valign=""top"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>© " & strCopyright & "</font></td>" & vbNewLine & _
I've never written or seen ASP code before so I just kind of figured it out from looking at those two files. I hope I put the right number of quotes around things.< |
|
|
skwayb
Starting Member
17 Posts |
Posted - 28 August 2005 : 14:49:17
|
I am trying to add the usergroup mod security to this and I can't get it work. I am adding this code.
'####### Begin UserGroup MOD #######
strDeniedForums = Session(strCookieURL & "DeniedForums" & MemberID)
if strDeniedForums <> "" and strDeniedForums <> "-1" then
strSql = strSql & " AND F.FORUM_ID NOT IN(" & Session(strCookieURL & "DeniedForums" & MemberID) & ") "
end if
'####### End UserGroup MOD #######
behind this in the rss.asp
strSql = strSql & strAllowedForums
So it looks like this
strSql = strSql & " WHERE T.FORUM_ID = F.FORUM_ID"
strSql = strSql & strAllowedForums
'####### Begin UserGroup MOD #######
strDeniedForums = Session(strCookieURL & "DeniedForums" & MemberID)
if strDeniedForums <> "" and strDeniedForums <> "-1" then
strSql = strSql & " AND F.FORUM_ID NOT IN(" & Session(strCookieURL & "DeniedForums" & MemberID) & ") "
end if
'####### End UserGroup MOD #######
if Request.QueryString("FORUM_ID") <> "" then
strSql = strSql & " AND T.FORUM_ID = " & cLng(Request.QueryString("FORUM_ID"))
end if
I am sure there is more I need to mod to make it work. Gelliott or anyone else have any ideas?
< |
|
|
gpspassion
Junior Member
260 Posts |
|
Topic |
|
|
|