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 Posts
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

deki
Starting Member

Brazil
34 Posts

Posted - 19 June 2003 :  20:57:51  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
I would like to place in my page, one script that it shows the last posts of mine fórum.
Please help-me

My Forum: http://www.losdakilla.com.br/forum

Edited by - ruirib on 01 July 2003 00:15:39

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 20 June 2003 :  04:17:20  Show Profile
There is a MOD for what you want I think at www.snitzbitz.com called "Content Display" or something like that.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

deki
Starting Member

Brazil
34 Posts

Posted - 23 June 2003 :  00:43:05  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
It does not have a more easy way?

My Forum: http://www.losdakilla.com.br/forum
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 23 June 2003 :  06:26:56  Show Profile
I can't think of an easier way than to use the code someone else wrote.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Francodepaw
Junior Member

USA
111 Posts

Posted - 23 June 2003 :  10:49:46  Show Profile
Are you looking to show on your front page, or everypage of your forum? I have an include that creates a small box with the last x Posts real simple but effective. It is more for the portal page.
Go to Top of Page

deki
Starting Member

Brazil
34 Posts

Posted - 23 June 2003 :  13:32:26  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
It is this. Please help me Francodepaw

My Forum: http://www.losdakilla.com.br/forum
Go to Top of Page

deki
Starting Member

Brazil
34 Posts

Posted - 30 June 2003 :  23:35:27  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
Somebody can help me? The page that the Francodepaw passed is offline.

My Forum: http://www.losdakilla.com.br/forum
Go to Top of Page

Francodepaw
Junior Member

USA
111 Posts

Posted - 01 July 2003 :  00:25:35  Show Profile
quote:
Originally posted by deki

Somebody can help me? The page that the Francodepaw passed is offline.



Something weird went on with email cause the email I got back from you said the rest of the email was offline???

Are you using a Portal Mod Like Server Hackers, HuwR's or Crashs?
The file I have is an include that you would use on one of the main pages for these packages. It might work with content dispaly mod if you have that installed.


Go to Top of Page

deki
Starting Member

Brazil
34 Posts

Posted - 01 July 2003 :  00:51:29  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
Yes, I need this include that you said.

My Forum: http://www.losdakilla.com.br/forum
Go to Top of Page

deki
Starting Member

Brazil
34 Posts

Posted - 01 July 2003 :  00:53:19  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
The address that you it sent in the email is offline.
http://www.shnforum.com/forum/topic.asp?TOPIC_ID=1354&whichpage=2

My Forum: http://www.losdakilla.com.br/forum

Edited by - deki on 01 July 2003 00:54:22
Go to Top of Page

Francodepaw
Junior Member

USA
111 Posts

Posted - 01 July 2003 :  11:21:28  Show Profile
I'm on an Intranet so can't cut a link to my file. This is a modified block that John over at www.Airwarriors.com did. He offers several includes over there.

I use the icon from the MSGICON mod so if you don't use that one will want to edit this line.

<td><% =getCurrentIcon(getCurrentMsgIcon(rs.fields("T_MSGICON")),"",hspace="3") %>
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>" color="<% =strForumFontColor %>">
 By: <a href="pop_profile.asp?mode=display&id=<% =rs("T_AUTHOR")%>"><% =getMemberName(rs.Fields("T_AUTHOR"))%>

This will not show any new posts in private forums. I made some changes to make it work with MySql as well.

Cut and paste and save as inc_last_topics.asp or whatever you want the include to be.


<%
'########################################################################################
'# Last x Topics Block
'#
'# REQUIRES:  Sitenews.asp or other Portal frontend
'#
'# Used code from John's inc_top_posters.asp as a default framework for the block.
'#
'# Place the inc_last_topics.asp in your includes folder under the forum directory.
'#
'# Edit your sitenews.asp file with the spacers and the inc_last_topics.asp reference
'# where you want it to show up, example:
'#
'#          <!-- #include file="inc_spacer.asp" -->
'#          <!-- #include file="inc_spacer.asp" -->
'#          <!--#include file="include/inc_top_read.asp"-->
'#
'# See John's includes over www.Airwarriors.com
'#
'# JohnWickham@Airwarriors.com
'#
'########################################################################################
<!-- #include file="inc_func_common.asp" -->
dim intLastTopics

