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)
 Post/Topic Counts Including Archived Totals
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jeepaholic
Average Member

USA
697 Posts

Posted - 30 October 2002 :  01:31:28  Show Profile  Visit Jeepaholic's Homepage
MOD: Post/Topic Counts Including Archived Totals

EASE OF INSTALLATION: On a scale of 1-10 (10=hardest), this is a 1.

TESTED ON SNITZ VERSION(s): 3.4.03
TESTED ON DATABASE(s): SQL 2000

LAST UPDATED: n/a
INITIAL RELEASE: 10/29/02

DESCRIPTION: This mod will display ALL topic and post counts
(including archived ones) in forums that actually have archived topics.
This display occurs in default.asp. The actual available post/topic
counts are shown in parenthesis.

LIVE DEMO (Production): Support Groups for Jeepaholics Anonymous

SCREENSHOT:



INSTRUCTIONS:
Open up DEFAULT.ASP

STEP 1:
Find the following SQL statement (approximately line #209)
and ADD the statement marked in RED.
strSql = "SELECT F.FORUM_ID, F.F_STATUS, F.CAT_ID, F.F_SUBJECT, F.F_URL, F.F_TOPICS, " &_
	 "F.F_COUNT, F.F_LAST_POST, F.F_LAST_POST_TOPIC_ID, F.F_LAST_POST_REPLY_ID, F.F_TYPE, " & _
	 "F.F_ORDER, F.F_A_COUNT, F.F_SUBSCRIPTION, F_PRIVATEFORUMS, F_PASSWORD_NEW, " & _
	 "M.MEMBER_ID, M.M_NAME, " & _
         "T.T_REPLIES, T.T_UREPLIES, " & _
         "F.F_DESCRIPTION, F.F_A_TOPICS " & _
	 "FROM ((" & strTablePrefix & "FORUM F " &_
	 "LEFT JOIN " & strMemberTablePrefix & "MEMBERS M ON " &_
	 "F.F_LAST_POST_AUTHOR = M.MEMBER_ID) " & _
         "LEFT JOIN " & strTablePrefix & "TOPICS T ON " & _
         "F.F_LAST_POST_TOPIC_ID = T.TOPIC_ID) "


STEP 2:
Find the following code (approximately line #380)
and ADD the code in RED.
fF_DESCRIPTION = 20
fF_A_TOPICS = 21


STEP 3:
Find the following code (approximately line #447)
and ADD the code in RED.
ForumDescription = allForumData(fF_DESCRIPTION,iForum)       
ForumATopics = allForumData(fF_A_TOPICS,iForum)


STEP 4:
Find the following code (approximately line #540)
and ADD the code in RED.

if IsNull(ForumTopics) then 
  Response.Write	"                <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>0</font></td>" & vbNewline
elseif ForumACount > 0 and strArchiveState = "1" then
  Response.Write	"                <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & ForumATopics+ForumTopics & "<br><font size=""" & strDefaultFontSize-1 & """>(" & ForumTopics & ")</font></td>" & vbNewline
else
  Response.Write	"                <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & ForumTopics & "</font></td>" & vbNewline
end if 
if IsNull(ForumCount) then 
  Response.Write	"                <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>0</font></td>" & vbNewline
elseif ForumACount > 0 and strArchiveState = "1" then
  Response.Write	"                <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & ForumACount+ForumCount & "<br><font size=""" & strDefaultFontSize-1 & """>(" & ForumCount & ")</font></td>" & vbNewline
else
  Response.Write	"                <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""top""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & ForumCount & "</font></td>" & vbNewline
end if 



If anyone validates this for other systems (i.e. other databases,
other Snitz versions, etc) please let me know and I'll add it above.

Al Bsharah
Aholics.com

Jeepaholics Anonymous
Broncoholics Anonymous
Network Insight

Edited by - Jeepaholic on 30 October 2002 01:38:52
  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.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07