Author |
Topic  |
|
pcguy
Starting Member
42 Posts |
Posted - 14 November 2001 : 15:29:22
|
It seems my Forum has a strange bug. I would think its a bug and not "by design"...
I have every subscription type enabled, board, cat, forum, topic...
When logged on as Admin, or a normal user, the subscription icons appear as they should (in the cat headers, and the forum columns)
But if a moderator logs on, they only appear in the forum columns, and NOT in the cat header....
why is this?
The "Subscribe to Board" is there for everyone as it should be. Only the Cat icons are missing for moderators.
Changed subject title...
Edited by - Davio on 15 November 2001 05:37:01 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 14 November 2001 : 18:48:27
|
You're right. That is a bug. In default.asp, do a search for the "CategoryAdminOptions()" subroutine. Replace it with this one:sub CategoryAdminOptions() if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then if mlev = 4 then if (rs("CAT_STATUS") <> 0) then Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Category&CAT_ID=" & rs("CAT_ID") & "&Cat_Title=" & chkString(rs("CAT_NAME"),"jsURLPath") & "')""><img src=""icon_lock.gif"" alt=""Lock Category"" border=0 hspace=0></a>" & vbNewline else Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & rs("CAT_ID") & "')""><img src=""icon_unlock.gif"" alt=""Un-Lock Category"" border=0 hspace=0></a>" & vbNewline end if end if if (rs("CAT_STATUS") <> 0) and (mlev = 4) then Response.Write " <a href=""post.asp?method=EditCategory&CAT_ID=" & rs("CAT_ID") & "&Cat_Title=" & chkString(rs("CAT_NAME"),"urlpath") & """><img src=""icon_pencil.gif"" alt=""Edit Category Name"" border=0 hspace=0></a>" & vbNewline end if if mlev = 4 then Response.Write " <a href=""JavaScript:openWindow('pop_delete.asp?mode=Category&CAT_ID=" & rs("CAT_ID") & "&Cat_Title=" & chkString(rs("CAT_NAME"),"JSurlpath") & "')""><img src=""icon_trashcan.gif"" alt=""Delete Category"" border=0 hspace=0></a>" & vbNewline end if if (rs("CAT_STATUS") <> 0) and (mlev = 4) then Response.Write " <a href=""post.asp?method=Forum&CAT_ID=" & rs("CAT_ID") & "&type=0""><img src=""icon_folder_new_topic.gif"" alt=""Create New Forum"" border=0 hspace=0></a>" & vbNewline end if if (rs("CAT_STATUS") <> 0) and (mlev = 4) then Response.Write " <a href=""post.asp?method=URL&CAT_ID=" & rs("CAT_ID") & "&type=1""><img src=""icon_url.gif"" alt=""Create New Web Link"" border=0 hspace=0></a>" & vbNewline end if if (rs("CAT_STATUS") <> 0) and (mlev = 4) then '## Forum_SQL strSQL = "SELECT FORUM_ID FROM " & strTablePrefix & "FORUM WHERE CAT_ID=" & rs("CAT_ID")
Set rsArchive = Server.CreateObject("ADODB.Recordset") rsArchive.open strSql, my_Conn
archID = "" do while not rsArchive.EOF if archID <> "" then archID = archID & "," end if archID = archID & rsArchive("FORUM_ID") rsArchive.movenext loop
Response.write "<a href=""admin_forums.asp?action=archive&target=admin_forums.aspd=" & archID & """><img src=""icon_folder_archive.gif"" alt=""Archive All Forums in Category"" height=15 width=15 border=0></a>" & vbNewline rsArchive.close set rsArchive = nothing end if if CheckForUnmoderatedPosts("CAT", rs("CAT_ID"), 0, 0) > 0 then Response.Write " <a href=""JavaScript:openWindow('pop_moderate.asp?CAT_ID=" & rs("CAT_ID") & "')""><img src='icon_folder_moderate.gif' alt='Approve/Hold/Reject all Unmoderated Posts in this Category' border=0 hspace=0></a>" & vbNewline end if if (strSubscription = 1 or strSubscription = 2) and CatSubscription = 1 then CheckSubscription "NOTEXTCAT", MemberID, rs("CAT_ID"), 0, 0, "", "" end if ' DEM --> End of Code for Full Moderation else Response.Write " " & vbNewline end if end sub Basically, this subroutine is called if the member is an admin or moderator. But in the subroutine it only allows the admin to the functions. So added the mlev=3 so the moderator can access the them, and surrounded the functions that is admin only, with if mlev=4 then. The other options are shown to the moderator.
- David |
 |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 14 November 2001 : 21:36:08
|
Is this the same thing we were discussing in the Dev forum? just so I know whether to update the code or not...
---- -Eric (da_stimulator) Stims Snitz Test area - Running 3.3.03, 4 beta, Huw's code, and Davio's code Need a Mod? Check out the Mod Resource |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 15 November 2001 : 04:54:40
|
Uhhh, you know you just might be right. What was the topic Stim?
Don't feel liking searching through the Bug forum right now. 
- David |
 |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 15 November 2001 : 05:10:58
|
It's not the same thing. This fix is for the category options. The other was for the forum options.
- David |
 |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 15 November 2001 : 05:28:55
|
Fixed for 3.4
---- -Eric (da_stimulator) Stims Snitz Test area - Running 3.3.03, 4 beta, Huw's code, and Davio's code Need a Mod? Check out the Mod Resource |
 |
|
Deleted
deleted
    
4116 Posts |
Posted - 01 December 2001 : 13:16:17
|
Fixed in [v40b03patch001]... Make sure you don't overwrite the code with the above one. Use the following for v4.0bxx:
sub CategoryAdminOptions() if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then if mlev = 4 then if (rs("CAT_STATUS") <> 0) then Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Category&CAT_ID=" & rs("CAT_ID") & "&Cat_Title=" & chkString(rs("CAT_NAME"),"jsURLPath") & "')""><img src=""icon_lock.gif"" alt=""" & fLang(strLangDefault00290) & """ border=0 hspace=0></a>" & vbNewline else Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & rs("CAT_ID") & "')""><img src=""icon_unlock.gif"" alt=""" & fLang(strLangDefault00300) & """ border=0 hspace=0></a>" & vbNewline end if end if if (rs("CAT_STATUS") <> 0) and (mlev = 4) then Response.Write " <a href=""post.asp?method=EditCategory&CAT_ID=" & rs("CAT_ID") & "&Cat_Title=" & chkString(rs("CAT_NAME"),"urlpath") & """><img src=""icon_pencil.gif"" alt=""" & fLang(strLangDefault00310) & """ border=0 hspace=0></a>" & vbNewline end if if mlev = 4 then Response.Write " <a href=""JavaScript:openWindow('pop_delete.asp?mode=Category&CAT_ID=" & rs("CAT_ID") & "&Cat_Title=" & chkString(rs("CAT_NAME"),"JSurlpath") & "')""><img src=""icon_trashcan.gif"" alt=""" & fLang(strLangDefault00320) & """ border=0 hspace=0></a>" & vbNewline end if if (rs("CAT_STATUS") <> 0) and (mlev = 4) then Response.Write " <a href=""post.asp?method=Forum&CAT_ID=" & rs("CAT_ID") & "&type=0""><img src=""icon_folder_new_topic.gif"" alt=""" & fLang(strLangDefault00330) & """ border=0 hspace=0></a>" & vbNewline end if if (rs("CAT_STATUS") <> 0) and (mlev = 4) then Response.Write " <a href=""post.asp?method=URL&CAT_ID=" & rs("CAT_ID") & "&type=1""><img src=""icon_url.gif"" alt=""" & fLang(strLangDefault00340) & """ border=0 hspace=0></a>" & vbNewline end if if (rs("CAT_STATUS") <> 0) and (mlev = 4) then '## Forum_SQL strSQL = "SELECT FORUM_ID FROM " & strTablePrefix & "FORUM WHERE CAT_ID=" & rs("CAT_ID")
Set rsArchive = Server.CreateObject("ADODB.Recordset") rsArchive.open strSql, my_Conn
archID = "" do while not rsArchive.EOF if archID <> "" then archID = archID & "," end if archID = archID & rsArchive("FORUM_ID") rsArchive.movenext loop
Response.write "<a href=""admin_forums.asp?action=archive&target=admin_forums.asp&id=" & archID & """><img src=""icon_folder_archive.gif"" alt=""" & fLang(strLangDefault00350) & """ height=15 width=15 border=0></a>" & vbNewline rsArchive.close set rsArchive = nothing end if if CheckForUnmoderatedPosts("CAT", rs("CAT_ID"), 0, 0) > 0 then Response.Write " <a href=""JavaScript:openWindow('pop_moderate.asp?CAT_ID=" & rs("CAT_ID") & "')""><img src='icon_folder_moderate.gif' alt='" & fLang(strLangDefault00360) & "' border=0 hspace=0></a>" & vbNewline end if if (strSubscription = 1 or strSubscription = 2) and CatSubscription = 1 then CheckSubscription "NOTEXTCAT", MemberID, rs("CAT_ID"), 0, 0, "", "" end if ' DEM --> End of Code for Full Moderation else Response.Write " " & vbNewline end if end sub
Think Pink Test Site not ready yet | Post v40b03 Patches |
 |
|
|
Topic  |
|
|
|