Disable 'last edit by....' for Administrators

Started by Doburpally, May 09, 2011, 07:45:07 PM

Previous topic - Next topic

NekoJonez

If you don't give other users the permission to use it. (It doesn't go automatically)

http://custom.simplemachines.org/mods/index.php?mod=3361
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

MechSpecs

I tried this one today too (the latest pack of it).

Installs fine although it skips the UT8 English file but the rest was fine. The checkbox entry section was in the MISCELLANEOUS config area but when checked it simply did not work. I repeatedly went back to previous posts I had made, and edited, and saw the EDIT was still there. I even tried to modify the posts again to see if there was a checkbox to "Remove LAST EDITED BY" that way but nope, nadda.

Might wanna update this one to 2.0.7?

GamePersia

Quote from: MechSpecs on February 24, 2014, 11:24:56 AM
I tried this one today too (the latest pack of it).

Installs fine although it skips the UT8 English file but the rest was fine. The checkbox entry section was in the MISCELLANEOUS config area but when checked it simply did not work. I repeatedly went back to previous posts I had made, and edited, and saw the EDIT was still there. I even tried to modify the posts again to see if there was a checkbox to "Remove LAST EDITED BY" that way but nope, nadda.

Might wanna update this one to 2.0.7?
I Agree,.. Should Update This Mod For 2.0.7 SMF.... :laugh:

roshaoar

Hello,

Nice mod, thanks. One thing I noticed is that it gives the message at the bottom of the thread to "remove" on any edited thread, regardless of whether it has already been removed using this mod or not. So I changed it to this which stops that (ie adds a check that the edited by spiel is there or not):


// JJI Checks user is admin AND that the message is actually showing. Otherwise this shows in every message
if($context['user']['is_admin'] && !empty($message['modified']['name']))
echo '
<a href="', $scripturl, '?action=removemodified;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $txt['remove_modified'], '</a>';


I hope this helps someone.

But on another mod related note, where would I find "$txt['remove_modified']" in the database or is there a boilerplate edit page somewhere inside SMF? (yes I'm very new to SMF, sorry!).

Thank you for your time,

-Johan

AliG

I am wondering why nobody solved that "Quick edit" problem because it leaves "last edit" text.

There is another condition on line 2794
if (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member'])
which should be changed to
if (!$modSettings['disable_last_edit_by'] || (!$user_info['is_admin']) && (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member']))

AliG

Also the condition is WRONG.
If the option "disable_last_edit_by" is disabled (unchecked) in settings, it always adds "Last edit" text regardless of the modification time.

It should be
if ((!$modSettings['disable_last_edit_by'] || $modSettings['disable_last_edit_by'] && (!$user_info['is_admin'])) && (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member']))

Advertisement: