Remove Post Modified (Last Edit) Time

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

Previous topic - Next topic

4b11l

Mod works fine on 2.0 rc2. You have to manually find the code string. It looks a little different that's why it wont install automatically.

Find:
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';]]></search>


Replace:
if ($settings['show_modify'] && !empty($message['modified']['name']))
{
echo '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';
       
        // Remove Last Modified
        if($context['user']['is_admin'])
            echo '
                 <a href="', $scripturl, '?action=removemodified;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $txt['remove_modified'], '</a>';
        }

kai920


ChaosEnergy

i tried to find those parts in 1.2 version area 2b3
but i cant find them

so how do i get it run in smf2 rc2
Chaos Empire ®

MarcusJ

Is there a chance this mod will get updated for RC3?

7s-1k

One Day, Two Many

nikan

For 2.0 RC3 edit the file Display.template.php

Find:
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';


Replace:
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 ($settings['show_modify'] && !empty($message['modified']['name']) && ($context['user']['is_admin']))
echo '
<a href="', $scripturl, '?action=removemodified;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $txt['remove_modified'], '</a>';

aw06

What version of 2.0 Should we emulate ?
:: 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

CapadY

This MOD will run in SMF2 RC3 without any problem. (latest version of the MOD)
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Sabre™

I'm afraid you are wrong buddy :)
The attached package will though.

Will remove when requested by the author or a staff member
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


akbora

Is it possible member group permission for this mod?
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

chris @ Alpine

Hi,

I am running 1.1.11 with default theme.  I am the admin and I have previously modified a post.  I installed the mod, but when I click on "remove this line" it displays:

Database Error
Column 'modifiedName' cannot be null
File: /home/rangate/public_html/alpineworkshops/alpineforum/Sources/RemoveModified.php
Line: 22

I have read thorough many posts here and tried various troubleshooting including changing the checkSession('get'); to checkSession('request'); (which is actually already "request") in Sources/Packages.php.

I have also tried to deinstall the mod and manually configure the mod manually by using the parsed data for 1.1.11.

What else can I do?

Thanks for your help?

Chris

~DS~

#91
Quote from: Sabre™ on May 01, 2010, 07:43:12 PM
I'm afraid you are wrong buddy :)
The attached package will though.

Will remove when requested by the author or a staff member
Thanks Sabre, thou it make a combo with
http://custom.simplemachines.org/mods/index.php?mod=2495
and
http://custom.simplemachines.org/mods/index.php?mod=349
and
http://custom.simplemachines.org/mods/index.php?mod=1920

Unless there's a conflict. :P
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Sabre™

@ chris
See if changing null to 0 does anything.  0=zero

@ Dismal Shadow
You could even combine them all into one 'personal' package and select between each option.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


~DS~

Quote from: Sabre™ on June 03, 2010, 10:44:13 PM
@ chris
See if changing null to 0 does anything.  0=zero

@ Dismal Shadow
You could even combine them all into one 'personal' package and select between each option.
I wish but I am no coder, all of them works for me as I had to manual edit most of them.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

chris @ Alpine

I looked at the "RemoveModified.php" file and that's what it shows below (original, I haven't modified it):


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

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

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

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

   $_REQUEST['msg'] = (int) $_REQUEST['msg'];

   db_query("
      UPDATE {$db_prefix}messages
      SET modifiedTime = 0, modifiedName = NULL, ID_MSG_MODIFIED = $_REQUEST[msg]
      WHERE ID_TOPIC = $topic
         AND ID_MSG = $_REQUEST[msg]
      LIMIT 1", __FILE__, __LINE__);

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



As you can see, Line 22 is "LIMIT 1", __FILE__, __LINE__);"   so I am not sure where to insert the "0" that you suggested.


Chris

Sabre™

Quote from: Dismal Shadow on June 03, 2010, 10:55:17 PM
wish but I am no coder, all of them works for me as I had to manual edit most of them.

Dude, I'm a forklift driver on a wharf and factories, so no coder here lol  But it isn't really too difficult once you stop yourself from Thinking it is ;)
Good job on getting them all to function correct mate :)

Chris, look for the word null on this line
SET modifiedTime = 0, modifiedName = NULL, ID_MSG_MODIFIED = $_REQUEST[msg]
and change it to 0.
Im not guaranteeing it will work for you, but as I understand it, some servers have issues regarding the null syntax.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


chris @ Alpine

Quote
Chris, look for the word null on this line
SET modifiedTime = 0, modifiedName = NULL, ID_MSG_MODIFIED = $_REQUEST[msg]
and change it to 0.
Im not guaranteeing it will work for you, but as I understand it, some servers have issues regarding the null syntax.

Thank you!  It works perfectly now!  You are awesome!

Chris

Sabre™

Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


viperboy

Hey everyone, I started my own forums last week and I'm trying to get everything going and I would love to have this working. I have v1.1.11 and I tried download this from the mod site anyway and it didn't do anything. I used the creators thread on how to modify a file and make it work and it caused a database error or something. I'm sorry, I didn't save the error but I would love to have this working.

Is there a .zip file I can install to make it work on 1.1.11 or the correct directions for 1.1.11? Thanks again!

viperboy

Bumping this thread, hoping for an answer. Thanks!

Advertisement: