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 DEV-Group
 DEV Discussions (General)
 Archives not being counted?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Nathan
Help Moderator

USA
7664 Posts

Posted - 12 December 2003 :  16:32:45  Show Profile  Visit Nathan's Homepage
"13581 of 21406 Members have made 44102 posts in 45 forums, with the last post on 12 December 2003 16:18:16 by: hellind."

This is somewhat incorrect because the 44102 is only the number of posts in the non archived forums. Wouldn't it be easy enough to keep the number of archived posts on the FORUM_TOTALS table?

Nathan Bales
CoreBoard | Active Users Download

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 12 December 2003 :  16:38:06  Show Profile  Visit HuwR's Homepage
There are 249573 archived posts in 38122 archived topics


two lines below
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 12 December 2003 :  16:41:25  Show Profile
two lines below what?

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

MasterOfTheCats
Junior Member

103 Posts

Posted - 12 December 2003 :  16:46:56  Show Profile
Only if you are an admin perhaps?
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 12 December 2003 :  16:54:06  Show Profile
or if there are not any forums hidden from you. here's the code that grabs the archived post count:
	ArchivedPostCount = 0
	ArchivedTopicCount = 0
	if not blnHiddenForums and strArchiveState = "1" then
		'## Forum_SQL
		strSql = "SELECT P_A_COUNT, T_A_COUNT FROM " & strTablePrefix & "TOTALS"

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

		if not rs.EOF then
			ArchivedPostCount = rs("P_A_COUNT")
			ArchivedTopicCount = rs("T_A_COUNT")
		else
			ArchivedPostCount = 0
			ArchivedTopicCount = 0
		end if

		rs.Close
		set rs = nothing
	end if

and here's the code that displays it:
	if ArchivedPostCount > 0 and strArchiveState = "1" then 
		Response.Write	"              <tr>" & vbNewline & _
				"                <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) &_
				"""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & _
				"There "
		if ArchivedPostCount = 1 then
			Response.Write	"is "
		else
			Response.Write	"are "
		end if
		Response.Write	ArchivedPostCount & " "
		if ArchivedPostCount = 1 then
			Response.Write	" archived post "
		else
			Response.Write	" archived posts"
		end if
		if ArchivedTopicCount > 0 then
			Response.Write	" in " & ArchivedTopicCount 
			if ArchivedTopicCount = 1 then
				Response.Write	" archived topic"
			else
				Response.Write	" archived topics"
			end if
		end if
		Response.Write	"</font></td>" & vbNewline & _
				"              </tr>" & vbNewline
	end if

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~

Edited by - Nikkol on 12 December 2003 16:55:05
Go to Top of Page

MasterOfTheCats
Junior Member

103 Posts

Posted - 12 December 2003 :  16:59:01  Show Profile
From default.asp, sub WriteStatistics:
[code]
...
ArchivedPostCount = 0
ArchivedTopicCount = 0
if not blnHiddenForums and strArchiveState = "1" then
'## Forum_SQL
strSql = "SELECT P_A_COUNT, T_A_COUNT FROM " & strTablePrefix & "TOTALS"
....
[code]
If there are hidden forums and the person who vists default.asp is not eligible to see them, then the display is omitted. Otherwise the normal user would see ghost postings. It is a costly process to count/re-check them per visit. I think thats the reason...
Go to Top of Page

MasterOfTheCats
Junior Member

103 Posts

Posted - 12 December 2003 :  17:01:51  Show Profile
Hmm. I'm late :)

I cannot think of a low cost method for this case...
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 12 December 2003 :  17:04:05  Show Profile  Visit HuwR's Homepage
didn't realise only admins could see it
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 12 December 2003 :  17:48:57  Show Profile  Visit Nathan's Homepage
Either way, my curiosity is satisfied. We have somewhere around 300,000 posts.

Nathan Bales
CoreBoard | Active Users Download
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 12 December 2003 :  18:14:08  Show Profile  Visit HuwR's Homepage
not sure why we do that though, can't see any harm in it being displayed to everyone, the active topic count I understand, as people get confused if it says there are active topics but can't see where they are.
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 13 December 2003 :  16:09:46  Show Profile  Visit Jeepaholic's Homepage
I changed my forum a while back as well... I can probably dig up that code if anyone needs it, I don't recall it being very difficult though.

Also, in the forum listings, I changed each forum to display the total number of topics (including archived ones) with the actual non-archived posts in parenthesis below. Posted a mod here a while back:
http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=37725

You can see it all here:
http://www.jeepaholics.com/citizensband/forum

Let me know if anyone needs anything...

Al Bsharah
Aholics.com

Jeepaholics Anonymous
Broncoholics Anonymous
Network Insight
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.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07