|
I have a web wiz forum linked to my main site. My main site is a news site, and it has RSS feeds on some pages.
I want to use the WWForum RSS on my website on the front page The Problem with the Forum RSS is that it is too big, it shows the whole subject of the topic, i don't want that, i want to streamline it so that it only shows:
- author
- date
- subject line
- maybe 10 words of the content, ( but not essential)
This is what the other RSS feeds show.
I assume it is the RSS_topic_feed/asp page code that needs changing? here is the code below,
Can anyone tell me what i have to take off? I want a very simple RSS feed that is clean and neat, at the moment if i use the current one it is way too long, as the message content is included and sometimes that is very long. If there is a way to include the first 10 words of the message content, fine, otherwise, just the author name, date, and title line is fine
The code is below, and i'd appreciate any tips. thanks in advance
Here is the code in blue text below:
<% @ Language=VBScript %> <% Option Explicit %> <!-- #include file="includes/global_variables_inc.asp" --> <!-- #include file="includes/setup_options_inc.asp" --> <!-- #include file="database/database_connection.asp" --> <!-- #include file="functions/functions_common.asp" --> <!-- #include file="functions/functions_filters.asp" --> <!-- #include file="functions/functions_format_post.asp" --> <!-- #include file="functions/functions_date_time_format.asp" --> <!-- #include file="language_files/language_file_inc.asp" --> <!-- #include file="language_files/RTE_language_file_inc.asp" --> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Forums '** http://www.webwizforums.com - http://www.webwizforums.com '** '** Copyright 2001-2006 Bruce Corkhill All Rights Reserved. '** '** This program is free software; you can modify (at your own risk) any part of it '** under the terms of the License that accompanies this software and use it both '** privately and commercially. '** '** All copyright notices must remain in tacked in the scripts and the '** outputted HTML. '** '** You may use parts of this program in your own private work, but you may NOT '** redistribute, repackage, or sell the whole or any part of this program even '** if it is modified or reverse engineered in whole or in part without express '** permission from the author. '** '** You may not pass the whole or any part of this application off as your own work. '** '** You may not deactivate any adverts or links to Web Wiz Guide and itÂ’s associates '** and must remain visible when the pages are viewed unless permission is first granted '** by the copyright holder. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER '** WARRANTIES WHETHER EXPRESSED OR IMPLIED. '** '** You should have received a copy of the License along with this program; '** if not, write to:- Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom. '** '** '** No official support is available for this program but you may post support questions at: - '** http://www.webwiz.net/forum - http://www.webwiz.net/forum '** '** Support questions are NOT answered by e-mail ever! '** '** For correspondence or non support questions contact: - '** '** Web Wiz Guide, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, UK, BH15 4JD '** '****************************************************************************************
'Set the response buffer to true as we maybe redirecting Response.Buffer = True
'Open database connection Call openDatabase(strCon)
'Load in configuration data Call getForumConfigurationData()
'If RSS is not enabled send the user away If blnRSS = False Then
'Clear server objects Call closeDatabase()
'Redirect Response.Redirect("default.asp") End If
'Declare variables Dim sarryRssTopics 'Holds the RSS Feed recordset Dim intCurrentRecord 'Holds the current record in the array Dim strForumName 'Holds the forum name Dim lngTopicID 'Holds the topic ID Dim strSubject 'Holds the subject Dim lngMessageID 'Holds the message ID Dim dtmMessageDate 'Holds the message date Dim lngAuthorID 'Holds the author ID Dim strUsername 'Holds sthe authros user name Dim strMessage 'Holds the post Dim intForumID 'Holds the forum we are viewing the posts from Dim strRssChannelTitle 'Holds the channel name Dim strTimeZone 'Holds the time zone for the feed Dim dtmLastEntryDate 'Holds the date of the last message
'This is the number of posts to include in the feed Const intMaxResults = 10
'This is the Time to Live value so that RSS News Readers know how often to update their feed, 'if this is set to low you may consume to much bandwidth, to high and the RSS News Reader may not be updated fast enough Const intTimeToLive = 30
'Set this to the time zone you require strTimeZone = "UT" 'See http://www.sendmail.org/rfc/0822.html#5 - http://www.sendmail.org/rfc/0822.html#5 for list of time zones
'Initliase variables intForumID = 0 strRssChannelTitle = strMainForumName
'Set the content type for feed Response.ContentType = "application/xml"
'Read in the forum ID If isNumeric(Request.QueryString("FID")) Then intForumID = CInt(Request.QueryString("FID"))
'Get the last x posts from the database strSQL = "" & _ "SELECT " If strDatabaseType = "SQLServer" OR strDatabaseType = "Access" Then strSQL = strSQL & " TOP " & intMaxResults & " " End If strSQL = strSQL & _ "" & strDbTable & "Forum.Forum_name, " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Topic.Subject, " & strDbTable & "Thread.Thread_ID, " & strDbTable & "Thread.Message_date, " & strDbTable & "Author.Author_ID, " & strDbTable & "Author.Username, " & strDbTable & "Thread.Message " & _ "FROM " & strDbTable & "Forum" & strDBNoLock & ", " & strDbTable & "Topic" & strDBNoLock & ", " & strDbTable
|