Author |
Topic |
Bassman
Junior Member
Netherlands
256 Posts |
Posted - 27 February 2006 : 13:11:14
|
AnonJr, that cInt to cLng works fine Thanks< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 27 February 2006 : 13:17:49
|
Good. I've sent myself an e-mail so I'll remember to update the files over at SnitzBitz.< |
|
|
Karel Bata
Junior Member
United Kingdom
122 Posts |
Posted - 27 February 2006 : 18:04:40
|
Sorry for just leaping in here without reading everything that's so far been written about this subject, but I've got a simple question / suggestion:
Will it be possible to make individual forum members moderators of their own sub-forum? Without being able to 'intefere' with anybody else's sub-forum?
Very cool mod BTW it really opens up the possibilities.< |
Edited by - Karel Bata on 27 February 2006 18:05:49 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 27 February 2006 : 18:42:18
|
To be honest, I haven't really played with moderators and individual sub-forums... I would imagine that since the sub-forums are treated like regular forums in every respect but listing, that you would be able to make individuals the moderators for individual sub-forums.
Thanks for the kudos, but I can't take full credit. I took the original code put together by sr_erick and cleaned it up a bit and added a few fixes.< |
|
|
Jezmeister
Senior Member
United Kingdom
1141 Posts |
Posted - 27 February 2006 : 18:50:42
|
I don't know if anyones done it yet but I'll try and get it working on MySql in the next few days when I have time and let you know how it goes.< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 27 February 2006 : 19:43:42
|
Updated the download over at SnitzBitz.
Jezmeister, please let me know how things turn out with the MySQL test. I don't have a way to readily test it since I sold my testing server...< |
|
|
Jezmeister
Senior Member
United Kingdom
1141 Posts |
Posted - 27 February 2006 : 20:18:26
|
Ok most problems were in post.asp and I've taken the liberty of also replacing all FORUM_'s with " & strTablePrefix & " - it gave me numerous issues because i was using the same database as another of my forums that was using the prefix FORUM_... anyway heres the fixes you need to make - all tested - I've highlighted my changes for all intents and purposes
Post.asp Replace the original code with this:
if strRqMethod = "Forum" or _
strRqMethod = "URL" or _
strRqMethod = "EditURL" or _
strRqMethod = "EditForum" then
Response.Write "<tr>" & vbNewLine & _
"<td bgColor=""" & strPopupTableColor & """ nowrap valign=""top"" align=""right"">" & _
"<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & _
"<b>Parent Location:</b></font></td>" & vbNewLine & _
"<td bgColor=""" & strPopupTableColor & """>" & vbNewLine
'Forum Parent!
'Find out if this forum is a sub-forum!
If strRqForumID = "" Then strRqForumID = 0
'---Beginning of change for MySql compatibility
if strDBType = "mysql" then
strSQL = "SELECT F_PARENT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & strRqForumID
strSQL = strSQL & " LIMIT 1 "
set rsFindSub = my_Conn.Execute(strSQL)
if rsFindSub.eof then
strSubForum = NULL
else
strSubForum = rsFindSub("F_PARENT")
end if
set rsFindSub = Nothing
elseif strDBType <> "mysql" then
strSQL = "SELECT TOP 1 F_PARENT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & strRqForumID
set rsFindSub = my_Conn.Execute(strSQL)
if rsFindSub.eof then
strSubForum = NULL
else
strSubForum = rsFindSub("F_PARENT")
end if
set rsFindSub = Nothing
End If
'---End of change for MySql compatibility
'Print out the select with the properly selected parent (Category or Forum)
strsParentQL = "SELECT * FROM " & strTablePrefix & "CATEGORY ORDER BY CAT_ORDER, CAT_NAME ASC"
set rsParent = my_Conn.Execute(strsParentQL)
if not rsParent.eof then
Response.Write "<select name=""Parent"" class=""ForumTextBoxDropDown"" size=""1"">" & vbNewLine
do until rsParent.eof
Response.Write "<option "
if isnull(strSubForum) = TRUE then
if strRqCatID = rsParent("CAT_ID") then
Response.Write "selected "
end if
end if
Response.Write "value=""C" & rsParent("CAT_ID") & """>" & rsParent("CAT_NAME") & "</option>" & vbNewLine
strsParentQL2 = "SELECT * FROM " & strTablePrefix & "FORUM " & _
"WHERE CAT_ID = " & rsParent("CAT_ID") & " " & _
"AND F_PARENT IS NULL " & _
"AND FORUM_ID <> " & strRqForumID & " " & _
"ORDER BY F_ORDER, F_SUBJECT"
set rsParent2 = my_Conn.Execute(strsParentQL2)
if not rsParent2.eof then
do until rsParent2.eof
Response.Write "<option "
if strSubForum = rsParent2("FORUM_ID") then
Response.Write "selected "
end if
Response.Write "value=""F" & rsParent2("FORUM_ID") & """>- - - " & rsParent2("F_SUBJECT") & "</option>" & vbNewLine
rsParent2.movenext
loop
end if
rsParent.movenext
loop
Response.Write "</select>" & vbNewLine
end if
set rsParent = Nothing
set rsParent2 = Nothing
Response.Write "<a href=""Javascript:openWindow3('pop_help.asp?mode=options#category')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "</a></td>" & vbNewLine & _
"</tr>" & vbNewLine
end if
Also a non-MySql change: forum.asp Line 369, replace:
strSQL = "SELECT FORUM_ID, F_SUBJECT FROM FORUM_FORUM WHERE FORUM_ID = " & Forum_Parent With:
strSQL = "SELECT FORUM_ID, F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Forum_Parent
And thats fixed it for mysql and anyone using a non FORUM_ prefix < |
Edited by - Jezmeister on 27 February 2006 20:28:33 |
|
|
Gizmo3
Junior Member
130 Posts |
Posted - 28 February 2006 : 01:06:23
|
I installed this mod and it worked great. Hope everyone has the same luck i did < |
This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums! |
|
|
Karel Bata
Junior Member
United Kingdom
122 Posts |
Posted - 28 February 2006 : 04:30:16
|
Any chance of seeing a demo?
< |
|
Edited by - Karel Bata on 28 February 2006 05:11:28 |
|
|
Bassman
Junior Member
Netherlands
256 Posts |
Posted - 28 February 2006 : 04:39:51
|
Here is my forum incl this mod:
http://wj.scoutingforum.nl/< |
Edited by - Bassman on 09 December 2007 10:11:34 |
|
|
Karel Bata
Junior Member
United Kingdom
122 Posts |
Posted - 28 February 2006 : 06:13:36
|
Ah... Thanks.
That's not what I expected to see at all. To be honest I was a bit confused at first. I expected a tree-like structure with what are now individual posts being replaced by threads with their own posts. This mod is more like a branch going off to one side.
Is it possible to switch the regular forum off (and have it not display at all) and to leave only the sub-forums on? That could reduce the clutter. Your page here http://2007.scoutingforum.nl/forum.asp?forum_id=69 would benefit from that. My suggestion would switch the empty forum at the bottom off.
It would be nice to be able to re-name 'sub-forum' too.
< |
Edited by - Karel Bata on 28 February 2006 06:15:16 |
|
|
Bassman
Junior Member
Netherlands
256 Posts |
Posted - 28 February 2006 : 07:30:34
|
A switch off for this emty forum (*link offline) is indeed a good idea.
quote: It would be nice to be able to re-name 'sub-forum' too.
In what for example?< |
Edited by - Bassman on 06 April 2006 12:02:04 |
|
|
Karel Bata
Junior Member
United Kingdom
122 Posts |
Posted - 28 February 2006 : 08:18:03
|
For instance, I want to create a forum where UK filmakers can post their trailer or short (see the "Using video/flash in topics?" thread here) and also have a (sub)forum to go with it, rather than just the one thread. In that case it would be better if on the level above it said 'films' rather than 'sub-forums' and a list of films would then be underneath which would link to the subforums. Maybe it's easier if I post a pic: Clicking on a film's title would lead to a sub-forum about that film. It would be ideal if I could make each filmaker a moderator of their own forum (hell, I don't want to spend my time deleting malicious posts that say "your film is crap!" ) < |
|
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 28 February 2006 : 10:37:11
|
Jezmeister, thanks for the MySQL stuff. I'll get that up tonight or tomorrow.
I'd noticed the 'FORUM_' bit the first time through and it looks like I missed a few. Thanks for the heads up.
quote: It would be nice to be able to re-name 'sub-forum' too.
I hadn't thought of putting the parent's title in there... I'll look into that.
And I'll look into adding the switch to show the empty list if the parent itself doesn't have any topics. Not sure how well that will play out...
A little higher up on the list is the fact that it isn't always obvious when new topics have been posted by looking at the front page... if you live on the Active Topics page its not an issue. But I've heard from some of the people over at Warsong Records (which I've been using as a guinea pig for this) that some topics weren't replied to because he didn't know they existed.
Also I've still got to work out the problem with deleting a parent forum noted early in the first page.
Let me see what I can come up with between now and the LAN party this weekend.< |
|
|
Karel Bata
Junior Member
United Kingdom
122 Posts |
Posted - 28 February 2006 : 11:08:04
|
Nice forum at Warsong. < |
|
|
Topic |
|