Author |
Topic  |
|
robbear7
Junior Member
 
106 Posts |
Posted - 04 October 2002 : 10:51:49
|
I saw a discussion on this back in april, but it did not seem to get very far. I believe an RSS feed for the snitz forum would be very ideal. It would allow easy updates of latest topics on the rest of your site, or other sites. Even further, I own Trillian Pro and with the news plug-in I could actually be updated via my IM on the desktop that a new topic or reply has been posted to the forum. I would even beable to see the topic name, or even perhaps the content of the posting in the alert window depending on how the rss feed was built. Does anyone else see potential in this idea? Any XML junkies out there who might beable to whip up an XML/RSS mod? |
http://www.r7designer.com Free Dreamweaver Templates and loads of help for CSS, XHTML and Web Standards. |
|
CarKnee
Junior Member
 
USA
297 Posts |
Posted - 04 October 2002 : 11:50:51
|
Maybe something like this:
Function showRecentXML(intTop)
if intTop = "" Then intTop = 5
strConnString = "Your Conn String Here"
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strSQL = "SELECT TOP " & intTop _
& "MEMBERS.M_NAME, " _
& "FORUM.FORUM_ID, " _
& "FORUM.F_SUBJECT, " _
& "TOPICS.TOPIC_ID, " _
& "TOPICS.T_SUBJECT, " _
& "TOPICS.T_AUTHOR, " _
& "TOPICS.T_REPLIES, " _
& "TOPICS.T_DATE, " _
& "TOPICS.T_MESSAGE " _
& "FROM FORUM_TOPICS TOPICS, FORUM_FORUM FORUM, FORUM_MEMBERS MEMBERS " _
& "WHERE FORUM.F_PRIVATEFORUMS = 0 AND " _
& "FORUM.FORUM_ID <> 1 AND " _
& "TOPICS.FORUM_ID = FORUM.FORUM_ID AND " _
& "TOPICS.T_AUTHOR = MEMBERS.MEMBER_ID " _
& "ORDER BY TOPICS.t_date desc"
set rsInfo = my_Conn.Execute (StrSql)
strXML = "<snitz>" & VbCrLf
While NOT rsInfo.EOF
strXML = strXML & " <topic>" & VbCrLf _
& " <topic_id>" & rsInfo("TOPIC_ID") & "</topic_id>" & VbCrLf _
& " <topic_subject>" & rsInfo("t_subject") & "</topic_subject>" & VbCrLf _
& " <author_id>" & rsInfo("t_author") & "</author_id>" & VbCrLf _
& " <author_name>" & rsInfo("M_name") & "</author_name>" & VbCrLf _
& " <post_date>" & chkDate(rsInfo("T_Date"), , False) & "</post_date>" & VbCrLf _
& " <post_time>" & chkTime(rsInfo("T_Date"))& "</post_time>" & VbCrLf _
& " <topic_message>" & rsInfo("t_message") & "</topic_message>" & VbCrLf _
& " <num_replies>" & rsInfo("T_REPLIES") & "</num_replies>" & VbCrLf _
& " <forum_id>" & rsInfo("FORUM_ID") & "</forum_id>" & VbCrLf _
& " <forum_subject>" & rsInfo("F_SUBJECT") & "</forum_subject>" & VbCrLf _
& " </topic>" & VbCrLf
rsInfo.MoveNext
Wend
strXML = strXML & "</snitz>" & VbCrLf
my_Conn.Close
Set my_Conn = Nothing
Set rsInfo = NOthing
showRecentXML = strXML
End Function
|
 |
Edited by - CarKnee on 04 October 2002 11:57:14 |
 |
|
CarKnee
Junior Member
 
USA
297 Posts |
Posted - 04 October 2002 : 12:10:38
|
It is a starting point... I forgot a lot of XML/Schema stuff!
But it is something to build from.
CarKnee |
 |
Edited by - CarKnee on 04 October 2002 12:10:58 |
 |
|
Podge
Support Moderator
    
Ireland
3776 Posts |
|
CarKnee
Junior Member
 
USA
297 Posts |
Posted - 04 October 2002 : 14:21:04
|
I would like that!
Thanks Podge.
CarKnee |
 |
 |
|
Podge
Support Moderator
    
Ireland
3776 Posts |
|
robbear7
Junior Member
 
106 Posts |
Posted - 04 October 2002 : 16:19:51
|
Podge, there is a syndicator mod out already? I'll take a look, but if you want, you could send it to me at robbear7@robbear7.com  |
http://www.r7designer.com Free Dreamweaver Templates and loads of help for CSS, XHTML and Web Standards. |
 |
|
al_iguana
Junior Member
 
138 Posts |
|
ROB
Junior Member
 
USA
347 Posts |
Posted - 04 October 2002 : 20:26:13
|
Great suggestion, robbear7! I also have Trillian Pro and was interested in doing the same sort of thing. I've looked at the RSS/RDF grabber MOD at www.serverhacker.com but that takes an RSS feed and displays it on your site.
Podge, I'm not familiar with the syndication MOD, but it sounds more like what I'm after. Can you send a copy my way as well? jeff@bigblueball.com
Many thanks! |
Jeff (ROB) Hester BigBlueNetwork | BigBlueBall | Christian Church Today |
 |
