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)
 Total registered members
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

James
Average Member

USA
539 Posts

Posted - 17 April 2002 :  23:36:00  Show Profile  Visit James's Homepage
I posted the following in the w/o code forum in response to a request. I thought I had posted this here before but i think it was before the last batch of messages were lost. The following adds the total number of members to the statistics, along with linking the word "members" to the members pages.

Changes are in the file default.asp.

Note that I have several mods installed and the line numbers may be off by a bit.

Around line 615 change the line that reads:


Dim NewMember_Name, NewMember_Id, Member_Count


to read (changes in green):


Dim NewMember_Name, NewMember_Id, Member_Count
, Total_Members


Around line 646 there's code to Get the Active member count. Below this code I added code to Get the Total member count. Added code is in green:


'## Forum_SQL - Get Active membercount from DB
strSql = "SELECT COUNT(MEMBER_ID) AS U_COUNT FROM " & strMemberTablePrefix & "MEMBERS WHERE M_POSTS > 0 AND M_STATUS=1"

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

if not rs.EOF then
Member_Count = rs("U_COUNT")
else
Member_Count = 0
end if

rs.close
set rs = nothing

'## Forum_SQL - Get total membercount from DB - ADDED CODE BEGINS HERE
strSql = "SELECT " & strTablePrefix & "TOTALS.U_COUNT " &_
" FROM " & strTablePrefix & "TOTALS"

Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.open strSql, my_Conn

Total_Members = rs1("U_COUNT")


rs1.Close
set rs1 = nothing

'## END ADDED CODE for total membercount




Around line 828, I changed the lines that read :


Response.Write " <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) &_
""">" & vbNewline & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>There "
if intTopicCount = 1 then
Response.Write "is "
else
Response.Write "are "
end if
Response.Write " currently " & intTopicCount & " "
if intTopicCount = 1 then
Response.Write " topic "
else
Response.Write " topics"
end if
if ActiveTopicCount > 0 then
Response.Write " and " & ActiveTopicCount & " <a href=""active.asp"">active "
if ActiveTopicCount = 1 then
Response.Write "topic"
else
Response.Write "topics"
end if
Response.Write "</a> since you last visited."
elseif blnHiddenForums and (strLastPostDate > Session(strCookieURL & "last_here_date")) and ShowLastHere then
Response.Write " and there are <a href=""active.asp"">active topics</a> since you last visited."
elseif not(ShowLastHere) then
Response.Write "."
else
Response.Write " and no active topics since you last visited."
end if


to read:


Response.Write " <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) &_
""">" & vbNewline & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>There "
if Total_Members = 1 then
Response.Write "is "
else
Response.Write "are "
end if
Response.Write " currently " & Total_Members & " total <a href=""members.asp"">members</a> and " & intTopicCount & " "
if intTopicCount = 1 then
Response.Write " topic "
else
Response.Write " topics"
end if
if ActiveTopicCount > 0 then
Response.Write " with " & ActiveTopicCount & " <a href=""active.asp"">active "
if ActiveTopicCount = 1 then
Response.Write "topic"
else
Response.Write "topics"
end if
Response.Write "</a> since you last visited."
elseif blnHiddenForums and (strLastPostDate > Session(strCookieURL & "last_here_date")) and ShowLastHere then
Response.Write " and there are <a href=""active.asp"">active topics</a> since you last visited."
elseif not(ShowLastHere) then
Response.Write "."
else
Response.Write " and no active topics since you last visited."
end if


I think that a mod-free forum will probably be about line 790 instead of 828 for the above. The changes keep the line that shows the number of members that have posted while adding a total member count and adding a link to the members pages.

-
*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*

James
Average Member

USA
539 Posts

Posted - 18 April 2002 :  19:55:58  Show Profile  Visit James's Homepage
Here's a pic of what this does.



It modifies the third line adding the Total Members count and makes the word members a link to the members pages.

-
*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page

Tmpj
Junior Member

Denmark
467 Posts

Posted - 19 April 2002 :  05:58:44  Show Profile
Cool, this one seems useful!


------------------------------
Magic is an Orange
http://www.nintendo4you.dk/tmpj/
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.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07