Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 RSS Feed
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

robbear7
Junior Member

106 Posts

Posted - 04 October 2002 :  10:51:49  Show Profile  Visit robbear7's Homepage  Send robbear7 an AOL message  Send robbear7 an ICQ Message  Send robbear7 a Yahoo! Message
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  Show Profile  Visit CarKnee's Homepage
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
Go to Top of Page

CarKnee
Junior Member

USA
297 Posts

Posted - 04 October 2002 :  12:10:38  Show Profile  Visit CarKnee's Homepage
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
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 04 October 2002 :  14:09:22  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Kurt's syndication mod can already do this. I can email it if you like, its only 5k.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

CarKnee
Junior Member

USA
297 Posts

Posted - 04 October 2002 :  14:21:04  Show Profile  Visit CarKnee's Homepage
I would like that!

Thanks Podge.

CarKnee

Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 04 October 2002 :  14:28:08  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I need your email address then.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

robbear7
Junior Member

106 Posts

Posted - 04 October 2002 :  16:19:51  Show Profile  Visit robbear7's Homepage  Send robbear7 an AOL message  Send robbear7 an ICQ Message  Send robbear7 a Yahoo! Message
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.
Go to Top of Page

al_iguana
Junior Member

138 Posts

Posted - 04 October 2002 :  19:05:53  Show Profile  Visit al_iguana's Homepage
Braham has made an RSS/RDF grabber mod. you can download it from the mods thread @ www.serverhacker.com

----

Don't Dream It ~ Be It
http://www.peppermintiguana.co.uk/cymrugothic/
Go to Top of Page

ROB
Junior Member

USA
347 Posts

Posted - 04 October 2002 :  20:26:13  Show Profile  Visit ROB's Homepage  Send ROB an AOL message  Send ROB an ICQ Message  Send ROB a Yahoo! Message
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
Go to Top of Page

robbear7
Junior Member

106 Posts

Posted - 04 October 2002 :  21:05:15  Show Profile  Visit robbear7's Homepage  Send robbear7 an AOL message  Send robbear7 an ICQ Message  Send robbear7 a Yahoo! Message
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.
Go to Top of Page

ROB
Junior Member

USA
347 Posts

Posted - 05 October 2002 :  05:32:09  Show Profile  Visit ROB's Homepage  Send ROB an AOL message  Send ROB an ICQ Message  Send ROB a Yahoo! Message
There is an excellent site for learning more about generating RSS using ASP at asprss.com.

I've used their example to generate a news feed for Trillian Pro from the news articles on my site. It's still being developed, but you can check the feed out at http://www.bigblueball.com/rss.xml

Jeff (ROB) Hester
BigBlueNetwork | BigBlueBall | Christian Church Today

Edited by - ROB on 05 October 2002 05:32:48
Go to Top of Page

robbear7
Junior Member

106 Posts

Posted - 05 October 2002 :  11:55:04  Show Profile  Visit robbear7's Homepage  Send robbear7 an AOL message  Send robbear7 an ICQ Message  Send robbear7 a Yahoo! Message
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.
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 05 October 2002 :  12:12:40  Show Profile
http://ASPRSS.com has a great reources for beginners about building your own RDF/RSS file.
Go to Top of Page

robbear7
Junior Member

106 Posts

Posted - 05 October 2002 :  13:07:41  Show Profile  Visit robbear7's Homepage  Send robbear7 an AOL message  Send robbear7 an ICQ Message  Send robbear7 a Yahoo! Message
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.
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 05 October 2002 :  15:58:19  Show Profile
:)

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

%>
Go to Top of Page

robbear7
Junior Member

106 Posts

Posted - 05 October 2002 :  16:40:19  Show Profile  Visit robbear7's Homepage  Send robbear7 an AOL message  Send robbear7 an ICQ Message  Send robbear7 a Yahoo! Message
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.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.66 seconds. Powered By: Snitz Forums 2000 Version 3.4.07