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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 List of latest topics
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

macho
Junior Member

Denmark
150 Posts

Posted - 30 October 2001 :  17:57:14  Show Profile
On my startpage (which is on an intranet) I would like to create a table which contains the last five topics that have been added to my forum. Any ideas how to make this work?

regards

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 30 October 2001 :  18:27:14  Show Profile
Try this: http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=7174

The download link doesn't work anymore, but I have it for download here:

http://briefcase.yahoo.com/bc/richard_kinser/lst?.dir=/FILES&.view=l

It's the file named: snitz-syndication
Go to Top of Page

aecio
Junior Member

Brazil
120 Posts

Posted - 07 December 2001 :  06:43:33  Show Profile  Visit aecio's Homepage
I can give you the ASP code to do this:

Just put the following code where you want to show the (5) topics which received the latest posts:

ConnectionString = "DSN=yourDSN;UID=yourUserID;PWD=yourPWD"
Set objDB = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objDB.ConnectionTimeout = 360
objDB.CommandTimeout = 360
objDB.Open ConnectionString

strSQL = "SELECT TOP 5 TOPIC_ID, T_SUBJECT FROM FORUM_TOPICS ORDER BY T_LAST_POST DESC"
objRS.Open strSQL,objDB,3, 1, &H0001
If Not objRS.EOF Then
Response.Write "<table border=0 width=""100%"" class=""txtpeq"">"
For x = 1 to objRS.RecordCount
Response.Write "<td align=left class=txtpeq><a href=""forum/topic.asp?TOPIC_ID=" & objRS("TOPIC_ID") & """ class=""txtpeq"">" & objRS("T_SUBJECT") & "</a></td></tr>"
objRS.MoveNext
Next
Response.Write "</table>"
End If
objRS.Close
objDB.Close
Set objRS = Nothing
Set objDB = Nothing



to show the 5 topics last added, modify the sql line to this:

strSQL = "SELECT TOP 5 TOPIC_ID, T_SUBJECT FROM FORUM_TOPICS ORDER BY T_DATE DESC"


Cheers!
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.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07