News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Disable 'last edit by....' for Administrators

Started by Doburpally, May 09, 2011, 07:45:07 PM

Previous topic - Next topic

#Pascal

I've got problem
I'm not shore that this mode coused but it appead after installing it

Problem topic:
http://www.simplemachines.org/community/index.php?topic=455659.0

Need help

#Pascal


Doburpally

#82
I hope that this mod didn't cause that error ???

quick edit ?? could you please pm me the package?

#Pascal

this mod does not delete code from topic.js after uninstalling I suppose


Doburpally

Um, it work's fine on all my test sites. I have lost count how many times I have installed and un-installed the mod and edited all files that it modifies, all goes back to state before mod was installed. :-\

Corrupt file perhaps ???

Iomega0318

#85
I noticed this in my error log.. any ideas?

8: Undefined index: hide_edit
File: /.../Themes/default/Display.template.php (main sub template - eval?)
Line: 1147


After further testing the new changes to this mod cause some side effects such as after installing I lost the ability to save or cancel the post when using the quick modify button, and even after checking the box it will instantly become unchecked and not save it and therefore still shows the "Last Edit"..
UOFreeshards.net
UOFreeshards.net 2.1 Aplha Test Site
"I believe in Christianity as I believe in the sun...
not because I see it but because by it I see everything else."
C.S. Lewis

Heed what I say, for it shall be mentioned only once.

Eclipse16V

Quote from: Ninoslav on October 11, 2011, 09:16:12 AM
8: Undefined index: hide_edit
File: /home/xxx/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 1035

What's this and how to fix it :)
Same problem in 2.0.1

Fix:

<file name="$themedir/languages/Post.english.php" error="skip">
<operation>
<search position="after"><![CDATA[$txt['lock_after_post'] = 'Lock after Post';]]></search>

<add><![CDATA[$txt['hide_edit'] = 'Hide "Last Edit: by"';
]]></add>
</operation>
</file>

<file name="$themedir/languages/Post.english-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[$txt['lock_after_post'] = 'Lock after Post';]]></search>

<add><![CDATA[$txt['hide_edit'] = 'Hide "Last Edit: by"';
]]></add>
</operation>
</file>


replace with:
<file name="$themedir/languages/Modifications.english.php" error="skip">
<operation>
<search position="after"><![CDATA[?>]]></search>

<add><![CDATA[$txt['hide_edit'] = 'Hide "Last Edit: by"';
]]></add>
</operation>
</file>

<file name="$themedir/languages/Modifications.english-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[?>]]></search>

<add><![CDATA[$txt['hide_edit'] = 'Hide "Last Edit: by"';
]]></add>
</operation>
</file>


Then it works without problems and errors on my test forum.
I worked with:
SMF 2 in German

Shop:
SID Giessen

MrMike

Don't know why, but this just doesn't work on my forum. (??)

It has an issue installing to the core theme (which we don't use), but other than that it doesn't report any errors. Clicking the "hide last edit" box doesn't seem to make any difference.

Doburpally

#88
I'm sorry, I'm now back from my holiday 8)

Quote from: Eclipse16V on October 18, 2011, 07:00:54 AM
Quote from: Ninoslav on October 11, 2011, 09:16:12 AM
8: Undefined index: hide_edit
File: /home/xxx/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 1035

What's this and how to fix it :)
Same problem in 2.0.1

Fix:

<file name="$themedir/languages/Post.english.php" error="skip">
<operation>
<search position="after"><![CDATA[$txt['lock_after_post'] = 'Lock after Post';]]></search>

<add><![CDATA[$txt['hide_edit'] = 'Hide "Last Edit: by"';
]]></add>
</operation>
</file>

<file name="$themedir/languages/Post.english-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[$txt['lock_after_post'] = 'Lock after Post';]]></search>

<add><![CDATA[$txt['hide_edit'] = 'Hide "Last Edit: by"';
]]></add>
</operation>
</file>


replace with:
<file name="$themedir/languages/Modifications.english.php" error="skip">
<operation>
<search position="after"><![CDATA[?>]]></search>

<add><![CDATA[$txt['hide_edit'] = 'Hide "Last Edit: by"';
]]></add>
</operation>
</file>