'########################################################################################
'# You can use change this variable to how many top read topics you wish to display
'########################################################################################

intLastTopics		= 5	' number of topics to display

Response.Write  "<table width=""100%"" border=""0"" bordercolor=""" & strTableBorderColor & """ cellspacing=""1"" cellpadding=""0"" bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
		"<tr>" & vbNewLine & _
		"<td bgcolor=""" & StrHeadCellColor & """>" & vbNewLine & _
		"<font size=""4"" color=""" & StrHeadFontColor & """> Recent Topics</font>" & vbNewLine & _
		"</td>" & vbNewLine & _
		"</tr>" & vbNewLine & _
		"<tr bgcolor=""" & StrCategoryCellColor & """>" & vbNewLine & _
		"<td>" & vbNewLine & _
		"<table widht=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
		"<tr bgcolor=""" & StrCategoryCellColor & """>" & vbNewLine & _
		"<td>" & vbNewLine & _
		"<font size=""1"" color=""" & StrDeForumFontColor & """> Forum/Topic/Author</font>" & vbNewLine & _
		"</td>" & vbNewLine & _
		"<td align=""right"" width=""1%"" nowrap>" & vbNewLine & _
		"<font size=""1"" color=""" & StrDeForumFontColor & """></font>" & vbNewLine & _
		"</td>" & vbNewLine & _
		"</tr>" & vbNewLine & _
		"</table>" & vbNewLine & _
		"</td>" & vbNewLine & _
		"</tr>" & vbNewLine & _
		"<tr>" & vbNewLine & _
		"<td align=""left"">" & vbNewLine & _
		"<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
		"<tr>" & vbNewLine & _
		"<td align=""center"">" & vbNewLine & _
		"<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""4"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
		"<tr>" & vbNewLine & _
		"<td align=""center"">" & vbNewLine



function displaylastTopics()
	dim rs
	set rs = server.CreateObject("adodb.recordset")
        if strDBType = "mysql" then
		strSql = "SELECT " & strTablePrefix & "TOPICS.FORUM_ID, "& strTablePrefix & "TOPICS.TOPIC_ID, "& strTablePrefix & "TOPICS.T_SUBJECT, "& strTablePrefix & "TOPICS.T_AUTHOR, " & strTablePrefix & "TOPICS.T_REPLIES, " & strTablePrefix & "TOPICS.T_VIEW_COUNT, " & strTablePrefix & "TOPICS.T_DATE, "& strTablePrefix & "TOPICS.T_MSGICON FROM " & strTablePrefix & "TOPICS INNER JOIN FORUM_FORUM ON FORUM_TOPICS.FORUM_ID = FORUM_FORUM.FORUM_ID WHERE (((FORUM_FORUM.F_PRIVATEFORUMS)<5)) ORDER BY T_DATE DESC LIMIT " & intLastTopics
	else
		strSql = "SELECT TOP " & intLastTopics & " " & strTablePrefix & "TOPICS.FORUM_ID, "& strTablePrefix & "TOPICS.TOPIC_ID, "& strTablePrefix & "TOPICS.T_SUBJECT, "& strTablePrefix & "TOPICS.T_AUTHOR, " & strTablePrefix & "TOPICS.T_REPLIES, " & strTablePrefix & "TOPICS.T_VIEW_COUNT, " & strTablePrefix & "TOPICS.T_DATE FROM " & strTablePrefix & "TOPICS INNER JOIN FORUM_FORUM ON FORUM_TOPICS.FORUM_ID = FORUM_FORUM.FORUM_ID WHERE (((FORUM_FORUM.F_PRIVATEFORUMS)<5)) ORDER BY T_DATE DESC" 
	end if

	rs.Open strSql, my_Conn
	%>
	<table border="0" cellpadding="0" cellspacing="5" width="100%">
		<% 
		dim intCounter
		intCounter = 1
		do while not rs.EOF
		%>
			<tr bgcolor=<% =StrCategoryCellColor %>>
				<td><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>" color="<% =strForumFontColor %>"><b>Forum:</b>  <% =getForumSubject(rs.Fields("FORUM_ID"))%></font></a>
			</td>
			<tr>
		       		<td><% =getCurrentIcon(getCurrentMsgIcon(rs.fields("T_MSGICON")),"",hspace="3") %>
		       		<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>" color="<% =strForumFontColor %>">
				 By: <a href="pop_profile.asp?mode=display&id=<% =rs("T_AUTHOR")%>"><% =getMemberName(rs.Fields("T_AUTHOR"))%>
				</font></a>
	                       	</td>
			</tr>
			<tr>
		       		<td><b><a href="link.asp?TOPIC_ID=<%=rs("TOPIC_ID")%>"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>" color="<% =strForumFontColor %>"><%= rs("T_SUBJECT")%></font></b></a></td>
		       	
			</tr>
			<tr>
		       		<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>" color="<% =strForumFontColor %>">
				<br>[Viewed <% =rs("T_VIEW_COUNT")%> times with <% =rs("T_REPLIES")%> replies]
				</font></a></td>
			</tr>
			<%
			intCounter = intCounter + 1
			rs.movenext
		loop%>
	</table>
	<%

	rs.Close
	set rs = nothing
end function

displayLastTopics



Response.Write  "</td>" & vbNewLine & _
		"</tr>" & vbNewLine & _
		"</table>" & vbNewLine & _
		"</td>" & vbNewLine & _
		"</tr>" & vbNewLine & _
		"</table>" & vbNewLine & _
		"</td>" & vbNewLine & _
		"</tr>" & vbNewLine & _
		"</table>" & vbNewLine

function getForumSubject(fForum_Number)

	dim strSql
	dim rsGetForumSubject

	'## Forum_SQL
	if isNull(fForum_Number) then exit function
	strSql = "SELECT F_SUBJECT "
	strSql = strSql & " FROM " & strMemberTablePrefix & "FORUM "
	strSql = strSql & " WHERE FORUM_ID = " & cLng(fForum_Number)

	set rsGetForumSubject = Server.CreateObject("ADODB.Recordset")
	rsGetForumSubject.open strSql, my_Conn

	if rsGetForumSubject.EOF or rsGetForumSubject.BOF then
		getForumSubject = ""
	else
		getForumSubject = chkString(rsGetForumSubject("F_SUBJECT"),"display")
	end if

	rsGetForumSubject.close
	set rsGetForumSubject = nothing

end function

function getMemberName(fUser_Number)

	dim strSql
	dim rsGetmemberName

	'## Forum_SQL
	if isNull(fUser_Number) then exit function
	strSql = "SELECT M_NAME "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
	strSql = strSql & " WHERE MEMBER_ID = " & cLng(fUser_Number)

	set rsGetMemberName = Server.CreateObject("ADODB.Recordset")
	rsGetMemberName.open strSql, my_Conn

	if rsGetMemberName.EOF or rsGetMemberName.BOF then
		getMemberName = ""
	else
		getMemberName = chkString(rsGetMemberName("M_NAME"),"display")
	end if

	rsGetMemberName.close
	set rsGetMemberName = nothing

end function
%>

Edited by - Francodepaw on 01 July 2003 11:25:49
Go to Top of Page

deki
Starting Member

Brazil
34 Posts

Posted - 01 July 2003 :  14:42:07  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
The following error occurred:
ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/ldk/forum/inc_last_topics.asp, line 72

My Forum: http://www.losdakilla.com.br/forum
Go to Top of Page

deki
Starting Member

Brazil
34 Posts

Posted - 04 July 2003 :  21:49:40  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
 

My Forum: http://www.losdakilla.com.br/forum
Go to Top of Page

Francodepaw
Junior Member

USA
111 Posts

Posted - 07 July 2003 :  12:06:44  Show Profile
Sorry, been out for a holiday. Do you have a link to your site, so I look to see how you are trying to tie it in? What database are you using?
Go to Top of Page

deki
Starting Member

Brazil
34 Posts

Posted - 07 July 2003 :  21:15:22  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
Acess

My Forum: http://www.losdakilla.com.br/forum
Go to Top of Page

deki
Starting Member

Brazil
34 Posts

Posted - 08 July 2003 :  10:41:48  Show Profile  Visit deki's Homepage  Send deki an ICQ Message  Send deki a Yahoo! Message
http://www.losdakilla.com.br/ldk/forum/inc_last_topics.asp

My Forum: http://www.losdakilla.com.br/forum
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07