Hi, this mod will probably only be interesting to those who have a small
forum with a dedicated audience probably in a special field of interest.
This RSS feed doesn't check for hidden forums etc. It's real light and simple.
What this mod does is add a link to the pop_profile page.
This link is a link to the RSS of the latest 5 topics a member started.
***Pop_Profile***
Add this code to any table where you want to display it:
strSql = "SELECT T.TOPIC_ID FROM " & strTablePrefix & "TOPICS T WHERE T.T_AUTHOR = " & ppMember_ID
set rs10 = my_Conn.Execute(strsql)
if rs10.EOF or rs10.BOF then
Response.Write ""
else
Response.Write " <tr>" & vbNewLine
Response.Write " <td align=""left"" valign=""middle"" height=""20""> <a href=""PageRss.asp?id=" & ppMember_ID & """ title=""RSS Feed"" target=""_blank""><img src=""BlogRSSFeed.jpg"" alt=""RSS Feed 2.0"" border=""0""></a>" & vbNewLine
Response.write " </td>" & vbNewLine
Response.write " </tr>" & vbNewLine
rs10.close
set rs10=nothing
end if
***PageRSS.asp***
Copy this into a new page and save as PageRSS.asp (if you want to change the title into MemberRSS or something, don't forget to edit the link in the pop_profile code):
<%
Response.ContentType = "text/xml"
%>
<rss version="2.0">
<!--
This web page is a data file that is meant to be read by RSS readers.
To read these posts in an user-friendly layout visit http://my.illhill.com - this code was written by Dominic de Haas
-->
<channel>
<title>Blogs/Updates RSS Feed Sorted By Member</title>
<link>http://my.illhill.com</link>
<description>Blogs/Updates RSS Feed Sorted By Member</description>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<%
if Request.QueryString("id") <> "" and IsNumeric(Request.QueryString("id")) = true then
Member_ID = cLng(Request.QueryString("id"))
else
Member_ID = 0
end if
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
dim intResults,Topic_ID,strSubject,Topic_Subject
strSql = "SELECT TOP 5 T.TOPIC_ID, T.T_SUBJECT, T.T_DATE, T.T_SUBJECT, T.T_MESSAGE, T.T_AUTHOR, T.FORUM_ID, M.M_NAME, M.MEMBER_ID "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS T, " & strMemberTablePrefix & "MEMBERS M"
strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR AND T.T_AUTHOR = " & Member_ID
strSql = strSql & " ORDER BY T.TOPIC_ID DESC"
set rs = my_Conn.Execute(strSql)
if currTopic <> rs("TOPIC_ID") then
currTopic = 0
TopicCount = 0
do until rs.EOF or (TopicCount = 5)
if currTopic <> rs("TOPIC_ID") then
Response.Write "<item>" & vbNewline
Response.Write "<title>""" & rs("T_SUBJECT") & """</title>" & vbNewline
Response.Write "<description>Posted By: " & rs("M_NAME") & "</description>" & vbNewline
Response.Write "<link>http://www.illhill.com/" & rs("M_NAME") & "#" & rs("TOPIC_ID") & "</link>" & vbNewline
Response.Write "<guid>http://www.illhill.com/" & rs("M_NAME") & "#" & rs("TOPIC_ID") & "</guid>" & vbNewline
Response.Write "</item>" & vbNewline
TopicCount = TopicCount + 1
end if
rs.MoveNext
loop
end if
rs.close
set rs = nothing
%>
</channel>
</rss>
Well hope it comes in handy to anybody.
To see a preview of this code working:
www.illhill.com/illhilldotcom then click this button:
Greets, Dominic
<