Link to Mod (http://mods.simplemachines.org/index.php?mod=117)
This modification makes it so that if a moderator or admin was the last person to edit a post then the owner can not
edit the post even if they normally have the rights.
This modification will attempt to retroactivaly determine if a moderator was the last editor. Note that if a moderator has
changed their name since the time of the edit the modification will fail to retroactivaly mark that post as moderator edited.
All future posts should be marked properly.
With this mod you can choose on a per theme basis to display the modification notice if the last editor was a mod or not
Good idea!....
When moderator or adminstrator changes an user's post, the poster (a normal member) cannot edit anymore.
Since I didn't explain it:
After a moderator or admin edit's the post anyone with the permission modify_any or modify_replies can still change it as I figured only moderators would have those permissions.
I'm having little problems.
Mod works but is giving me errors:
8: Undefined index: hide_modEdit
File: ....../forum/Themes/default/Display.template.php (eval?)
Line: 439
I'm using smf 1.0.4
I'll look into this and get back to you.
Find:
if ($settings['show_modify'] && !empty($message['modified']['name']) && !($message['modEdit'] && $settings['hide_modEdit']) )
Replace
if ($settings['show_modify'] && !empty($message['modified']['name']) && !($message['modEdit'] && isset($settings['hide_modEdit'])) )
does this work with 1.1. beta 2 or 1.1 beta 3??
Probably note. I'll try to find some time to make a Beta 3 version this weekend.
After modifying the file, I'm gettting same error.
Maybe the problem is with reading the language file?
I tried to install this with Package Manager on my 1.0.5 and ended up in a world of pain.
I downloaded the package and clicked to install it, didn't get any error messages.
When I installed it the process stalled and withina few seconds the database became unresponsive.
The process to update the DB then ran amok and sapped up all of the DB resources.
The forum spat error messages saying it couldn't connect to the DB, phpmyadmin refused to allow me to connect to the DB at all.
Eventually I managed to get in to phpmyadmin/processes and found that the edit to the messages table had been running flat out for ages. I tried to kill it in phpmyadmin but it refused to be killed.
I was able to restore my backed up files using ftp but the DB update just refused to be killed for the next 50 minutes.
Eventually I managed to reverse the table edit and remove the mod edit column from the table and the forum then came back online.
I just thought you should be aware.
I had pretty much the same issue as Fizzy, I tried to install it via the package manager, but when I clicked 'proceed' everything ground to a halt and I had to go in via ftp and remove what files I could to get my site back...
Shame, as this is what I was after :-\
I'd be willing to bet that its getting hung up when trying to figure out which posts were last editted by a mod.
You can try this: Open the package up and edit add_settings.php
Find:
// Now try to figure out if the current messages have been mod editted and dump them into a temporary table
$result = db_query ("
CREATE TEMPORARY TABLE {$db_prefix}NoChangeModEdit SELECT
IF( !ISNULL(modifiedName) AND (mem.ID_GROUP = 1 OR mem.ID_GROUP = 2 OR !ISNULL(mods.ID_MEMBER)), 1, 0) AS modEdit,
msg.ID_MSG
FROM {$db_prefix}members AS mem, {$db_prefix}messages AS msg
LEFT JOIN {$db_prefix}members AS mem2 ON ( IFNULL(mem2.realName,mem2.memberName) = modifiedName )
LEFT JOIN {$db_prefix}moderators AS mods ON (mem2.ID_MEMBER=mods.ID_MEMBER
AND msg.ID_BOARD=mods.ID_BOARD)
WHERE mem.ID_MEMBER=msg.ID_MEMBER
", __FILE__, __LINE__);
if ( $result ) // ok well we got the info lets update it then
db_query("
UPDATE {$db_prefix}messages AS msg
SET modEdit= (
SELECT modEdit FROM {$db_prefix}NoChangeModEdit AS b
WHERE msg.ID_MSG = b.ID_MSG
)
", __FILE__, __LINE__);
and remove it
Version 0.3 released
Updated for SMF 1.1 RC 1+
I removed the part where it tries to mark the current messages. It was causing too high of a load. If it find a good method I'll release a seperate file to do it.
i installed this and i am getting pages of errors. apparently to me the function is undefined
8: Undefined index: hide_modEdit
File: /home/mdccla2/public_html/forums/Themes/helios/Display.template.php (eval?)
Line: 536
noting that i have modifying my Display.template.php so the line number is off
this is what line 536 is on when i download my display.template.php file and go to that line:
if ($settings['show_modify'] && !empty($message['modified']['name']) && !($message['modEdit']) )
i removed && $settings['hide_modEdit'] so it looked like
if ($settings['show_modify'] && !empty($message['modified']['name']) && !($message['modEdit']) )
and the errors stopped and yet it still works.... odd..
i like it!
I'll look into it SleePy. The hide_modEdit is just an option to not display the "Editted by" if the editor was a mod.
I'm trying to install this manually on my forum (using a different theme) but have one question. I edited all those files accordingly, but got stuck when I looked at the add_settings file. I know they are usually used for the Package Manager install, but don't I have to do those database changes also? If I need to change it, what and how do I do this? The install.xml file doesn't mention it and I'm not very database savvy.
Thanks.
add_settings.php is actually really easy to do. Upload it to your forum root directory and then surf to it. You should get no output. Then delete it.
Thanks for the reply MikeMill.
It won't change anything else right as long as I don't upload that xml file also? Just changes the database?
If I wanted to uninstall it later on, I assume I just need to upload the other file (I think delete_settings.php) to remove the changes made in the database right?
Just want to do this correctly :D
Thanks.
Correct on all counts. add_settings.php just makes database changes. remove_settings.php undoes those changes.
im getting these errors:
8: Undefined index: modEdit
File: /home/egrounds/public_html/forums/Sources/Post.php
Line: 601
8: Undefined index: modEdit
File: /home/egrounds/public_html/forums/Sources/Post.php
Line: 1155
is this part of your mod, or ?
yeah it is. Hmmm let me take a look at it, I may not be using isset()
Edit:
I think I found the problem but I don't have time to check it. Can you try making these changes to Post.php and letting me know if the error goes away?
<operation>
<search><![CDATA[
t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER, m.posterTime]]></search>
<add><![CDATA[, m.modEdit]]></add>
</operation>
<operation>
<search><![CDATA[
t.ID_FIRST_MSG, t.locked, t.isSticky, t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER]]></search>
<add><![CDATA[, m.modEdit]]></add>
</operation>
is this in post.php?
<operation>
<search><![CDATA[
t.ID_FIRST_MSG, t.locked, t.isSticky, t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER]]></search>
<add><![CDATA[, m.modEdit]]></add>
</operation>
sorry about that..
In Post.php
search for t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER, m.posterTime
and add after that , m.modEdit
then search for t.ID_FIRST_MSG, t.locked, t.isSticky, t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER
and add after that , m.modEdit
Quote from: MikeMill on December 09, 2005, 12:04:45 AM
sorry about that..
In Post.php
then search for t.ID_FIRST_MSG, t.locked, t.isSticky, t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER
and add after that , m.modEdit
ya, thats what i dont have..
<id>MikeMill:NoChangeModEdit</id>
<version>0.3</version>
there a chance this mod will be updated to 1.1RC2?
Which version should I install for SMF 1.0?
I'm using 1.0.6 and would love to use this, but I don't see support for that version and am hesitant to give it a shot. Is it functional as-is for 1.0.6 or should I make any of the above-mentioned tweaks first, or should I just not use it?
i've updated to 1.0.7 now... tried to give it a spin but it doesn't seem to work. any ideas?
Trying to install 0-3 in SMF1.1RC2+MKP1.1RC1 with some other minor mods installed (more tags, etc.) i get:
1024: Undefined XML element: search from /hp/aa/ae/eq/www/urpg/smf/Sources/Subs-Package.php on line 1409
File: /hp/aa/ae/eq/www/urpg/smf/Sources/Subs-Package.php
Line: 2791
How do I install by hand? I'd like the Package Manager to work with it so i can easilie deinstall it... It sounds very usefule, but who knows...
still nothing for rc2? this should be an standard feature of the forum itself.
Quote from: Dr. Jones on April 03, 2006, 10:18:17 AM
i've updated to 1.0.7 now... tried to give it a spin but it doesn't seem to work. any ideas?
Which file is for 1.0.7?
Quote from: ivo2296 on April 12, 2006, 11:24:28 AM
Quote from: Dr. Jones on April 03, 2006, 10:18:17 AM
i've updated to 1.0.7 now... tried to give it a spin but it doesn't seem to work. any ideas?
Which file is for 1.0.7?
There isn't one. I tried to hack it (edit package-info.xml and change the version number) but that didn't work. I'm not terribly knowledgeable about modding so I gave up after that rather than trying to keep going and risk fubaring my forums ;)
Quote from: Dr. Jones on April 12, 2006, 12:54:19 PM
Quote from: ivo2296 on April 12, 2006, 11:24:28 AM
Quote from: Dr. Jones on April 03, 2006, 10:18:17 AM
i've updated to 1.0.7 now... tried to give it a spin but it doesn't seem to work. any ideas?
Which file is for 1.0.7?
There isn't one. I tried to hack it (edit package-info.xml and change the version number) but that didn't work. I'm not terribly knowledgeable about modding so I gave up after that rather than trying to keep going and risk fubaring my forums ;)
I'll give try to implement it this week. It easy for new smf 1.0.* installations but mine forum is too much modified that's why i need more spear time.
I try to edit all manually for smf 1.0.7 and i have only one problem - missing code to be found in Subs-Post.php :
<file name="$sourcedir/Subs-Post.php">
<operation>
<search position="before"><![CDATA[
if (isset($posterOptions['name']))
$messages_columns[] = "posterName = '$posterOptions[name]'";]]></search>
<add><![CDATA[
$messages_columns[] = "modEdit=$msgOptions[modEdit]";]]></add>
</operation>
</file>
For all other files everything is OK.
Is this available for version 1.1 RC2?
Can someone make this for version 1.1 rc2?
Quote from: RBH on April 12, 2006, 12:48:35 AM
still nothing for rc2? this should be an standard feature of the forum itself.
Anything yet?
Will this be made to work with SMF 1.1 RC 2 or does it work now with it?
BUMP!
Available for 1.1 RC2?
This option should be a basic function in all versions of SMF. What's the point a moderator to edit a post and after that the user to re-edit it?!? I'm not talking for the case when we have a locked topic.
Not for be annoying only for show the interest :D, i would like this work with RC2 please.
Thank you.
yeah it will be cool.... for rc2
I also would like a 1.1RC2 compatible version for this! :D
reading the last posts... LOL
*ping*
Does it work for RC3?
I think Thantos is ignoring the thread! :D
I've only just come across this mod; I'd install it too if an R3 version were available. And to mirror what another post remarked: this should be standard feature.
Maybe it will be updated for 1.1 final (gold)
Quote from: URPG on September 10, 2006, 07:55:03 AM
reading the last posts... LOL
*ping*
Does it work for RC3?
I want to know this too. I need it for RC3.
I wanted this for my forum, so I hacked it to work for 1.1.1. It may work on RC3, but it may not. I guess it should work for 1.1. Here is my hack: http://www.andsum.be/SMFMods/modEdit_0-3-CJB.zip
(standard disclaimers apply)
Feel free to try this one out, although I'm getting some errors I haven't noticed before and I haven't traced which mod they are from yet!
The errors seem to disappear when I tick and save, then untick and save again the 'Hide last modification date on modified posts if the editor was a moderator or admin?' on the 'Current Theme' admin area. Seems to all be working.
Excellent mod Thantos!
Regards,
Chris
Anyone updating this for 1.1.1?
~thanks
update??
This really should be a core function. It makes no sense that a post can be again edited by the poster AFTER it has been moderated.
Anyway, Thantos, any chance of this being updated for 1.1.2? ;)
Friendly "Bump" ;)
Update please for 1.1.2
Thank's
Update please for 1.1.2
Thank's
I am no longer able to keep my mods up to date since I'd rather spend the time I have on developing SMF. As such the following mods are up for the taking. I give my permission to update and/or modify and restribute under your name this mod. All I request is that you let the Customization Team know if / when you post a new version of the mod so that they can remove my version. thanks.
Hi Thantos,
What are the chances of this mod becoming part of the core?
No plans to add it.
Quote from: Thantos on April 18, 2007, 09:31:53 AM
No plans to add it.
But i think there is no sense if users can re-edit moderators, sometimes deleting a post isn't the best way for some situations.
has someone already picked this mod up for updating?? ::)
I hope so :-\
if only your moderators and administrators can lock topics and you do not mind that the name of the moderator stays you could use this code
search in display.template.php for
// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
and replace it with
// Can the user modify the contents of this post?
if (($context['can_lock']) && ($message['modified']['name']['can_lock']))
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
elseif ($message['can_modify'] && ($message['modified']['name']) == ($context['user']['name']))
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
elseif ($message['can_modify'] && empty($message['modified']['name']))
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
it does the job for me. futher support i cant give.
I'll give that a go. :)
Quote from: Col on June 10, 2007, 07:44:00 PM
I'll give that a go. :)
im curious, did it do the job with you as well?? :)
Hi,
OK, I've just installed your code, made a few tests, and it all seems fine. This seems like really easy code to keep on top of with template upgrades. I guess the downside will be for unusual forum setups where groups other than moderators or admins can lock threads. It works for me though. :)
great :D
and indeed for those who have users lock topics have to find a function that only admin and moderaters can do and replace the ['can_lock'] code 8)
Hi vosje,
I've found a problem - this throws up loads of errors each time any moderator views a thread:
Quote8: Uninitialized string offset: 0
File: /home/xxxxx/public_html/forum/Themes/New template/shout.template.php (main sub template - eval?)
Line: 398
I'm going to have to remove this mod, otherwise it makes the error log unusable.
Do you have a solution?
hey col,
no i dont have the solution right a way.
but some questions :
do you only have it with shout or more?
do you have installed the mod itself too or just the lines i added?
hope to hear it from ya
Hi,
From what I understand, the error messages can be misleading. I first looked to the Shoutbox template, but that doesn't have enough lines for the error to make sense. Only by checking the other files in my own modified template did I find the problem - the error line number was exactly where I'd added your code. The errors were only created when myself or another moderator viewed a thread - ordinary members did not trigger the error. The error was consistent. The errors stopped as soon as I changed the code back to the original.
I did/do not have the mod installed; I used only your code.
Hope that helps.
ok here is what i have :
- I do not have shoutbox installed (and cant test your error because of that)
- I do have the mod installed before adding the code
- I don't have the error
hope you can do anything with this info
Hi,
I'll add your code to another template (one without the shoutbox) to test it. ;)
Hmmm. I made a copy of the default theme, added your code, and the errors do not appear. If I post my Shoutbox template file, would you care to look at it?
Quote from: vosje505 on June 19, 2007, 04:19:20 AM
ok here is what i have :- I do not have shoutbox installed (and cant test your error because of that)
- I do have the mod installed before adding the code
- I don't have the error
hope you can do anything with this info
Is that a typo? You have the mod installed? I thoughyt your code did away with using the mod code! ??? It worked for me without the mod code (apart from the errors), and the errors disappeared with the default template.
haha no it's not a typo. I've installed it and after that i made the code and was too lazy to remove it again.
since it doesn't trouble each other I left it.
but you did tried the code in the default and there was everthing ok? :o
strange but usefull
Quote from: Col on June 19, 2007, 10:27:01 AM
Hmmm. I made a copy of the default theme, added your code, and the errors do not appear. If I post my Shoutbox template file, would you care to look at it?
i would like to try to. but can't promise if there will come a solution, but trying never hurts ;)
Hi vosje505,
Thanks.
I did make some small chnages to the shoutbox template, so it is worth me posting that rather than you looking at the one that comes with the Ultimate Shoutbox mod.
i've looked into it and i couldnt find it.
but i'm not a codingmiracle myself maybe someone else would like to take a look at it and maybe find it.
i'm sorry col
So does this mod work with SMF 1.1.3 or not?
the mod partial and the code does work in 1.1.3
Quote from: vosje505 on June 10, 2007, 05:18:07 PM
if only your moderators and administrators can lock topics and you do not mind that the name of the moderator stays you could use this code
search in display.template.php for
// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
and replace it with
// Can the user modify the contents of this post?
if (($context['can_lock']) && ($message['modified']['name']['can_lock']))
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
elseif ($message['can_modify'] && ($message['modified']['name']) == ($context['user']['name']))
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
elseif ($message['can_modify'] && empty($message['modified']['name']))
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
it does the job for me. futher support i cant give.
note : this code only works if only the moderators can lock topics
is this working well on 1.1.3? I would like to give a try if so :)
depends on what you exactly want and how the premissions are set up.
but im working with 1.1.3 and it works for me 8) ;D
What I want?
Quoteif a moderator or admin was the last person to edit a post then the owner can not edit the post even if they normally have the rights.
That's all I want... ;)
if your members cant lock topics themself the code will do the job for you ;D
sweet.
i'll give a try :)
it works for me. And i'm on 1.1 RC3.
Thanks vosje505
Quote from: ragots on September 16, 2007, 06:27:19 AM
it works for me. And i'm on 1.1 RC3.
Thanks vosje505
Glad to hear that :D
glad to be of assist to you
I'm using SMF 1.1.4 and it doesn't work with me..
Edit: It works now :P
But I was wondering if there's any way to make the message still editable by guests, just not the text the moderator added..?
I was going to install this mod for SMF 1.1.4, but I get this error:
1. Execute Code add_settings.php
2. Execute Modification ./Sources/Display.php Test failed
3. Execute Modification ./Themes/default/Settings.template.php Test successful
4. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
5. Execute Modification ./Themes/default/Display.template.php Test successful
6. Execute Modification ./Sources/Post.php Test failed
7. Execute Modification ./Sources/Subs-Post.php Test successful
Errors like those simply tell you that another mod you have already installed has edited the files in question and so this mod can't do an automatic installation...you need to do a manual installation instead.
Please read:
http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)
http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)
The following may also prove helpful:
http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)
Mirror of the last link:
http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)
Quote from: TrueSatan on October 11, 2007, 04:30:16 AM
Errors like those simply tell you that another mod you have already installed has edited the files in question and so this mod can't do an automatic installation...you need to do a manual installation instead.
or it simply means the mod was broken in the first place ;-)
There was an endtag missing, and one of the queries is changed in latest SMF + some other changes. Besides that, it didn't get the mod-edit value from the messages table, which means that anyone was still able to modify posts.
Attached is a fixed version, for testing.
is there a way with this mod to block moderator to change admins post lock?
So if a admin lock a post, no one moderator can unlock this post.
Hi. I liked a lot the way vosje505 produce a "soft mod" (I'm talking about THIS (http://www.simplemachines.org/community/index.php?topic=32501.msg1122684#msg1122684)).
and I semplified and improved it this way. INSTEAD of his mod (not apply both them) do this:
search in display.template.php for
// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
and replace it with
// Can the user modify the contents of this post?
if ($message['can_modify'] && (($message['modified']['name']) == ($context['user']['name']) || (empty($message['modified']['name']) || (($message['member']['name']) != ($context['user']['name'])) )))
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
More, don't forget this one, too:
find
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', $message['can_modify'] ? '
and replace with:
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', ($message['can_modify'] && (($message['modified']['name']) == ($context['user']['name']) || (empty($message['modified']['name']) || (($message['member']['name']) != ($context['user']['name'])) ))) ? '
This one has not the previous downside for unusual forum setups where groups other than moderators or admins can lock threads.
I hope you will enjoy this mod. :D
[EDIT]
I fixed my code, that had an error.
Thank you "miseryshining" . but when I install it on 1.1.5 , After successful Install , it destroys Quick Edit (Modify [Ajax]) option in posts . I can't edit any post in "modify" mode . In fact, I(normal user) can EDIT a post if Admin is the last person who edited that post .
And "vosje505" , Thank to you for you effort , But when I apply the code you provided , Users Still can Edit/Modify admin/moder edited posts . I just Applied you code and nothing else . [ Users can not EDIT or LOCK any topic as you said]
Where am I wrong ?? plz help .
Thanks "Kar.ma"
I've Added your code and permissions went ok ! but !! again , I've problem with quick modify. It stocks at ... Loading ... . Ajax thing :-( . But anyother editing will be ok for Admin and Users can't Edit . Just that ^%#^$ ajax thing !!!
Any Solution ?
Hi Atthar, I don't know why you have this problem, it seems strange since in my forum it's everything OK, even the Quick Edit, and so was with the vosje505 mod.
Did you try this mod in the default template or not?
And, moreover, my last version of the mod:
Search in display.template.php for
// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
and replace it with
// Can the user modify the contents of this post?
($message['can_modify'] && (($message['modified']['name']) == ($context['user']['name']) || ($context['allow_admin'] || empty($message['modified']['name']) || (($message['member']['name']) != ($context['user']['name'])) ))) ?
$can_modify_2 = 1 : 0;
if ($can_modify_2)
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
In the same file search for
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', $message['can_modify'] ? '
and replace with
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', $can_modify_2 ? '
This version produce the following:
- Simple Users can edit their posts unless a mod/admin edit them
- Mod Users can edit their posts unless a mod/admin edit them
- Mod Users can edit others' posts
- Admin can edit every post
Note that Simple and Mod Users can always edit somehow (using my mod or vosje505 one) using a workarond.
Wow ! Thank you kar.ma . I use this code on new and clear install of 1.1.5 . and every thing is OK know . maybe something was wrong with other MODs I have installed.
THANK YOU Very MUCH . You are my hero !!!
You're welcome, I'm very happy I could help you! :D
[EDIT]
I was trying to see your forum http://atthar.com/forum/ but it's unavailable... ?
I tried http://www.atthar.com/ too but with no luck.
Can this be continued for 1.1.6 ?
its almost a MUST on my forums.. please are very disobedient..
let me know, thanks!
Hi protonxl, I cannot help you because I still use old SMF 1.1.4 (I need to upgrade soon!).
Recently, my mod stopped working on some posts, while it was working on them before (don't ask me why), and today I could fix.
This is what I changed.
If you use a clean display.template.php file, search for
// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
and replace it with
// Can the user modify the contents of this post?
if ($message['can_modify'] && (($message['modified']['name']) == ($context['user']['name']) || ($context['allow_admin'] || empty($message['modified']['name']) || (($message['member']['name']) != ($context['user']['name'])) )))
$can_modify_2 = 1;
else $can_modify_2 = 0;
if ($can_modify_2)
echo '
<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a>';
In the same file search for
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', $message['can_modify'] ? '
and replace with
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', $can_modify_2 ? '
Quote from: xXxMetaSoulxXx on October 11, 2007, 03:53:28 AM
I was going to install this mod for SMF 1.1.4, but I get this error:
1. Execute Code add_settings.php
2. Execute Modification ./Sources/Display.php Test failed
3. Execute Modification ./Themes/default/Settings.template.php Test successful
4. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
5. Execute Modification ./Themes/default/Display.template.php Test successful
6. Execute Modification ./Sources/Post.php Test failed
7. Execute Modification ./Sources/Subs-Post.php Test successful
I am using 1.1.7 and I get the same error as the one above. Has anyone installed this manualy in 1.1.7 successfully?
Thanks
To the authors : Could you consider adapt this mod to latest versions - 1.1.8 and 2.0RC1 pls?
Bump for great justice!
How about an updated version for 1.1.x installations?
...and bump again... can anyone help with this?
Heya Live - Resurrecting an ancient post...
Any plans to update this for 2.0? Are you willing to pass on authorship if not?
...bump - *sigh*
Quote from: Kindred on August 08, 2012, 10:56:32 AM
Heya Live - Resurrecting an ancient post...
Any plans to update this for 2.0? Are you willing to pass on authorship if not?
Same question here :( I would love this one but ofc it doesn't work on SMF 2.0.8...
Please update us about this mod... It would be very useful for 2.0.x but never answered in more than 3 years... If you dropped the support please pass on authorship or something, don't let it die like this.
is there any updates for 2.0 available?
I really like how this mod works but it won't work for me
That is because it has not been designed for 2.0.x
Quote from: misaka on February 07, 2017, 03:01:27 PM
is there any updates for 2.0 available?
Will it ever be updated for the 2.0 version?
Probably not, at this point
Quote from: Kindred on February 18, 2017, 09:03:30 PM
Probably not, at this point
How does one get it updated?
Should I make a thread asking for an updated version?
Side note when does this capcha thing die off?
Posting from a tablet
The mod would have to be completely rewritten since the existing license does not allow for this mod or the code for this mod to be redistributed or reused.
Quote from: Kindred on February 21, 2017, 10:38:05 AM
The mod would have to be completely rewritten since the existing license does not allow for this mod or the code for this mod to be redistributed or reused.
Oh
But it is possible though correct?
If someone was willing to completely re-write it from scratch, yes