The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
I'm pretty sure I've seen this, but can't find it anywhere..
I don't want the "Edited by:"-text showing when a moderator has edited a topic. Been looking in the code for the part that's excluding admins from this but can't find it either. Anyone know where it is? <
I don't want the "Edited by:"-text showing when a moderator has edited a topic. Been looking in the code for the part that's excluding admins from this but can't find it either. Anyone know where it is? <
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
آخرین ویرایش توسط
نوشته شده در
Just set the option to Off in Admin Options->Feature Configuration.<
نوشته شده در
If you disable the option in Feature Configuration you disable it for everyone (so, also when a member edits a post).
If you want mods and admins to be able to perform an edit without the text popping up, you should edit post_info.asp.
I've done something similar at oxle.com for admins ; I modded post.asp to show an extra checkbox for admins which needs to be checked if you want to make a hidden edit. After that I modded post_info.asp, to do NOT update the T_LAST_POST, T_LAST_EDIT and T_LAST_EDIT_BY (and the same for replies) if the checkbox was checked.
You can have a look at the edits via my source viewer: http://www.oxle.com/source.asp (login demo/demo if you do not wish to register)
<
If you want mods and admins to be able to perform an edit without the text popping up, you should edit post_info.asp.
I've done something similar at oxle.com for admins ; I modded post.asp to show an extra checkbox for admins which needs to be checked if you want to make a hidden edit. After that I modded post_info.asp, to do NOT update the T_LAST_POST, T_LAST_EDIT and T_LAST_EDIT_BY (and the same for replies) if the checkbox was checked.
You can have a look at the edits via my source viewer: http://www.oxle.com/source.asp (login demo/demo if you do not wish to register)
<
portfolio - linkshrinker - oxle - twitter
نوشته شده در
Ah, thanks! This is what I'm looking for MarcelG!
<
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
نوشته شده در
Hm, found the edits in post.asp, but not in post_info.asp. Could you give me a hint MarcelG?
<
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
نوشته شده در
Is it this part? =)
if (mLev < 4 or Request.Form("modedit") = "true") and strEditedByDate = "1" then
'only update this when the time between the original reply and the edited reply is more than a minute. if (DateToStr(strForumTimeAdjust) - Request.Form("orig_replydate") > 100) then
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = " & MemberID
Strupdaterecords = "yes"
end if
end if<
if (mLev < 4 or Request.Form("modedit") = "true") and strEditedByDate = "1" then
'only update this when the time between the original reply and the edited reply is more than a minute. if (DateToStr(strForumTimeAdjust) - Request.Form("orig_replydate") > 100) then
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = " & MemberID
Strupdaterecords = "yes"
end if
end if<
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
نوشته شده در
I found the correct lines and everything's working well, but.. I would like to have a default text to show up where a hidden edit has been made. How can this be done? I get sql-errors on this code:
strModeratorEditText = Moderator
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = '" & strModeratorEditText & "'"
<
strModeratorEditText = Moderator
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = '" & strModeratorEditText & "'"
<
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
نوشته شده در
This is the error I get:
[MySQL][ODBC 3.51 Driver][mysqld-4.0.20a-nt]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 ' T_STICKY = 0 WHERE TOPIC_ID = 3311' at line 1
And this is the code with surrounding code:
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", R_SIG = 1"
else
strSql = strSql & ", R_SIG = 0"
end if
if strEditedByDate = "1" then
if Request.Form("modedit") = "true" then
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = " & MemberID
else
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = '" & strModeratorEditText & "'"
end if
end if
strSql = strSql & " WHERE REPLY_ID=" & Reply_ID
<
[MySQL][ODBC 3.51 Driver][mysqld-4.0.20a-nt]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 ' T_STICKY = 0 WHERE TOPIC_ID = 3311' at line 1
And this is the code with surrounding code:
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", R_SIG = 1"
else
strSql = strSql & ", R_SIG = 0"
end if
if strEditedByDate = "1" then
if Request.Form("modedit") = "true" then
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = " & MemberID
else
strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", R_LAST_EDITBY = '" & strModeratorEditText & "'"
end if
end if
strSql = strSql & " WHERE REPLY_ID=" & Reply_ID
<
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
نوشته شده در
I think I'll have to turn this around.. Now ALL users that DON'T check the checkbox get the moderationtext as "edited by:", am I right?
Maybe the mods have to check the checkbox if they want to do a hidden edit =)
<
<
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
نوشته شده در
Well, a hidden edit is a hidden edit...so, nothing except the T_MESSAGE (and/or T_SUBJECT) or R_MESSAGE gets updated when you perform a hidden edit.
There's no registration of the last edit time nor who performed the last edit.
This last value gets stored in R_LAST_EDITBY (for replies) or T_LAST_EDITBY (for topics).
The way it works in TOPIC.ASP, is that when the value for R_LAST_EDITBY (for replies) or T_LAST_EDITBY (for topics) is not empty, it shows up as 'edited by "user"'.
So, in other words, if you do not want to update R_LAST_EDITBY or T_LAST_EDITBY, nor R_LAST_EDIT nor T_LAST_EDIT, the only way to show the (not so hidden) edit, is by adding a piece of info to the message. This can be done in this line (line 349 in base install, in the 'if MethodType = "Edit" then' part) for replies:
If you add these lines below, you'll add a short message to the end of the reply, stating that the reply was edited by a moderator/admin:
You can also add the name of the editor, with this code:
In the part for the EditTopic method is the same line, (451 in base install). If you add the same code as shown above to it, it will also work for edited topics. But, _only_ if the mod has decided to make a hidden edit.
By the way ; the option to do a hidden edit is only available for moderators/admins. (in my case only for admins). That's why I decided to make it this way. Normally they make hidden edits, but now and then they should be able to make 'non-hidden' edits.
The problem with your SQL statement is that you are trying to fill in T_LAST_EDITBY with a text-string, but it should be filled in with a memberid (so a number).<
The way it works in TOPIC.ASP, is that when the value for R_LAST_EDITBY (for replies) or T_LAST_EDITBY (for topics) is not empty, it shows up as 'edited by "user"'.
So, in other words, if you do not want to update R_LAST_EDITBY or T_LAST_EDITBY, nor R_LAST_EDIT nor T_LAST_EDIT, the only way to show the (not so hidden) edit, is by adding a piece of info to the message. This can be done in this line (line 349 in base install, in the 'if MethodType = "Edit" then' part) for replies:
Code:
txtMessage = ChkString(Request.Form("Message"),"message")Code:
if Request.Form("modedit") = "true") then
txtMessage = txtMessage & "<br>This post was edited by a moderator at " & DateToStr(strForumTimeAdjust)
end ifCode:
if Request.Form("modedit") = "true") then
txtMessage = txtMessage & "<br>This post was edited by " & getMemberName(MemberID) & " at " & DateToStr(strForumTimeAdjust)
end ifIn the part for the EditTopic method is the same line, (451 in base install). If you add the same code as shown above to it, it will also work for edited topics. But, _only_ if the mod has decided to make a hidden edit.
By the way ; the option to do a hidden edit is only available for moderators/admins. (in my case only for admins). That's why I decided to make it this way. Normally they make hidden edits, but now and then they should be able to make 'non-hidden' edits.
The problem with your SQL statement is that you are trying to fill in T_LAST_EDITBY with a text-string, but it should be filled in with a memberid (so a number).<
portfolio - linkshrinker - oxle - twitter
آخرین ویرایش توسط
نوشته شده در
bah, I'm lost now =)
http://www.gotlandrace.se/tabort/post_info.txt
Search for "modedit" and txtMessage = ChkString(Request.Form("Message"),"message") to see what I've done so far =)
I didn't check the checkbox and my name came up after I edited a topic. <
http://www.gotlandrace.se/tabort/post_info.txt
Search for "modedit" and txtMessage = ChkString(Request.Form("Message"),"message") to see what I've done so far =)
I didn't check the checkbox and my name came up after I edited a topic. <
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
Email Member
Message Member
Post Moderation
بارگزاری فایل
If you're having problems uploading, try choosing a smaller image.
پیشنمایش مطلب
Send Topic
Loading...