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)
 Active Topic Count
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 18 February 2001 :  23:40:24  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I AM NOT claiming this, this is AznKnights script, I just switched a thing or two around so it'd work with the normal layout.

Add the below to the VERY BOTTOM of inc_top.asp

<%
Sub ATCount()
'### Added by Da_Stimulator
'## Forum_SQL - Get ActiveTopicCount from DB
strSql = "SELECT COUNT(" & strTablePrefix & "TOPICS.T_LAST_POST) AS NUM_ACTIVE"
strSql = strSql & " FROM " & strTablePrefix & "TOPICS inner join " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " ON " & strTablePrefix & "TOPICS.T_LAST_POST > " & strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS." & Strdbntsqlname & " = '" & strDBNTUserName & "' "
dim rsActive
set rsActive = server.CreateObject("adodb.recordset")

set rsActive = my_Conn.Execute(strSql)

if not rsActive.EOF then
ActiveTopicCount = rsActive("NUM_ACTIVE")
else
ActiveTopicCount = 0
end if
Response.Write "(" & ActiveTopicCount & ")"
rsActive.Close
set rsActive = nothing
'### End added
End Sub
%>


Then all you do is add a little '<%Call ATCount()%>' where you want the number of active topics to appear... Mine looks like the below


|
<a href="active.asp"><acronym title="See what topics have been active since your last visit...">Active Topics<%Call ATCount()%></acronym></a>
|


You can view mine at http://www.stormwhispers.com/snitz_testing/

Again this is Aznknights code.


----
Da_Stimulator
Snitz Forums Dev Team Member
http://stimmy.cfm-resources.com/forum - my testing forums.

Aznknight
Senior Member

USA
1373 Posts

Posted - 11 May 2001 :  13:39:29  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
anyone using this?

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 11 May 2001 :  17:35:45  Show Profile  Visit rick7165's Homepage
Yep... It's on my Test Site




Test Site
www.eastpasco.com
HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser.
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.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07