Author |
Topic |
Podge
Support Moderator
Ireland
3775 Posts |
Posted - 16 September 2005 : 14:50:25
|
Just after thinking of something else. If a main forum is deleted do all forums and topics below it also get deleted? This would require a recursive query and users may delete forums which they did not wish to delete by accident.
Deleted subforums could be moved to a garbage forum instead. This would be a lot easier to do as;
At the moment a "main" forum has a parent of 0 (which can only be displayed on default.asp) A sub forum has a parent (the forum_id) and can only be displayed on forum.asp A garbage forum could have a forum_id of -1 and can only be displayed on default.asp.
To move deleted forums to it all that would be required would be to set the parent id of the topmost subforums to -1. All other subforums beneath them would automatically move there too.< |
Podge.
The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)
My Mods: CAPTCHA Mod | GateKeeper Mod Tutorial: Enable subscriptions on your board
Warning: The post above or below may contain nuts. |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 16 September 2005 : 14:55:43
|
Hmmmmm... hadn't thought about what would happen if I deleted the parent forum... [prepares to backup and test on the test forum]< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 16 September 2005 : 15:04:37
|
unh. New bug to fix....
Maybe on fourm deletion add a check - If it has children forums, re-set thier parent nuber to that of their parent, and give them the parent's category number too.
That way if you scale it to multiple sub-forums it would simply move them up a level. If they get moved up to the top level, they would inherit the parent's category.< |
|
|
sr_erick
Senior Member
USA
1318 Posts |
Posted - 16 September 2005 : 19:49:30
|
Hello all, I see work continues on this. I hadn't seen this topic was bumped until tonight. Unfortunately I don't have the time to dedicate to work on mods for this version of Snitz. I have emailed the partially completed mod to those who have requested it via email but since I see there is an effort going on here to complete such a mod, I will offer it for download.
http://www.snowmobilefanatics.com/downloads/subforums.zip
There is a crude set of instructions which should help you get installed what exists. Full functionality isn't yet completed. I basically got it working to a point that did what I personally needed for my site, and left it at that as time has always been short for me. Feel free to modify, change, or add any of the code. I know there are a few issues with it, but you guys are smart and should figure it out.
Podge, feel free to take whatever you want from it, or take nothing. It's up to you. I have limited it to one level of sub forum though. It's a lot easier to do the navigation this way.< |
Erick Snowmobile Fanatics
|
Edited by - sr_erick on 16 September 2005 19:49:58 |
|
|
Podge
Support Moderator
Ireland
3775 Posts |
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 17 September 2005 : 09:37:48
|
Hi.
i get this msg after implementing sr_ericks sub-forum mod... did everything as explained in the txt.
Microsoft OLE DB Provider for ODBC Drivers Fehler "80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.0.24_Debian-10]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE F_PARENT IS NULL ORDER BY F.F_ORDER ASC, F.F_SUBJECT ASC'
/forum/Default.asp, line 242 < |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
Podge
Support Moderator
Ireland
3775 Posts |
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 17 September 2005 : 10:52:20
|
this is what is writes down:
SELECT F.FORUM_ID, F.F_STATUS, F.CAT_ID, F.F_SUBJECT, F.F_URL, F.F_TOPICS, F.F_COUNT, F.F_LAST_POST, F.F_LAST_POST_TOPIC_ID, F.F_LAST_POST_REPLY_ID, F.F_TYPE, F.F_ORDER, F.F_A_COUNT, F.F_SUBSCRIPTION, F_PRIVATEFORUMS, F_PASSWORD_NEW, M.MEMBER_ID, M.M_NAME, T.T_REPLIES, T.T_UREPLIES, F.F_DESCRIPTION, F.F_PARENT FROM ((FORUM_FORUM F LEFT JOIN FORUM_MEMBERS M ON F.F_LAST_POST_AUTHOR = M.MEMBER_ID) LEFT JOIN FORUM_TOPICS T ON F.F_LAST_POST_TOPIC_ID = T.TOPIC_ID) WHERE F.CAT_ID = 0 OR F.CAT_ID = 11 OR F.CAT_ID = 8 OR F.CAT_ID = 10 OR F.CAT_ID = 9 WHERE F_PARENT IS NULL< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
AnonJr
Moderator
United States
5768 Posts |
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 17 September 2005 : 12:22:05
|
does not work either... i already added the row in the table, thx< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 17 September 2005 : 13:35:00
|
hmmm... got a link to a text version of default.asp?< |
|
|
ElPazzo
Junior Member
Austria
116 Posts |
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 17 September 2005 : 13:44:50
|
duh! Its right in front of me ... and I didn't have to open the txt file
You've got two "WHERE"'s in your SQL statement. I'll look at the file and see if I can figure out why.
(Definatly time to make a new pot of coffee!)< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 17 September 2005 : 13:58:37
|
Do you have the group categories enabled?
I've got the same code for that portion, but I don't have Group categories on... it looks like that is where the extra "Where" is comming from....
Stay tuned for a solution! < |
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 17 September 2005 : 14:19:21
|
yes group categories are on... i need because i have various languages in my forum< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
Topic |
|