<file name="$themedir/languages/Modifications.english-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[?>]]></search>

<add><![CDATA[$txt['hide_edit'] = 'Hide "Last Edit: by"';
]]></add>
</operation>
</file>


Then it works without problems and errors on my test forum.

Actually it's best to use <search position="end"></search> to tell the mod to append the additions to Modifications.english.php
That way if the file does not have ?> it won't get any errors ;).

The old code worked on a (Vanilla install of 2.0.1) No mods installed what so ever, no custom themes installed what so ever. >:(

If this mod does not install for a custom theme then you will have to manually edit files that failed during the install.

I think this mod fails on the Core Theme. :-\

If the new edits prove to be better than the old, I'll add it to the package and I'll upload to the mod database.
Post.english.php should still work ???

owg

I have almost the same problem, but the error message is slightly different:

Apply Filter: Only show the error messages of this URL
http://xxxxx/index.php?topic=2539.msg46116;topicseen
Apply Filter: Only show the errors with the same message
    8: Undefined index: hide_edit
Apply Filter: Only show the errors from this file
File: /home/xxxx/public_html/forums/Themes/default/Display.template.php
Line: 839

reaper, I've looked in Display.template.php for the code you listed, and it is not there - however the mod seems to work fine.  The error message only appears for any admin account, and with each post an admin reads.

Any ideas?  ???

Doburpally

Quote from: owg on October 28, 2011, 12:37:11 PM
I have almost the same problem, but the error message is slightly different:

Apply Filter: Only show the error messages of this URL
http://xxxxx/index.php?topic=2539.msg46116;topicseen
Apply Filter: Only show the errors with the same message
    8: Undefined index: hide_edit
Apply Filter: Only show the errors from this file
File: /home/xxxx/public_html/forums/Themes/default/Display.template.php
Line: 839

reaper, I've looked in Display.template.php for the code you listed, and it is not there - however the mod seems to work fine.  The error message only appears for any admin account, and with each post an admin reads.

Any ideas?  ???

Sorry for late reply, been busy.

Could you please attach display.template.php to your post, I'll have a quick look at it

owg

No worries - I know all about being a bit too busy :-)

Thanks for taking a look

Doburpally

Your Display.template.php file is okay, well, with my mod.
I haven't looked all the way through it, only the edits that my mod does.

I'll need to see your other files:
  • Post.template.php
  • Subs-Post.php found in Sources
  • index.css for your theme that you are using
  • topic.js
  • Post.english.php
If one needs fixing, I'll post the fixed files in a post ;)

Doburpally

Okay, try this, if it work's, please let me know. I'll add it to the main package and upload it.

owg

Sorry - have not been able to do much lately - the file is not downloading as a zip - it saves as index.php - OK to just change the extension?

Doburpally

Quote from: owg on November 15, 2011, 06:04:50 PM
Sorry - have not been able to do much lately - the file is not downloading as a zip - it saves as index.php - OK to just change the extension?

I have tested this on IE and it works fine, however, I have downloaded and installed firefox and I do get your problem.

It's simple enough to right click on the download and click Save link as, give it a name with the extension .zip.
It would be fine

owg


Gotipe

When using this, if I as an admin edit some guy's post, does the previous Edited by.. of that post also disappear or is it just my new Edited by admin that's ignored?
I wonder since it owuld be very convenient to have it just ignore my edit and leave everything else seem untouched. :P

Doburpally

If the post has 'Last edit by' and you attempt to edit it and checking the box for Hide Last Edit By. The line always have Last edit by...

The only way to hide that now is to turn off Editing of posts completely, which sends this mod useless.

Admin > Configuration > Current Theme
Look for "Show last modification date on modified posts:" and UN-check the box.

Sheda

Quote from: Gotipe on December 03, 2011, 12:33:46 PM
When using this, if I as an admin edit some guy's post, does the previous Edited by.. of that post also disappear or is it just my new Edited by admin that's ignored?
I wonder since it would be very convenient to have it just ignore my edit and leave everything else seem untouched. :P
This is how it works, the old edit stays in place. ^^
In general, once an edit is there, you can't change it with this mod. Be it someone elses or your own edit. ;)

Advertisement: