Remove Post Modified (Last Edit) Time

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

Previous topic - Next topic

Matthew Schenker

Good Afternoon,
I just installed this on my site, running 1.1.4 and it works great!  I am also using a custom theme (Silent Wave) and I didn't have to change the Display.template.php file at all -- when I looked at it, the changes were already there.
Matthew

allymcbeal

#61
I try to modify, my files Display.template.php is like this:

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



The code you say to modify must be :

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


I have this string :
&#187;'

I delete it?

rsw686

You have the html character codes for «. You can either replace those with the « or vice versa.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

allymcbeal

Ok, thanks, now I have understand.
Thank you. :)

Kimmie

I also have the reason for edit mod installed and it adds code to the same line in the default display file. Normally I can do these edits myself but this one is tricky because of where the code is for the other mod. I was wondering if someone could possibly take a look at the file for me and make the edit??? :)


TIA

MultiformeIngegno

Please get this MOD compatible with SMF 2.0 Beta 4!! 8)
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

DonaldDasher

This mod doesn't seem to be working with SMF 1.1.6. I've installed it but... nothing.
SMF 1.1.8
TinyPortal v0.9.8
pre-certification video

Kolya


pinoypetfinder

yeah and to 1.1.7 too, please! :D thanks in advance :)

Kolya

Worked on 1.1.7 for me, although I installed at 1.1.6 I think.

Geko


neil h


aw06

#72
Great Mod ?

Doesnt work for quick edit thou
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

DirtRider

http://www.triumphtalk.com

"The real question is not whether machines think but whether men do. "

Geko


Smog

2.0 RC1-1 compatibility wouldn't be bad too, regrettably I have to assume that mod development is ceased.
A pity because this is a useful mod.

Kolya

#76
I got this mod to work on SMF 2.0 RC1-1. Follow the instructions below on your own risk. I'm not the creator of this mod. I merely changed it a bit to make it work with my SMF version.
I plan to make this mod work for moderators as well, shouldn't be too hard. If anyone's interested I'll post the code for that later on.
Oh yeah...I'm sure the code in display.template.php can be simplified...


SAVE this as RemoveModified.php to the Sources dir

<?php
if (!defined('SMF'))
die('Hacking attempt...');

function
RemoveModified()
{
global $smcFunc, $topic, $sourcedir;

// Make sure they aren't being lead around by someone. (:@)
checkSession('get');

// Are we allowed in here?
isAllowedTo('admin_forum');

$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET modified_time = 0, modified_name = NULL, id_msg_modified = {int:msg}
WHERE id_topic = {int:topic}
AND id_msg = {int:msg}'
,
array(
'msg' => (int) $_REQUEST['msg'],
'topic' => $topic,
)
);

redirectexit('topic=' . $topic . '.' . $_REQUEST['start']);
}
?>



index.php
FIND
'reminder' => array('Reminder.php', 'RemindMe'),
ADD BELOW
'removemodified' => array('RemoveModified.php', 'RemoveModified'),

Display.Template.php
FIND

// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';

ADD BELOW

// Allow admin to remove last edit time
if($context['user']['is_admin'] && $settings['show_modify'] && !empty($message['modified']['name']))
echo '
<a href="', $scripturl, '?action=removemodified;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">Clean up!</a>';


Kolya

So I made it work for moderators and simplified the code a bit...


SAVE this as RemoveModified.php to the Sources dir

<?php
if (!defined('SMF'))
die('Hacking attempt...');

function
RemoveModified()
{
global $smcFunc, $topic, $sourcedir;

// Make sure they aren't being lead around by someone. (:@)
checkSession('get');

// Are we allowed in here?
isAllowedTo('moderate_forum');

$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET modified_time = 0, modified_name = NULL, id_msg_modified = {int:msg}
WHERE id_topic = {int:topic}
AND id_msg = {int:msg}'
,
array(
'msg' => (int) $_REQUEST['msg'],
'topic' => $topic,
)
);

redirectexit('topic=' . $topic . '.' . $_REQUEST['start']);
}
?>



index.php
FIND
'reminder' => array('Reminder.php', 'RemindMe'),
ADD BELOW
'removemodified' => array('RemoveModified.php', 'RemoveModified'),

Display.Template.php
FIND

// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';

REPLACE

// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
{ echo '
&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';
// Allow admin to remove last edit time
if($context['can_moderate_forum'])
{ echo '
<a href="', $scripturl, '?action=removemodified;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">Clean up!</a>';
}
}

kai920

Quote from: Smog on June 23, 2009, 07:28:10 AM
2.0 RC1-1 compatibility wouldn't be bad too, regrettably I have to assume that mod development is ceased.
A pity because this is a useful mod.

Any chance this can be updated to work with 2.0 RC1.2? I've been manually renaming columns with phpMyAdmin...

MarcusJ

This mod is one of my all time favorites.  Any chance it will get an update?

Advertisement: