Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 Selectable Categories
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mclek
New Member

Australia
50 Posts

Posted - 18 June 2001 :  00:40:58  Show Profile
Hi.

In some circumstances, I'd like to be able to display a single category and the forums within it. It would be identical to the default view, but would only display the selected category.

I'm sure I've seen this working in one of the members forums I have wondered through while trying to become familiar with Snitz. The forum allowed you to select a category title, which would then display just that category.

Can someone point me to it?

Thanks.

Planet-Ed
Starting Member

USA
9 Posts

Posted - 18 June 2001 :  01:46:32  Show Profile  Visit Planet-Ed's Homepage  Send Planet-Ed an ICQ Message
I was wondering the same thing ... On my website homepage I can have a link to things like Calendar/Events, Guestbook, Announcements, Classifieds and it displays them in their own page ... But in the forum I have one Category that is just links ... It would be nice to have a page that only shows that category of links... Then I could get rid og my links page because having my links in the category of the forum is much nicer and organized.
http://www.planet-ed.net/kwaj/
http://www.planet-ed.net/kwaj/kwajforum/



Edited by - Planet-Ed on 18 June 2001 01:47:41
Go to Top of Page

mclek
New Member

Australia
50 Posts

Posted - 03 July 2001 :  02:32:11  Show Profile
In case you are interested (or anyone else for that matter), the forum I was thinking of was at http://www.magicmushroom.org.uk/forum/default.asp. Click on a category and it shows only that category.

This was not quite what I wanted, as if you go into a topic within that category and then click the all forums link to go back up, it will show all of the categories again. This is not necessarily wrong, it's just not what I wanted.

So I modified my version to store the displayed category as a cookie, so if you go back to default.asp, it still shows only the required category. Passing a CAT_ID of -1 resets the view to display all categories.

If you're still interested, the changes I did to make this happen are:

Add the follwing towards the top of the code:
 
'################# Category filtering
intCat_ID = Request.QueryString("CAT_ID")
if intCat_ID = "" then
'check for cookie value
intCat_ID = Request.Cookies(strUniqueID & "CATID")
end if
if intCat_ID = "-1" then
'clear the cookie
Response.Cookies(strUniqueID & "CATID") = ""
intCat_ID = ""
else
'set the cookie
Response.Cookies(strUniqueID & "CATID") = intCat_ID
Response.Cookies(strUniqueID & "CATID").Expires = dateAdd("d", 30, strForumTimeAdjust)
End If
'################# End Category filtering


Change the following code:

strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_ID, " & strTablePrefix & "CATEGORY.CAT_STATUS, "
strSql = strSql & strTablePrefix & "CATEGORY.CAT_NAME "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
strSql = strSql & " ORDER BY " & strTablePrefix & "CATEGORY.CAT_NAME ASC;"

to:

strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_ID, " & strTablePrefix & "CATEGORY.CAT_STATUS, "
strSql = strSql & strTablePrefix & "CATEGORY.CAT_NAME "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
'################# End Category filtering
if intCat_ID <> "" then
strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & intCat_ID
end if
'################# End Category filtering
strSql = strSql & " ORDER BY " & strTablePrefix & "CATEGORY.CAT_NAME ASC;"


Now to have links to specific categories you just need to have a link to default.asp?CAT_ID=<cat number>, and for all categories default.asp?CAT_ID=-1.

Note that the site I referred to, allows you to click on the categories, as well as providing an icon to jump back to the "all-category" display. I didn't require this, but it would be easy enough to incorporate the 2 together.

Kym.

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 03 July 2001 :  02:37:20  Show Profile
You can see an example of this here: http://www.writermag.com/forum/default.asp?cat_view=list

The next release of this forum does have the clickable categories so that when you click on the category, it only shows that category and the forums within that category.
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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07