News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Remove Post Modified (Last Edit) Time

Started by rsw686, October 10, 2007, 08:37:48 PM

Previous topic - Next topic

rsw686

Link to Mod

This mod allows an administrator to remove the last edit time from a post. It places a "remove this line" link next to the last edit time.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Nikwin


ssnickerer

Thanks for the mod, it is a more practical approach for the feature than what I've seen so far. But I don't think I'm getting it to work, unfortunately. I'm on 1.1.4. No link is showing up. This applies to both previously-edited posts and also posts made after the installation of the mod through the SMF admin interface.

rsw686

If your not using the default theme you need to copy/paste the code into your theme's Display.template.php file.

Find

if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], '</i> »';


Add After

// Allow admin to remove last edit time
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>';
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Nikwin

You have also to edit the $languagedir/Modifications.your-language.php.

kamili34

Thanks

But this mod only delet person who modyfie post right ?


rsw686

Quote from: kamili34 on October 12, 2007, 05:36:46 PM
Thanks

But this mod only delet person who modyfie post right ?


All the mod does is remove the last edit line of text from the bottom of a specific post. For that post it sets the values for modifiedName and modifiedTime to null and 0. It looks to the viewer like the post was never modified.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

ssnickerer

Quote from: Nikwin on October 12, 2007, 01:20:56 PM
You have also to edit the $languagedir/Modifications.your-language.php.

I have added the following line:

$txt['remove_modified'] = 'Post modification tag has been removed.';

I've also made the addition to Display.template.php in my theme. I still don't see a link next to the modified post tag.

Nikwin

Hi,

do you only have a Modifications.english.php?
If your theme has a language folder, copy the Modifications.english.php into it.

Please excuse my bad english! ;)

rsw686

The "Remove this line" link will only show up if you are an administrator.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Stargater59


kat

Package manager gave me a

Manual mod was dead easy, though.

Thanks, RSW!

mynd

Hello there all,

I just installed this today and I don't have a link to do anything either.  I am running version 1.1.4, it is a fairly new installation, and I am using the default template.

hxxp:www.myndpollution.com/forums [nonactive]

What should I do to get this to work?  Suggestions or advice welcome.  Thanks!
Kind regards,
Mynd

hxxp:www.myndpollution.com [nonactive]

ssnickerer

Yes, rsw868, I am an admin. I've added the lines in Modifications.english-utf8.php and Display.template.php . Not functioning. Does anyone know what's going on?

ssnickerer

sorry - bump.

Can anyone offer anymore troubleshooting? :-\

rsw686

The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

James Z.

works great - BUT, unfortunately does not work on global announcements

any way to fix that?

rsw686

Quote from: James Z. on October 19, 2007, 07:23:21 AM
works great - BUT, unfortunately does not work on global announcements

any way to fix that?


You would have to apply the modifications from Display.template.php to the Global Announcements Display.template.php section. You would also need to copy/paste the database edit function in RemoveModified.php so that it updates the global announcements table.

Basically a rewrite for the global announcements mod. This would probably best be made as another mod to be installed after the Global Announcements and Remove Post Modified Time mods.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

radix2005


James Z.

Quote from: rsw686 on October 19, 2007, 10:37:27 AM
Quote from: James Z. on October 19, 2007, 07:23:21 AM
works great - BUT, unfortunately does not work on global announcements

any way to fix that?


You would have to apply the modifications from Display.template.php to the Global Announcements Display.template.php section. You would also need to copy/paste the database edit function in RemoveModified.php so that it updates the global announcements table.

Basically a rewrite for the global announcements mod. This would probably best be made as another mod to be installed after the Global Announcements and Remove Post Modified Time mods.

can anyone here do that for me? :\

Advertisement: