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)
 Last 5 latest replies on main site
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

wizard
Junior Member

208 Posts

Posted - 09 November 2002 :  09:55:31  Show Profile  Visit wizard's Homepage
Got a forum http://forums.tjc.edu.sg and got a main site http://www.tjc.edu.sg and if you scroll down on the main site, I have reserved a nice little spot for the 5 latest replies or whatever.

Running SQL Server with Snitz 3.4.03. I know that there are a lot of MODs alredy out there but it seems they require me to install some other MOD before doing it. Can anyone recommend one which I can work on immediately. Thanks.

padawan
Junior Member

200 Posts

Posted - 09 November 2002 :  10:09:15  Show Profile
quote:
Originally posted by wizard

Got a forum http://forums.tjc.edu.sg and got a main site http://www.tjc.edu.sg and if you scroll down on the main site, I have reserved a nice little spot for the 5 latest replies or whatever.

Running SQL Server with Snitz 3.4.03. I know that there are a lot of MODs alredy out there but it seems they require me to install some other MOD before doing it. Can anyone recommend one which I can work on immediately. Thanks.




Unfortunately, I think the only way you can extract information right out is to get going with a MOD. The Content Display MOD (by @TOMIC) should do what you required above. My site (among the hundreds in this community) uses Content Display to display the most recent posts of the forum.

goodluck!

- padawan

"...be mindful of the SnitzForce..."
Go to Top of Page

suhern
Junior Member

186 Posts

Posted - 09 November 2002 :  11:32:48  Show Profile
You can try the following: (adapted from an old slash mod)




<!--#INCLUDE FILE="config.asp" --> 
<!--#INCLUDE FILE="inc_func_common.asp" -->

<%
    Dim T_Subject, F_Subject, T_Message, FORUM_ID, CAT_ID, T_REPLIES, T_DATE, TOPIC_ID, slPosts, T_STATUS
    slPosts = 5    ' number of posts
    Set objConn = Server.CreateObject("ADODB.Connection")
    Set objRec = Server.CreateObject("ADODB.RecordSet")
    strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("path to your .mdb") '## MS Access 2000 using virtual path
    objConn.Open strConnect   ' replace strConnect with you connection String
        
    strSQL = "SELECT TOP " & slPosts & _
				" FORUM_TOPICS.CAT_ID, " & _
				"FORUM_TOPICS.FORUM_ID, " & _
				"FORUM_TOPICS.TOPIC_ID, " & _
				"FORUM_TOPICS.T_SUBJECT, " & _
				"FORUM_TOPICS.T_REPLIES, " & _
				"FORUM_TOPICS.T_DATE, " & _
				"FORUM_FORUM.F_SUBJECT, " & _
				"FORUM_TOPICS.T_MESSAGE, " & _
				"FORUM_TOPICS.T_MSGICON, " & _
				"FORUM_TOPICS.T_STATUS " & _
				"FROM FORUM_TOPICS " & _			
				"INNER JOIN FORUM_FORUM ON " & _
				"FORUM_TOPICS.FORUM_ID = FORUM_FORUM.FORUM_ID " & _
				"WHERE FORUM_FORUM.F_PRIVATEFORUMS = 0 " & _
				" AND FORUM_TOPICS.T_STATUS = 1 " & _
				"ORDER BY FORUM_TOPICS.TOPIC_ID DESC;"
     set objRec = objConn.Execute(strSql)
        
    While NOT objRec.EOF
      T_Subject     =   objRec("T_SUBJECT")
      F_Subject		=	objRec("F_SUBJECT")
      T_Message     =   objRec("T_MESSAGE")
      T_MSGICON     =   objRec("T_MSGICON")
      FORUM_ID      =   objRec("FORUM_ID")
      CAT_ID        =   objRec("CAT_ID")
      T_REPLIES     =   objRec("T_REPLIES")
      T_DATE        =   objRec("T_DATE")
      TOPIC_ID      =   objRec("TOPIC_ID")

      T_Message = formatStr( T_Message )& "<P></P>" 
      T_Message = Left( T_Message, instr( T_Message, "</P>" ) - 1 )    
%> 

<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="<% =strForumCellColor %>">

    <tr>
      <td align="left" bgcolor="<%=strAltForumCellColor %>"><img src='images/icon_mi_<% = T_MSGICON%>.gif' border="0"  align="left"></td>
      <td width="100%" align="left"  bgcolor="<%=strAltForumCellColor %>">
      <font face="Verdana" size="2" color="#800080"><b><%= T_SUBJECT%></b></font>
	  </td>
    </tr>
  
    <tr>
      <TD valign="top" align="left" colspan="2" >
      <font face="Verdana" size="2"><%= T_MESSAGE %></font><font face="Verdana" size="2" color="#800080">[ <a href="<%= strForumURL %>link.asp?TOPIC_ID=<%= TOPIC_ID %>">read more</a>|
      "<i><%= F_SUBJECT %></i>" ]</font><br><br>
      </td>
    </tr>
  

</table>



<%
      objRec.MoveNext()
    Wend

    objRec.Close
    set objRec = Nothing
    objConn.Close
    set objConn = Nothing
%>




Please refer to this topic on the issue of detecting end of paragraph:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=38150

Edited by - suhern on 09 November 2002 12:23:56
Go to Top of Page

wizard
Junior Member

208 Posts

Posted - 10 November 2002 :  02:47:52  Show Profile  Visit wizard's Homepage
DEPENDANCIES:
This is important: You should have the MOD: Message Icons (RichardKinser), the AVATAR MOD (RichardKinser), and the CATEGORY & FORUM SORTING MOD (RichardKinser) and Forum Posting Restrictions and Hiding (HuwR), installed BEFORE you install this mod. Here are available links that I know of:

Copied the above from the Content Display MOD V2. That was what I mean when I said they require me to install the other few MODs. I'm fine with installing MODs, have installed maybe about 50+ all so already. But this time, I wish to install a bare-bone one with as little MOD as possible so that future upgrading will be easier.

Thank you anyway!
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.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07