Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 stop showing edited by
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 07 November 2005 :  07:13:46  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
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?
<

/Tribaliztic
- www.gotlandrace.se -

Edited by - MarcelG on 07 November 2005 09:55:56

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 07 November 2005 :  07:16:32  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
Just set the option to Off in Admin Options->Feature Configuration.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 07 November 2005 :  07:24:47  Show Profile  Visit MarcelG's Homepage  Reply with Quote
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)
<

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 07 November 2005 :  08:07:39  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Ah, thanks! This is what I'm looking for MarcelG!
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 07 November 2005 :  08:42:41  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Hm, found the edits in post.asp, but not in post_info.asp. Could you give me a hint MarcelG?
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 07 November 2005 :  08:45:11  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
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<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 07 November 2005 :  09:19:25  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
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 & "'"
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 07 November 2005 :  09:32:53  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
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
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 07 November 2005 :  09:41:20  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
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 -
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 07 November 2005 :  09:42:03  Show Profile  Visit MarcelG's Homepage  Reply with Quote
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:
txtMessage = ChkString(Request.Form("Message"),"message")

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:
	if Request.Form("modedit") = "true") then
	txtMessage = txtMessage & "<br>This post was edited by a moderator at " & DateToStr(strForumTimeAdjust)
	end if

You can also add the name of the editor, with this code:
	if Request.Form("modedit") = "true") then
	txtMessage = txtMessage & "<br>This post was edited by " & getMemberName(MemberID) & " at " & DateToStr(strForumTimeAdjust)
	end if


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).<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 07 November 2005 09:48:16
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 07 November 2005 :  10:05:10  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
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.
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 08 March 2006 :  03:52:51  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
I got this working, sortof.. =)
When I check the checkbox the line is showed BUT the original message is removed.. ONLY the line:
"This post was edited by " & getMemberName(MemberID) & " at " & DateToStr(strForumTimeAdjust)"
is shown...
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 January 2007 :  08:42:48  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
This still isn't working, this is my code at the moment:
if Request.Form("modedit") = "true" then
txtMessage = ChkString(Request.Form("Message"),"message") & " This post was edited by a moderator at " & DateToStr(strForumTimeAdjust)
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
else
txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")


and the original message is gone and replaced by "This post was edited by a moderator at %dateandtimehere%"

any hints?
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 03 January 2007 :  02:26:21  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
This line solved it:
txtMessage = txtMessage & ChkString(Request.Form("Message"),"message") & " <br><br> Detta har blivit ändrat av en moderator den " & chkDate(DateToStr(strForumTimeAdjust)," ",true)

Thanks alot to Zuel for the help =)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07