Mod Posted Messages Control
Author: Rakesh Jain(GauravBhabu)
Posted: 19 December, 2002
Update: 19 December, 2002 11:34
01 January, 2003 See Step 9 and Step 10
Support: Help: Mod Posted Messages Control
Features:
- Allows/Disllows Editing of Posted Messages. (completed)
- Allows/Disllows Deleting of Posted Messages. (completed)
Note: Both Restriction to edit and restriction to delete posts will be turned on/off together.
Mod Requires editing/addition of new code in following files:
- config.asp - (Addition - 2 statements)
- admin_config_features.asp - (Addition - 1 Statement Block - 14 Statements)
- pop_config_help.asp - (Addition - 1 Statement Block - 15 Statements)
- active.asp - (Modification - 1 Statement)
- topic.asp - (Modification - 3 Statements)
- forum.asp - (Modification - 1 Statement)
- post.asp - (Addition - 5 Statements)
- post_info.asp - (Addition - 5 Statements)
- pop_delete.asp - (Modification - 1 Statement)
Instructions:
Step 1
File: config.asp
Line: 391
Add the following statement
strAllowPostEditing = Application(strCookieURL & "STRALLOWPOSTEDITING")
Line: 127
Add the following statement
Dim strAllowPostEditing
Step 2
File: admin_config_features.asp
Line: 291
Add following statements just below the Line 291
"<tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <b>Allow Post Editing:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" On:<input type=""radio"" class=""radio"" name=""strAllowPostEditing"" value=""1""" & chkRadio(strAllowPostEditing,0,false) & "> " & vbNewLine & _
" Off:<input type=""radio"" class=""radio"" name=""strAllowPostEditing"" value=""0""" & chkRadio(strAllowPostEditing,0,true) & ">" & vbNewLine & _
" <a href=""JavaScript:openWindow3('pop_config_help.asp?mode=features#allowPostEditing')"">" & getCurrentIcon(strIconSmileQuestion,"","") & "</a>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
"</tr>" & vbNewLine & _
Step 3
File: pop_config_help.asp
Line: 332
Add following statements just below the Line 332
"<tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """><a name=""allowPostEditing""></a>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """ >" & vbNewLine & _
" <b>What does Allow Post Editing do?</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
"</tr>" & vbNewLine & _
"<tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
" Turns On/Off the ability of a member to edit the posted messages." & vbNewLine & _
" <a href=""#top"">" & getCurrentIcon(strIconGoUp,"Go To Top Of Page","align=""right""") & "</a>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
"</tr>" & vbNewLine & _
Step 4
File: active.asp
Line: 739
Find the following statement
if (Topic_Status > 0 and Topic_Author = MemberID) or (ModerateAllowed = "Y") then
Modify/Replace the above statement as below:
if (Topic_Status > 0 and Topic_Author = MemberID and strAllowPostEditing = "1") or (ModerateAllowed = "Y") then
Step 5
File: topic.asp
Line:822
Find the following statement
if (AdminAllowed = 1 or TMember_ID = MemberID) then
Modify/replace the above statement to look like as below
if ((AdminAllowed = 1) or (TMember_ID = MemberID and strAllowPostEditing = "1")) then
Line: 619
Find the following statement
if (AdminAllowed = 1 or Reply_MemberID = MemberID) then
Modify/replace the above statement to look like as below
if ((AdminAllowed = 1) or (Reply_MemberID = MemberID and strAllowPostEditing = "1")) then
Step 6
File: forum.asp
Line:860
Find the following statement
if ((Topic_Status > 0 and Topic_Author = MemberID) or (AdminAllowed = 1)) and ArchiveView = "" then
Modify/replace the above statement to look like as below
if ((Topic_Status > 0 and Topic_Author = MemberID and strAllowPostEditing = "1") or (AdminAllowed = 1)) and ArchiveView = "" then
Step 7
File: post.asp
Line: 117
Find the following statement
if strRqMethod = "Edit" or _
Add the following statements just before the above statement
if strRqMethod = "Edit" or strRqMethod = "EditTopic" then
if mLev <= 2 and strAllowPostEditing = "0" then
Go_Result "No Permissions to edit the posted messages"
end if
end if
Step 8
File: post_info.asp
Line: 128
Find the following statement
if MethodType = "Edit" or _
Add the following statements just before the above statement
if (MethodType = "Edit" or MethodType = "EditTopic") then
if mLev <= 2 and strAllowPostEditing = "0" then
Go_Result "No Permissions to edit the posted messages." , 0
end if
end if
Restrict post deletion along with restriction to edit posts Added: 1/1/2003
Step 9
File: topic.asp
Line:652
Find the following statement
if (AdminAllowed = 1 or Reply_MemberID = MemberID) then
Modify/replace the above statement to look like as below
if ((AdminAllowed = 1) or (Reply_MemberID = MemberID and strAllowPostEditing = "1")) then
Step 10
File: pop_delete.asp
Line: 86
Find the following statement
if (chkForumModerator(Forum_ID, strDBNTFUserName) = "1") or (mLev = 1) or (mLev = 4) then '## is Allowed
Modify/replace the above statement to look like as below
if (chkForumModerator(Forum_ID, strDBNTFUserName) = "1") or _
(mLev = 1 and strAllowPostEditing = "1") or (mLev = 4) then '## is Allowed
Notes(Please Read):
Update Notes:
- Added changes required for forum.asp
- Added additional changes required to restrict deletion of posts. 1/1/2003
-