Author |
Topic |
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 12 December 2003 : 16:32:45
|
"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
|
There are 249573 archived posts in 38122 archived topics
two lines below |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
MasterOfTheCats
Junior Member
103 Posts |
Posted - 12 December 2003 : 16:46:56
|
Only if you are an admin perhaps? |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 12 December 2003 : 16:54:06
|
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 |
|
|
MasterOfTheCats
Junior Member
103 Posts |
Posted - 12 December 2003 : 16:59:01
|
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...
|
|
|
MasterOfTheCats
Junior Member
103 Posts |
Posted - 12 December 2003 : 17:01:51
|
Hmm. I'm late :)
I cannot think of a low cost method for this case... |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 12 December 2003 : 17:04:05
|
didn't realise only admins could see it |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 12 December 2003 : 17:48:57
|
Either way, my curiosity is satisfied. We have somewhere around 300,000 posts. |
Nathan Bales CoreBoard | Active Users Download |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 12 December 2003 : 18:14:08
|
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. |
|
|
Jeepaholic
Average Member
USA
697 Posts |
|
|
Topic |
|