Author |
Topic |
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
gpspassion
Junior Member
260 Posts |
Posted - 28 September 2005 : 19:08:34
|
Thanks for taking the time to look into this ;-)
Most people in this thread probably know about this great RSS reader called Xpress, they just came out with a new optimized version - http://www.rssxpress.net/en/seeNews.php?idNews=58< |
|
|
gpspassion
Junior Member
260 Posts |
Posted - 01 October 2005 : 13:52:10
|
A tip to get the feed to work well with RSS Xpress is to have a unique GUID so I replaced line 195 with this code : xml = xml & "<guid>" & strForumURL & DoLastPostLink & "</guid>" & vbNewLine
For the Group secltion, goofed around with the code by adding these lines: if Request.QueryString("GROUP_ID") <> "" then strSql = strSql & " AND T.GROUP_ID = " & cLng(Request.QueryString("GROUP_ID")) end if
But I get a Invalid column name 'GROUP_ID' in line 97 :-(
Also tried rss.asp?cat_id=4&cat_id=5 but no go either.< |
Edited by - gpspassion on 01 October 2005 14:14:06 |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 02 October 2005 : 15:57:53
|
Well, that last option won't work, since you cannot specify the querystring cat_id twice.
I haven't figured out the way the Groups feature works, but I'm pretty sure it's not an ID stored in the topics table, or forums table. So, you cannot select the group_id in the topics table.< |
portfolio - linkshrinker - oxle - twitter |
|
|
gpspassion
Junior Member
260 Posts |
Posted - 02 October 2005 : 20:13:37
|
Ok, thanks for the info, looking at the tables in the database I see: GROUP_KEY, GROUP_ID and GROUP_CATID
Not sure wht the GROUP_KEY stands for but the GROUP_ID is the familiar number and GROUP_CATID are the Categories inside that Group.
Also, is there a way to limit the number of characters in the body to give people some reason to still go to our sites ;()< |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 03 October 2005 : 04:12:47
|
GPSPassion, to summarize ; If there's a GROUP_ID specified, you should retrieve the GROUP_CATID from the db:
if strGroupCategories = "1" and request.querystring("Group_id") <> "" and isnumeric(request.querystring("Group_id")) = TRUE then
'Forum_SQL - Get Groups
strSql = "SELECT GROUP_ID, GROUP_CATID "
strSql = strSql & " FROM " & strTablePrefix & "GROUPS "
strSql = strSql & " WHERE GROUP_ID = " & request.querystring("Group_id")
set rsgroups = Server.CreateObject("ADODB.Recordset")
rsgroups.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsgroups.EOF then
recCategoriesinGroup = ""
else
recCategoriesinGroup = rsgroups("GROUP_CATID")
end if
rsgroups.Close
set rsgroups = nothing
end if So, now we have the Category ID's from the Group specified. Now, we can construct the following SQL statement :
if recCategoriesinGroup <> "" then
strSql = strSql & " AND T.CAT_ID IN (" & recCategoriesinGroup & ") "
end if I guess this should work...haven't tested it though. Hope this helps you get it working.
quote: Originally posted by gpspassion
Also, is there a way to limit the number of characters in the body to give people some reason to still go to our sites ;()
You should be able to change this by editing this line:
Body = allActiveTopics(fT_MESSAGE, RowCount) If you change it to this, you get only the first 255 characters of the topic. However, this might break some HTML/forumcode, resulting in unexpected errors.
Body = allActiveTopics(fT_MESSAGE, RowCount)
Body = LEFT(Body,255) < |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 03 October 2005 04:14:41 |
|
|
jamesdavis
Starting Member
USA
26 Posts |
Posted - 03 October 2005 : 13:19:39
|
I'm trying to understand why this should be done: quote: 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">
What is accomplished/enabled by including that code?< |
|
|
gpspassion
Junior Member
260 Posts |
Posted - 03 October 2005 : 20:18:10
|
Can't help with that question, I'm afraid.
@MarcelG - thanks a bunch for coming up with that code. I plugged in the first part from lines 84 to 98 and the second from 99 to 101 but when I try the link using say ?Group_id=3 I get
"Microsoft OLE DB Provider for SQL Server error '80040e14'
The column prefix 'T' does not match with a table name or alias name used in the query.
/forumsen/rss_FRAg.asp, line 112"
Line 112 being "rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText"
Not sure what the problem could be, maybe I shouldn't have placed the code like that ? I have placed the code here if that helps, and this is the RSS link.
Will look at your truncating tip too tomorrow, thanks again.
< |
Edited by - gpspassion on 03 October 2005 20:19:24 |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 04 October 2005 : 07:50:10
|
I'll have a look later today (tonight to be exact) as I'm a bit too busy with work at the moment.< |
portfolio - linkshrinker - oxle - twitter |
|
|
gpspassion
Junior Member
260 Posts |
Posted - 04 October 2005 : 09:17:49
|
Looking forward to your comments ;-) Truncating code worked fine thanks !< |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 04 October 2005 : 16:25:17
|
quote: Originally posted by gpspassion
Looking forward to your comments ;-) Truncating code worked fine thanks !
Sorry...it's gonna be tomorrow. Got to get some sleep now (and my wife's ...- errr, how to I say this correctly - ....demanding me to come down and spent some time in front of the TV with her...)< |
portfolio - linkshrinker - oxle - twitter |
|
|
gpspassion
Junior Member
260 Posts |
Posted - 04 October 2005 : 16:38:39
|
Sure, gotta keep the wife happy ! ;-)
By the way since you seem to be on top of that darn asp code, is there an ASP function that will let me convert the contents of a record to text, say "<a href="htttp://kjlkjkjlkj">bob</a>" just becomes "bob", trying to figure that out to produce an rss for my portal.
Nevermind found this code http://www.aspfr.com/codes/SUPRESSION-DES-BALISE-HTML/30612.aspx that does the job !< |
Edited by - gpspassion on 04 October 2005 17:23:52 |
|
|
gerardW
Starting Member
Mexico
13 Posts |
Posted - 04 October 2005 : 16:46:29
|
Hi,
I use the code below to strip all SPAN-tags from texts. You can use that also to strip other tags and you can make a RegExp to strip all tags (everything between '<' and '>'). Maybe this sort of solution is what you're looking for?
Dim objRegEx
Set objRegEx = New RegExp
'find all matches
objRegEx.Global = True
'set case insensitive
objRegEx.IgnoreCase = True
objRegEx.Pattern = "<\/?SPAN[^>]*>"
strTekst = objRegEx.Replace(strTekst, "")
Set objRegEx = Nothing
< |
|
|
gpspassion
Junior Member
260 Posts |
Posted - 12 October 2005 : 05:21:22
|
Thanks for that code, sure looks cleaner than the other one.
A friendly UP for MarcelG on the GROUP code ;-)< |
|
|
gpspassion
Junior Member
260 Posts |
Posted - 02 December 2005 : 19:09:59
|
Last try ;-)< |
|
|
Topic |
|