Sub-Forums Mod - Posted (18681 Views)
Senior Member
sr_erick
Posts: 1318
1318
Ok, I think this has been discussed in the past, but I'm not sure where it went, or what ever happened to the idea. Basically the way this forum works (to my understanding) you have a tree structure like the following:

Discussion Area
-Categories
--Forums
---Topics
----Posts

My proposed Idea is to do something similar to what vBulletin does with thier Sub-Forum idea. Basically a sub-forum inside a forum, and then you can have more sub-forums inside of sub-forums, however deep you want. I have come really need something like this on my website, and have been thinking about it for quite some time.
The result would be something like the following:

Discussion Area
- Category
-- Forum
--- Topic
---- Post --- SubForum
---- Topic
------ Post
---- SubForum
----- Topic
------- Post

Notice how SubForum sits inside of Forum and the green tree(another subforum) sits inside the first SubForum which is in the Forum. I'm not sure if anyone has a mod already, or whats going on, but if not I'm going to start working on/organizing such a mod because I think it would be most helpfull for me, and many others.
Basically all I think a person would need to do is create another column in the FORUM_FORUMS table (I think that's the one) which would specify a parent forum (Its ID). All forums falling directly under the main categories would have no value, so they would be "root" forums. Let me know what you think. <
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Member Locked
laser
Posts: 3859
3859
Basically all I think a person would need to do is create another column in the FORUM_FORUMS table (I think that's the one) which would specify a parent forum (Its ID). All forums falling directly under the main categories would have no value, so they would be "root" forums.
That's exactly the way I was thinking of it while reading your thread. Same as you, I've seen a lot of requests, but no solutions.
I don't need it on my site (that I can think of wink) but I'm happy to test it for you.<
Posted
Junior Member
altisdesign
Posts: 357
357
Sounds good. You would probably have to modify various functions with regard to deleting forums, so if you delete the forum containing a sub forum what happens etc. But its only minor details. As far as I know invisionboard only allows one level of subforum.. I can see that being a useful add on for Snitz. Personally I would never use more than one level of subforum, and it would be more complicated to code, but if you think it would be useful to have sub-sub forums it would be a great additional feature for the mod smile.<
Altis Design offers all manner of web design services to a variety of commercial and personal clients
Posted
Senior Member
Jezmeister
Posts: 1141
1141
ive never seen one either, i wouldnt mind testing it either - it could be a useful addition to 123 Chat forums...<
Posted
Senior Member
sr_erick
Posts: 1318
1318
I'll probably get started on it this weekend, if I have time.<
Posted
Dev. Team Member & Support Moderator
OneWayMule
Posts: 4969
4969
Although I'm, familiar with sub-forums from VB, and to be honest they cause more confusion instead if naking it all more organized; take a look at this forum Looking forward to your work. I hope you'll make it available. smile<
Posted
Snitz Forums Admin
RichardKinser
Posts: 16655
16655
Kal Corp made something similar awhile back, not sure if it's still available though (it was for an older version):

http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=1276<
Posted
Senior Member
sr_erick
Posts: 1318
1318
OneWayMule, that's an insane amount of subforums. I'd only use it for 1 or two, to try keep my default page smaller.<
Posted
Senior Member
PeeWee.Inc
Posts: 1893
1893
You can look at goand.net and how it's done there.
This is not a snitz forum, but it was once and worked the same way when it was smile<
De Priofundus Calmo Ad Te Damine
Posted
Senior Member
sr_erick
Posts: 1318
1318
Should I restrict it to one Sub level or make it virtually unlimited?<
Posted
Senior Member
sr_erick
Posts: 1318
1318
I decided to go unlimited levels, just for future expansion....unless others are against it. I have an issue though...
To get the correct navigation for a subforum in a subforum, I got the looping to work, but it does it backwards, and either it's too late for me to think, but I can't figure out how to get it to go the other way around. Here's what I have.
Code:

strSql = "SELECT PARENT_ID, F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Forum_ID & ";"
set rsSForum = my_Conn.Execute (StrSql)

if rsSForum.eof or rsSForum.bof then
'#Do Nothing
else
strTempParentPath = rsSForum("PARENT_ID")
do until strTempParentPath = 0

strSql = "SELECT PARENT_ID, F_SUBJECT FROM " & strTablePrefix & "FORUM"
strSQL = strSQL & " WHERE FORUM_ID = " & strTempParentPath & ";"
set rsSForum2 = my_Conn.Execute (StrSql)


if Cat_Status <> 0 then
Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")
else
Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""")
end if

Response.Write " <a href=""forum.asp?FORUM_ID=" & rsSForum("PARENT_ID") & """>"
Response.Write rsSForum2("F_SUBJECT") & "</a><br />"
Response.Write getCurrentIcon(strIconBlank,"","align=""absmiddle""")
Response.Write getCurrentIcon(strIconBar,"","align=""absmiddle""")

strTempParentPath = rsSForum2("PARENT_ID")
loopcount = loopcount + 1
loop

rsSForum.Close
set rsSForum = Nothing
end if

If this can't easily be solved I'll just forget the multi-level subforum in subforum, etc..
BTW, here is a link to what I have so far. http://www.dbfanatics.com/newforum/default.asp Go into the shop area.<
You Must enter a message