|
robbear7
Junior Member
 
106 Posts |
Posted - 04 October 2002 : 21:05:15
|
ROB, I was able to find the syndication MOD within the archived threads, but it is quite old now, I think back in 2001. The zip download was broken. I am still waiting to see if podge will send me that MOD as that would simply make life easeir for me.
I'm not to concerned on grabbing feeds to stick on my site, just more wanting to create a feed from my forum. |
http://www.r7designer.com Free Dreamweaver Templates and loads of help for CSS, XHTML and Web Standards. |
 |
|
ROB
Junior Member
 
USA
347 Posts |
|
robbear7
Junior Member
 
106 Posts |
Posted - 05 October 2002 : 11:55:04
|
Hey thanks for the link, I'll check it out. If I can manage to do this, then it would be quite the learning experience for me.
I am no good at writing MOD's, but perhaps a decent tutorial could be written from this learning experience...
Bye the way, awesome site you have. What an original idea... IM's. And the site is very clean and orgainized. Kudo's to your site. 
|
http://www.r7designer.com Free Dreamweaver Templates and loads of help for CSS, XHTML and Web Standards. |
 |
|
blackinwhite
Average Member
  
Turkey
657 Posts |
Posted - 05 October 2002 : 12:12:40
|
http://ASPRSS.com has a great reources for beginners about building your own RDF/RSS file. |
 |
|
robbear7
Junior Member
 
106 Posts |
Posted - 05 October 2002 : 13:07:41
|
Thanks blackinwhite for the helpful link, but ROB already beat you to it 
I have been reading through www.asprss.com this morning and I actually feel confident I will get this to work on my own. It's a great site! |
http://www.r7designer.com Free Dreamweaver Templates and loads of help for CSS, XHTML and Web Standards. |
 |
|
blackinwhite
Average Member
  
Turkey
657 Posts |
Posted - 05 October 2002 : 15:58:19
|
:)
I have made one for my CMS, it's different from the one suggested at asprss.com.
here is the code, if you like,
<%
Option Explicit
' -----------------
' RSS FILE
' -----------------
response.ContentType = "text/xml"
'VARIABLES
Dim conn, strDatabasePath, sql, rs
' -------
set conn = Server.CreateObject("ADODB.Connection")
strDatabasePath = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\clients\db.mdb;"
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDatabasePath & ";"
' SQL
sql = "SELECT TOP 9 * FROM tblMessages WHERE approved = 1 ORDER BY fldMessageId DESC"
' ----
set rs = Conn.Execute(sql)
rs.MoveFirst()
'----------------
' HEADER
'----------------
response.write("<?xml version=""1.0"" encoding=""windows-1254""?>") & vbcrlf
response.write("<rss version=""0.91"">") & vbcrlf
' ---------------
response.write("<channel>") & vbcrlf
response.write("<title>address.net/e</title>") & vbcrlf
response.write("<link>http://www.address.net/e/default.asp</link>") & vbcrlf
response.write("<description>e? alternatif, medya, mizah, muzik, tasarim, populer kultur, sinema, teknoloji, toplum, web tasarimi gibi konularda gunluk linkler, yorumlar ve notlardan olusan guncel bir derlemedir...</description>") & vbcrlf
response.write("<language>tr</language>") & vbcrlf & vbcrlf
' -----------------------
while (not rs.EOF)
response.write("<item>") & vbcrlf
response.write("<title>" & rs("fldMessageTitle") & "</title>") & vbcrlf
response.write("<description>") & vbcrlf
response.write("<![CDATA[") & vbcrlf
response.write("<p>" & left(ClearHTMLTags(rs("fldMessageHeader"),""),100) & "...</p>") & vbcrlf
response.write("]]>") & vbcrlf
response.write("</description>") & vbcrlf
response.write("<link>http://www.address.net/e/messages.asp?message=" & rs("fldMessageId") & "</link>") & vbcrlf
response.write("</item>") & vbcrlf & vbcrlf
rs.MoveNext()
wend
' ------------------------
rs.close() 'clear
conn.close() ' clear
response.write("</channel>")
response.write("</rss>")
'#################################################################################
'# Function ClearHTMLTags().
'# by Jóhann Haukur Gunnarsson
'#
'# Variables needed to be defined before calling this
'# function are the following:
'#
'# @strHTML - String to be cleaned up
'# @strTag - "" - (Empty) if you want to remove all HTML tags
'# Tag - To remove an especific tag ( img, p, b, etc )
'#################################################################################
Function ClearHTMLTags( strHTML, strTag )
' Variables used in the function
dim regEx
' regEx initialization
set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Global = True
regEx.Pattern = "<" & strTag & "[^>]*>"
strHTML = regEx.Replace( strHTML, "" )
set regEx = nothing
ClearHTMLTags = strHTML
end function
%>
|
 |
|
robbear7
Junior Member
 
106 Posts |
Posted - 05 October 2002 : 16:40:19
|
Hey thanks Blackandwhite!
You have broadened my options and I appreciate that. I may try to modify your above code and see what I can get to happen. |
http://www.r7designer.com Free Dreamweaver Templates and loads of help for CSS, XHTML and Web Standards. |
 |
|
|
Topic  |
|