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/Code)
 Is there a mod that will...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kdawgy
Starting Member

1 Posts

Posted - 17 June 2002 :  15:26:01  Show Profile
automatically post the lastest topics on your frontpage? I know I've seen this done w/ UBB. Thanks.

TimLA
Junior Member

USA
126 Posts

Posted - 17 June 2002 :  15:52:31  Show Profile  Visit TimLA's Homepage  Send TimLA an AOL message  Send TimLA a Yahoo! Message
You can use the syndication mod (www.snitz.info). I use it on my main page. You can use the slash mod, but I wasn't able to get it up as fast as the syndication mod.



Tim Nance
Hesed Ministries
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 17 June 2002 :  16:22:57  Show Profile
I use this, not sure if the its all up to scratch ASP wise but it seems to work for me



<!--#INCLUDE FILE="forum/config.asp" -->
<!--#INCLUDE FILE="forum/inc_functions.asp" -->
<%
Dim sQLQuery
Dim count
count = "0"

sQLQuery = "select FORUM_TOPICS.TOPIC_ID, FORUM_TOPICS.T_SUBJECT, FORUM_TOPICS.T_MESSAGE," & _
" FORUM_TOPICS.T_DATE from FORUM_TOPICS" & _
" ORDER BY FORUM_TOPICS.TOPIC_ID DESC;"

Set dataConn = Server.CreateObject("ADODB.Connection")
dataConn.Open strConnString
Set RSlist = Server.CreateObject("ADODB.recordset")
Rslist.Open sqlQuery, dataConn

Do While Not RSlist.EOF AND count < "5"

response.write "<a href=""forum/topic.asp?TOPIC_ID=" & RSlist("TOPIC_ID") & " "" " & " class=""pageLinks"" > Subject : " & VBNewline & _
RSlist("T_SUBJECT") & "</a><BR>" & VBNewline
response.write "<span class=""textPost""> " & Trim(Left(RemoveHTML(RSlist("T_MESSAGE")), 50)) & "....</span>" & "<BR>" & VBNewline
response.write "<span class=""textSmallMoreover"">Posted : " & StrToDate(RSlist("T_DATE")) & "</span><BR>" & VBNewline
'increment count
count = count + 1

RSlist.Movenext
Loop
%>


Also add this to include functions if you are going to use it.


Function RemoveHTML( strText )
Dim nPos1
Dim nPos2

nPos1 = InStr(strText, "<")
Do While nPos1 > 0
nPos2 = InStr(nPos1 + 1, strText, ">")
If nPos2 > 0 Then
strText = Left(strText, nPos1 - 1) & Mid(strText, nPos2 + 1)
Else
Exit Do
End If
nPos1 = InStr(strText, "<")
Loop

RemoveHTML = strText
End Function


.::Hamlin::.
The Arsenal!
In the time of chimpanzees I was a monkey
I was also an insomniac

EDIT - I think i've seen a mistake in my code , and your will have to remove the <span class="...> stuff if you use it.

Edited by - Hamlin on 17 June 2002 16:26:31
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.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07