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)
 A good idea..
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MegaMan300
Starting Member

19 Posts

Posted - 14 December 2000 :  14:51:32  Show Profile
You should be abel to have a catorgory only view and be abel to view one catagory at a time...

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 14 December 2000 :  15:23:24  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
See this

<font color=red>Da_Stimulator</font id=red>
<font color=red>http://www.cfm-resources.com/s/stimmy/</font id=red>
<font color=blue>response.write("I know what you coded last summer!")</font id=blue>
http://www.tek-tips.com - The community where computer proffesionals meet and talk.
Go to Top of Page

MegaMan300
Starting Member

19 Posts

Posted - 14 December 2000 :  15:48:46  Show Profile
his demo isint working... :-(

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 14 December 2000 :  16:28:17  Show Profile
Here is a demo of it:

http://www1.domaindlx.com/dssdbs/testforum/

or here:

http://richard.cfm-resources.com

just click on the - sign to minimize the category and then the + to maximize it again.
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 14 December 2000 :  20:35:16  Show Profile
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
You should be abel to have a catorgory only view and be abel to view one catagory at a time...
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

I needed the same type of thing for the site we are working on.

We wanted to have some categories represent sections of the website and have the ability to link directly to that category and display the forums for that specific category.

I've seen this similiar function on some other forums. So I took my best shot at doing the same thing.

The forum is still under construction... so some things <u>will</u> look funny. I've been working on using CSS, converting some things to stored procs when I can (don't have much time), and I have to work on a compromise between a fully moderated - screening every post <img src=icon_smile_sad.gif border=0 align=middle> and the current setup <img src=icon_smile.gif border=0 align=middle>. One of the compromises will be email validation. I haven't seen a full mod out yet, so maybe this can be my first contribution back to Snitz!!

Stop by and take a look. It's nothing fancy and it's NOT fully assembled yet. I just wanted to demonstrate another alternative to categories.

This is the Forum Home:
http://www.writermag.com/wrt/devforum/

This is a category view:
http://www.writermag.com/wrt/devforum/category.asp?cat_id=3

Go to Top of Page

MegaMan300
Starting Member

19 Posts

Posted - 14 December 2000 :  21:39:38  Show Profile
this is nice

Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 14 December 2000 :  22:37:47  Show Profile
Thanks. <img src=icon_smile.gif border=0 align=middle>

Is this close to what you were thinking?

Go to Top of Page

Maxwell
Starting Member

USA
42 Posts

Posted - 15 December 2000 :  04:59:39  Show Profile  Visit Maxwell's Homepage
Nice mod. One note about going to a topics page such as:

http://www.writermag.com/wrt/devforum/forum.asp?FORUM_ID=4&CAT_ID=1

is the tree at the top is not complete.

Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 15 December 2000 :  05:23:19  Show Profile
I have it working on the actual topic page but I have yet to back track to fix the previous page. One thing I'm attempting to do is eliminate the titles for the forums and topics out of the query string. I found that on the topic.asp page it's not really necessary to pass that information since there are three sql calls against the database. One for the topic, one for the forum, and one for the category. Since the database is already being hit, why not retrieve the titles from there?

Try it:
http://www.writermag.com/wrt/devforum/topic.asp?TOPIC_ID=5&FORUM_ID=4&CAT_ID=1

Actually, I attempted another modification behind the scenes. <img src=icon_smile.gif border=0 align=middle>

Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 15 December 2000 :  05:28:51  Show Profile
Okay...currently on topic.asp, here's lines 88 through 111

<pre id=code><font face=courier size=2 id=code>
'## Forum_SQL - Find out if the Category is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Request.QueryString("CAT_ID")

set rsCStatus = my_Conn.Execute (StrSql)

'## Forum_SQL - Find out if the Forum is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "FORUM.F_STATUS "
strSql = strSql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Request.QueryString("FORUM_ID")

set rsFStatus = my_Conn.Execute (StrSql)

'## Forum_SQL - Find out if the Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "TOPICS.T_STATUS "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID")

set rsTStatus = my_Conn.Execute (StrSql)

if rsCStatus.EOF or rsCStatus.BOF or rsFStatus.EOF or rsFStatus.BOF or rsTStatus.EOF or rsTStatus.BOF then
Response.Redirect(strForumURL)
else
........
</font id=code></pre id=code>

The three recordsets are created and stay open until about line 220 where the sub Topic_nav is called. A couple additional lines are executed and then the recordsets are closed and set to nothing.

Line 109 is important...

Hopefully my modification is doing the same thing

[continued in next post]


Edited by - work mule on 15 December 2000 05:31:07
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 15 December 2000 :  05:38:40  Show Profile
So here's my modification:

<pre id=code><font face=courier size=2 id=code>
' ## Build Command Object for Topic Status Information
Set objCmd = Server.CreateObject("ADODB.Command")
objCmd.ActiveConnection = my_Conn
objCmd.CommandText = "up_getStatus_Topic"
objCmd.CommandType = adCmdStoredProc
objCmd.Parameters.Append objCmd.CreateParameter("@TOPICID",adInteger,adParamInput,,intTOPIC_ID)

Set objRS_Status = objCmd.Execute

If objRS_Status.EOF or objRS_Status.BOF Then
Response.Redirect(strForumURL)
else
strdisplay_CAT_TITLE = objRS_Status.Fields("CAT_NAME").Value
strdisplay_FORUM_TITLE = objRS_Status.Fields("F_SUBJECT").Value
strdisplay_TOPIC_TITLE = objRS_Status.Fields("T_SUBJECT").Value
intCAT_STATUS = objRS_Status.Fields("CAT_STATUS").Value
intFORUM_STATUS = objRS_Status.Fields("F_STATUS").Value
intTOPIC_STATUS = objRS_Status.Fields("T_STATUS").Value
end if

objRS_Status.Close
Set objRS_Status = Nothing
Set objCmd = Nothing
</font id=code></pre id=code>

I consolidated the three recordsets into one, well in this case a command object because I'm using a stored procedure. I retrieve the recordset, set the six values I'll need later to variables and then dispose of the object. Anyplace that made reference to the old recordset was replaced with the variable.

The following is the stored procedure which has the SQL statement.

<pre id=code><font face=courier size=2 id=code>
SQL - Stored Proc - up_getStatus_Topic:

CREATE PROCEDURE up_getStatus_Topic
(@TOPICID as int)
AS

SELECT FORUM_TOPICS.T_SUBJECT, FORUM_TOPICS.T_STATUS,
FORUM_TOPICS.TOPIC_ID, FORUM_FORUM.F_STATUS,
FORUM_FORUM.F_SUBJECT,
FORUM_CATEGORY.CAT_STATUS,
FORUM_CATEGORY.CAT_NAME
FROM FORUM_TOPICS INNER JOIN
FORUM_FORUM ON
FORUM_TOPICS.CAT_ID = FORUM_FORUM.CAT_ID AND
FORUM_TOPICS.FORUM_ID = FORUM_FORUM.FORUM_ID INNER
JOIN
FORUM_CATEGORY ON
FORUM_TOPICS.CAT_ID = FORUM_CATEGORY.CAT_ID
WHERE (FORUM_TOPICS.TOPIC_ID = @TOPICID)
</font id=code></pre id=code>



<b><u>*** Please note ***</u></b>
Seeing as this portion regarding the topic.asp was off topic, I reposted this under the following:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=2864
Please post any comments regarding the sql code modification under that topic.

Edited by - work mule on 15 December 2000 15:34:11
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 15 December 2000 :  05:43:53  Show Profile
Another modification that I made was to the topics page.

I allowed for people to make their own subject line if so desired. I figured this would be a nice feature and if the forum ever became threaded (I'm aware of the mod that exists) my forum would be ready for it! <img src=icon_smile.gif border=0 align=middle>

An example:
http://www.writermag.com/wrt/devforum/topic.asp?TOPIC_ID=7&FORUM_ID=6&CAT_ID=3

Well that's all the cool stuff so far...I have a lot of work remaining!

Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 15 December 2000 :  11:02:06  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
wow... I guess you chose an appropriate name for the forums :) Work mule.

<font color=red>Da_Stimulator</font id=red>
<font color=red>http://www.cfm-resources.com/s/stimmy/</font id=red>
<font color=blue>response.write("I know what you coded last summer!")</font id=blue>
http://www.tek-tips.com - The community where computer proffesionals meet and talk.
Go to Top of Page

Maxwell
Starting Member

USA
42 Posts

Posted - 17 December 2000 :  10:28:55  Show Profile  Visit Maxwell's Homepage
work mule <img src=icon_smile_question.gif border=0 align=middle>,

I sent an email about the code for the Writer Forum <img src=icon_smile_approve.gif border=0 align=middle> since I am looking to be able to display only one category at a time like you have there.

I was wondering if you got the email or if you just haven't had time to respond yet.

Not rushing you, mind you <img src=icon_smile.gif border=0 align=middle>. Just curious as to whether you received the email.



Edited by - maxwell on 17 December 2000 10:29:49
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 18 December 2000 :  03:44:27  Show Profile
I downloaded the files for SR3, released Sunday evening, and made the modifications.

I posted the information here:
http://forum.snitz.com/forum/link.asp?TOPIC_ID=2949

<img src=icon_smile.gif border=0 align=middle>

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