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)
 MOD: Active Topics by category/forum
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 13 November 2004 :  14:02:16  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Description: Allows you to browse active topics by category/forum from active.asp.

Implementation:

Step 1
Open active.asp in your text editor. At line 34 is the end of the snitz copyright, right below that, insert the following code (green highlight indicates code to add)


'#################################################################################
'#### Added by stimmy for active forum
Dim UseActiveForum, UseActiveCat, intForumID, intCatID
UseActiveForum = False
UseActiveCat = False
If isNumeric(Request.QueryString("FORUM_ID") Then
	intForumID = CLng(Request.QueryString("FORUM_ID")
	If intForumID > 0 Then
		UseActiveForum = True
	End If
End If
If isNumeric(Request.QueryString("CAT_ID") Then
	intCatID = CLng(Request.QueryString("CAT_ID")
	If intCatID > 0 Then
		UseActiveCat = True
	End If
End If
%>
<!--#INCLUDE FILE="config.asp"-->


Step 2
Scroll down to about line 307 in active.asp, and add the code below (green highlight indicates added code)


		strSql = strSql & ")"
	end if
end if
'##### Added by stimmy for active forum
if UseActiveCat then
  strsql = strsql & " AND F.CAT_ID=" & intCatID
end if
if UseActiveForum then
  strsql = strsql & " AND F.FORUM_ID=" & intForumID
end if
strSql = strSql & ") "
strSql = strSql & " ORDER BY C.CAT_ORDER, C.CAT_NAME, F.F_ORDER, F.F_SUBJECT, T.T_LAST_POST DESC "


Step 3
Scroll down to about line 500, and replace default.asp with active.asp (code highlighted in green)


.....<a href=""active.asp?CAT_ID=" & Cat_ID & """><fo.....

......bsp;/ <a href=""active.asp?FORUM_ID=" & Forum_ID & """><font ......

-Stim

Edited by - Da_Stimulator on 13 November 2004 15:05:50

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 13 November 2004 :  14:40:56  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
I recommend checking the querystring variables before using it in SQL strings.
Here's how I'd do it:

Change Step 1 to:
Dim UseActiveForum, UseActiveCat, intForumID, intCatID
UseActiveForum = False
UseActiveCat = False
If isNumeric(Request.QueryString("FORUM_ID") Then
	intForumID = CLng(Request.QueryString("FORUM_ID")
	If intForumID > 0 Then
		UseActiveForum = True
	End If
End If
If isNumeric(Request.QueryString("CAT_ID") Then
	intCatID = CLng(Request.QueryString("CAT_ID")
	If intCatID > 0 Then
		UseActiveCat = True
	End If
End If
%>
<!--#INCLUDE FILE="config.asp"-->

And change step 2 to:
		strSql = strSql & ")"
	end if
end if
'##### Added by stimmy for active forum
if UseActiveCat then
  strsql = strsql & " AND F.CAT_ID=" & intCatID
end if
if UseActiveForum then
  strsql = strsql & " AND F.FORUM_ID=" & intForumID
end if
strSql = strSql & ") "
strSql = strSql & " ORDER BY C.CAT_ORDER, C.CAT_NAME, F.F_ORDER, F.F_SUBJECT, T.T_LAST_POST DESC "

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 13 November 2004 :  14:47:39  Show Profile  Visit PeeWee.Inc's Homepage
seems like the sorta thing i'd find really pointless unless you have 100's of forums and Cats, and if not, i'd take out of the code.

But hey, thats just me. Hope people like it, and good work

De Priofundus Calmo Ad Te Damine
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 13 November 2004 :  15:06:13  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
implemented your changes mule, thx for the input

-Stim
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.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07