Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=982)
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.
Thank you, rsw686!
Good mod!
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.
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>';
You have also to edit the $languagedir/Modifications.your-language.php.
Thanks
But this mod only delet person who modyfie post right ?
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.
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.
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! ;)
The "Remove this line" link will only show up if you are an administrator.
Nice mod! I've been wanting this. :D
Package manager gave me a (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smilies.our-local.co.uk%2Findex_files%2Fc001.gif&hash=50b384e7f9000a128c33a78e3d3cf91200fd977a)
Manual mod was dead easy, though.
Thanks, RSW!
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.
http://www.myndpollution.com/forums
What should I do to get this to work? Suggestions or advice welcome. Thanks!
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?
sorry - bump.
Can anyone offer anymore troubleshooting? :-\
Refer to this thread and let me know if you need more assistance.
http://www.simplemachines.org/community/index.php?topic=200338
works great - BUT, unfortunately does not work on global announcements (http://custom.simplemachines.org/mods/index.php?mod=419)
any way to fix that?
Quote from: James Z. on October 19, 2007, 07:23:21 AM
works great - BUT, unfortunately does not work on global announcements (http://custom.simplemachines.org/mods/index.php?mod=419)
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.
Works like a charm. . . ;D
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 (http://custom.simplemachines.org/mods/index.php?mod=419)
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? :\
After installed, there is one line code at my homepage:
$txt['remove_modified'] = 'Remove this line';
And i didn't see i can remove the last edit within threads.
I already appreciate this mod. great mod!
Thank you..
and this is Turkish Language..
Modifications.turkish.php
$txt['remove_modified'] = 'Son Düzenlenme Tarihini Sil!';
How about making it so it works for global moderators as well as admins?
Hello, i can't download it. Anybody can fix the link? Thanks
Quote from: Buph on January 18, 2008, 07:11:00 PM
Hello, i can't download it. Anybody can fix the link? Thanks
Here ya go...
Thank you S3NTYN3L!!
Quote from: S3NTYN3L on January 06, 2008, 05:55:33 AM
How about making it so it works for global moderators as well as admins?
Yes, How can we?
Sorry I missed your reply for the last week. SMF never sent out the reply notification. Anyway you can modify Display.template.php.
Find
// Allow admin to remove last edit time
if($context['user']['is_admin'])
Replace with
// Allow admin to remove last edit time
if($context['user']['is_admin'] || in_array(2, $GLOBALS['user_info']['groups'])
Quote from: rsw686 on February 09, 2008, 10:40:45 AM
Sorry I missed your reply for the last week. SMF never sent out the reply notification. Anyway you can modify Display.template.php.
Find
// Allow admin to remove last edit time
if($context['user']['is_admin'])
Replace with
// Allow admin to remove last edit time
if($context['user']['is_admin'] || in_array(2, $GLOBALS['user_info']['groups'])
Nice mod, thanks!!
But this line: if($context['user']['is_admin'] || in_array(2, $GLOBALS['user_info']['groups']) don't work for me.
if($context['user']['is_admin'] || array(2, $GLOBALS['user_info']['groups']) it's works, i see the link but don't delete line for problems of permissions.
Sorry for my english.
I would also like to see a permission generated for this. Or at least a working hack for allowing certain groups to access it. Gives me a template error with no explanation.
Quote from: rsw686 on February 09, 2008, 10:40:45 AM
Sorry I missed your reply for the last week. SMF never sent out the reply notification. Anyway you can modify Display.template.php.
Find
// Allow admin to remove last edit time
if($context['user']['is_admin'])
Replace with
// Allow admin to remove last edit time
if($context['user']['is_admin'] || in_array(2, $GLOBALS['user_info']['groups'])
Thank you very much @rsw686
Quote from: rsw686 on February 09, 2008, 10:40:45 AM
Sorry I missed your reply for the last week. SMF never sent out the reply notification. Anyway you can modify Display.template.php.
Find
// Allow admin to remove last edit time
if($context['user']['is_admin'])
Replace with
// Allow admin to remove last edit time
if($context['user']['is_admin'] || in_array(2, $GLOBALS['user_info']['groups'])
Hello, that is not working for me. It gives me an error.
Any help or update?
Where they put
if($context['user']['is_admin'] || in_array(2, $GLOBALS['user_info']['groups'])
You need
if($context['user']['is_admin'] || in_array(2, $GLOBALS['user_info']['groups']))
note the extra ) in the second one.
Ah I see, thanks for the CmptyWz. It wasn't shown to have the extra ) in the previous posts. Thanks.
Well, now there seems to be another problem. Now, instead of having the "Remove this line" only when the post has been modified, it shows up in every single post now whether it has been modified or not.
Still no solution to this pesky problem; I'm not great when it comes to editing so I've tried basically everything.. this is how my code looks after every attempt.
if($context['user']['is_admin'] && !empty($message['modified']['name']) || in_array(2, $GLOBALS['user_info']['groups'] && !empty($message['modified']['name'])))
This makes the code work correctly for ADMIN where the "Remove this line" only appears on modified posts. However, it is not working or showing anything at all for GLOBAL MOD.
Then, if I change the code to:
if($context['user']['is_admin'] && !empty($message['modified']['name']) || in_array(2, $GLOBALS['user_info']['groups']))
It works for both ADMIN and GLOBAL MOD, however the "Remove this line" is showing up on every single post for the GLOBAL MOD; ADMIN is working fine like it should.
I am completely lost here; I really want to make this code work.. >:(
Big thanks to rsw686 for great and simple mod. Wanna ask how modified to SMF 2.0? I modify this in RemoveModified.php:
<?php
if (!defined('SMF'))
die('Hacking attempt...');
function RemoveModified()
{
global $smcFunc, $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'];
$smcFunc['db_query']("
UPDATE {$db_prefix}messages
SET modified_time = 0, modified_name = NULL, id_msg_modified = $_REQUEST[msg]
WHERE id_topic = $topic
AND id_msg = $_REQUEST[msg]
");
redirectexit('topic=' . $topic . '.' . $_REQUEST['start']);
}
?>
but have a problem in 21 line. Where my mistake can you help?
I actually packaged up a 2.0 version yesterday for my site. Here's the link.
http://wgnrs.dynalias.com/smf2/removemodified_1.0.zip
I'll probably submit this to the SMF package site later. I just haven't had the time.
Such a great mod and no support; sad.
can you make this for SMF 2.0 Beta 3
Quote from: rsw686 on March 20, 2008, 03:54:22 PM
I actually packaged up a 2.0 version yesterday for my site. Here's the link.
http://wgnrs.dynalias.com/smf2/removemodified_1.0.zip
I'll probably submit this to the SMF package site later. I just haven't had the time.
Did you miss this?
Quote from: 4b11l on March 22, 2008, 01:23:32 AM
Such a great mod and no support; sad.
No support? What are you talking about. rsw686 has been giving support in this thread. If he hasn't replied with a solution to the problem of the "Remove Edit" line showing up on every page, he probably hasn't found one yet. He may very well be very busy trying to update his own site, themes and mods to 2.0 at the moment. Give him some time.
If anything else, just come back in a few days and remind him if he hasn't found a solution. Instead of whining about it, just politely remind him. Giving remarks like that can make the problem worse. Who wants to deal with a begrudged user over a polite one?
Quote from: 4b11l on March 22, 2008, 01:23:32 AM
Such a great mod and no support; sad.
What do you need support on? This mod only does one thing and does it well. If your trying to allow other groups to remove the modified time the code was given earlier in the thread.
The issue he has is, when he adds that code, the message for removing the last edit time shows up on every post, edited or not.
Quote from: 4b11l on March 15, 2008, 06:24:42 PM
Still no solution to this pesky problem; I'm not great when it comes to editing so I've tried basically everything.. this is how my code looks after every attempt.
if($context['user']['is_admin'] && !empty($message['modified']['name']) || in_array(2, $GLOBALS['user_info']['groups'] && !empty($message['modified']['name'])))
Honestly this is as easy as reading through the line and thinking about what will happen. The && means both have to be true. The || means either has to be true. The () group sections together.
Notice you don't have the admin and empty modified name grouped. So the || isn't doing what you intended.
Combine that with the fact you are using the old mod and that is why just add the || global moderator at the end won't work.
Version 1.1 available on the SMF mods site has this line
if($context['user']['is_admin'])
So then adding the || in_array(2, $GLOBALS['user_info']['groups']) will work.
Just remember that not everybody is a coder or understands coding syntax. The symbols mean nothing unless you've seen them before and know what they're for.
Oh, and rsw686, I sent you a PM regarding one of your other mods which isn't currently up on the SMF mod site. Might you have a look?
Quote from: Eliana Tamerin on March 22, 2008, 12:18:33 PM
Just remember that not everybody is a coder or understands coding syntax. The symbols mean nothing unless you've seen them before and know what they're for.
Oh, and rsw686, I sent you a PM regarding one of your other mods which isn't currently up on the SMF mod site. Might you have a look?
PM sent. Sorry I forgot about that as I've been busy updating 15-20 mods for my SMF 2.0 site.
I know that most don't understand coding syntax. However if you want to make simple changes understanding the basic && and || operator for if statements is a must.
I have no problems with patience. I've been patient for almost a month hoping that I would atleast get a "a can't find a solution or anything yet" or "I'm still working on it" if that was the case. As you can see I had no real experience with coding so obviously my coding is wrong or isn't working.
I know some people don't like getting PM about mods or anything so I waited for replies. Trust me if I was whining you'd notice it. I don't see a reason why you are throwing a fit. The reason I blurted that out was because rsw was able to reply to another user support, yet failed or overlooked my problem; could've atleast acknowledged my problem and let me know.
Rsw, thanks for the actual reply; that code is the exact one given to me by CpmtrWiz and as you can see it was showing "Remove this line" on every single post. Which is the actual problem I'm inquiring about; I don't see a newer version and yes I'm using 1.1
I'm not throwing a fit. I was explaining why he might not have responded to you in a very polite manner and advising you to check back in a few days.
Anyways, try using this code:
if(($context['user']['is_admin'] && !empty($message['modified']['name'])) || (in_array(2, $GLOBALS['user_info']['groups'] && !empty($message['modified']['name'])))
Your missing another ")" at the end and no it doesn't work. That does not show/work for global moderators. :/ Only works for Admin.
Quote from: rsw686 on March 22, 2008, 11:52:32 AM
Honestly this is as easy as reading through the line and thinking about what will happen. The && means both have to be true. The || means either has to be true. The () group sections together.
Notice you don't have the admin and empty modified name grouped. So the || isn't doing what you intended.
Combine that with the fact you are using the old mod and that is why just add the || global moderator at the end won't work.
Version 1.1 available on the SMF mods site has this line
if($context['user']['is_admin'])
So then adding the || in_array(2, $GLOBALS['user_info']['groups']) will work.
Do you have any suggestions on how to get the permission sorted out for Global Moderators? I changed the line of code that you posted and it does show "Remove this line" for Global Moderators now. However when they click on it they receive the error: "You are not allowed to administrate this forum."
Any help would be appreciated and thanks for such a great mod!
Yeah you need to change the check in Sources\RemoveModified.php If you look through the other code I'm sure you could find the syntax for it. It is just a one line change. Otherwise I will look for it later when I get home.
Here is what I did to remove the last edit timerstamp for admins and moderators. It only shows for regular members.
Open Post.php
Around line 1730 +/-
Find:
if (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member'])
Replace with:
if (!allowedTo('moderate_forum') && (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member']))
Now Moderators and administrators will be exempt from the edit time.
Hope this is what you are looking for.
-shacon :)
Quote from: rsw686 on April 01, 2008, 01:48:21 PM
Yeah you need to change the check in Sources\RemoveModified.php If you look through the other code I'm sure you could find the syntax for it. It is just a one line change. Otherwise I will look for it later when I get home.
Thanks. I looked in that file but I'm not sure what to change. If its not too much trouble could you show me what I need to change. Thanks again for your help!
Quote from: shacon on April 01, 2008, 05:09:37 PM
Here is what I did to remove the last edit timerstamp for admins and moderators. It only shows for regular members.
Open Post.php
Around line 1730 +/-
Find:
if (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member'])
Replace with:
if (!allowedTo('moderate_forum') && (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member']))
Now Moderators and administrators will be exempt from the edit time.
Hope this is what you are looking for.
-shacon :)
Cool, so this is a global setting not related to this mod?
Quote from: cripwalk on April 01, 2008, 09:49:28 PM
Thanks. I looked in that file but I'm not sure what to change. If its not too much trouble could you show me what I need to change. Thanks again for your help!
It should be as simple as changing the line below in Sources\RemoveModified.php
isAllowedTo('admin_forum');
to
isAllowedTo(array('admin_forum', 'moderate_forum'));
Thank you very much. That worked perfectly. Thanks again for such a great mod and support.
Quote from: rsw686 on April 01, 2008, 10:08:42 PM
Quote from: cripwalk on April 01, 2008, 09:49:28 PM
Thanks. I looked in that file but I'm not sure what to change. If its not too much trouble could you show me what I need to change. Thanks again for your help!
It should be as simple as changing the line below in Sources\RemoveModified.php
isAllowedTo('admin_forum');
to
isAllowedTo(array('admin_forum', 'moderate_forum'));
I did this and my moderators still get the "You are not allowed to administrate this forum." error...
Just to recap, Here's what I've changed in the codes:
In Display.Template:
Find
// Allow admin to remove last edit time
if($context['user']['is_admin'])
Replace with
// Allow admin to remove last edit time
if($context['user']['is_admin'] || in_array(2, $GLOBALS['user_info']['groups']))
And then in RemoveModified:
Find
isAllowedTo('admin_forum');
Replace with
isAllowedTo(array('admin_forum', 'moderate_forum'));
What am I missing?
I didn't test it. Just thought it would work. I can look into it more. I just don't have much time to be adding feature requests.
Any luck with this, rsw686?
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
I try to modify, my files Display.template.php is like this:
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <i>', $txt[211], ': ', $message['modified']['time'], '
', $txt[525], ' ', $message['modified']['name'], '</i> »'
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 :
»'
I delete it?
You have the html character codes for «. You can either replace those with the « or vice versa.
Ok, thanks, now I have understand.
Thank you. :)
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
Please get this MOD compatible with SMF 2.0 Beta 4!! 8)
This mod doesn't seem to be working with SMF 1.1.6. I've installed it but... nothing.
Quote from: lorenzone92 on September 26, 2008, 11:44:45 AM
Please get this MOD compatible with SMF 2.0 Beta 4!! 8)
Seconded. :)
yeah and to 1.1.7 too, please! :D thanks in advance :)
Worked on 1.1.7 for me, although I installed at 1.1.6 I think.
Quote from: lorenzone92 on September 26, 2008, 11:44:45 AM
Please get this MOD compatible with SMF 2.0 Beta 4!! 8)
Yes, please! O:)
Great mod!
many thanks,
neil
Great Mod ?
Doesnt work for quick edit thou
Will it be updated to RC1
Quote from: lorenzone92 on September 26, 2008, 11:44:45 AM
Please get this MOD compatible with SMF 2.0 Beta 4!! 8)
Yes... please...
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.
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>';
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 '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';
// 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>';
}
}
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...
This mod is one of my all time favorites. Any chance it will get an update?
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>';
}
Thanks 4b11l, that worked.
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
Is there a chance this mod will get updated for RC3?
Quote from: MarcusJ on March 20, 2010, 09:10:54 PM
Is there a chance this mod will get updated for RC3?
I agree :)
For 2.0 RC3 edit the file Display.template.php
Find:
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';
Replace:
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';
// 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>';
What version of 2.0 Should we emulate ?
This MOD will run in SMF2 RC3 without any problem. (latest version of the MOD)
I'm afraid you are wrong buddy :)
The attached package will though.
Will remove when requested by the author or a staff member
Is it possible member group permission for this mod?
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
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
@ 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.
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.
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
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.
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
My pleasure mate :)
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!
Bumping this thread, hoping for an answer. Thanks!
The edits are quite simple, and [HERE] (http://custom.simplemachines.org/mods/index.php?action=parse;mod=982;attach=55618;smf_version=1.1.11) are the manual instructions for smf 1.1.11 if you'd like to double check.
Atm I'm on vacation, so I'm not at my pc to check anything. This should get you in the right direction though.
Good Luck :)
Any idea if this will be updated for 2.0 RC4?
Will there be an Update vor SMF 2.0 in the future ?
Quote from: Tedi on June 22, 2011, 03:42:51 PM
Will there be an Update vor SMF 2.0 in the future ?
It's only a tiny manual edit as the only real change is the <i> and <em> in the display.template. It works like a charm for me in 2.0.
Yes, I've tried it by myself allready ... it works fine !
For finding the relevant files in the source folder, I simply took the "manually update" - instructions from the mods page (see the link to it on page 1 of this thread ) .
i cannot get this to work can someone like help me over teamviewer?
For anyone wondering, install the mod and skip the error..
Open up Display.template.php and find this section of code:
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';
and replace it with this:
if ($settings['show_modify'] && !empty($message['modified']['name']))
{
echo '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';
// Allow admin to remove last edit time
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>';
}
That should be it.. just installed it and it works great!
Much better than the last mod I tried which broke my site..
Quote from: Iomega0318 on October 16, 2011, 09:42:51 PM
For anyone wondering, install the mod and skip the error..
Open up Display.template.php and find this section of code:
(Edited out code)
That should be it.. just installed it and it works great!
Much better than the last mod I tried which broke my site..
I'd just like to verify that installing the mod, ignoring the error, and making the Display.template.php changes you supplied is intended to make this mod work on 2.0.1?
This is very important to me as I upgraded from 1.1.15 and dropped PrettyURLs which means I'm correcting a lot of links within posts and I'd like to remove as much evidence of my presence and that of my other administrator as possible. I loved how I could click and remove all reference to the fact I had edited a post in 1.1.15. Thanks for sharing the code and thanks in advance for your reply.
It worked exactly as stated. Thanks very much.