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

Gotipe

It seems not to hide any previous Last edit by but, indeed, just ignore the specific edit at hand by an admin if ticked, which is exactly what I wanted! :)
I interpreted it first, by the screenshots offered, as it would completely remove the Last edit by.. text. :P

Sheda

It used to do that, but now it works differently.
Hm... maybe the first screen is an old one (i really don't know). Anyway...
Maybe one or two new screens or a bit more explanation might be added to the description? :P
Sorry Reaper >.<

Doburpally

Yes, indeed, I have checked the screen shot and it is from the old Last Edit by method, (v1.6)

When I find more time I will change the description a bit more ;)

MaXiForum.cz

Hello,
nice mod but in the version 1.7 is bug!
Info there:
www.simplemachines.org/community/index.php?topic=462029.msg3226210#msg3226210
Version 1.6 works :-)

Sheda

Hm... when did you download that one? I think there was such a bug once and it was fixed by the Reaper.
Just to be certain.

zarzonis

when i install the mod the edited by admin message isn't shown at all. i want to hide the message only when i choose the Hide "Last Edit: by" option from Attachments and other options. is there any bug or i don't do it right?

Sheda

Same question: Are you sure that you have the newest version?
If you do, there must be something going wrong. :-\

[Lucien]

Is it possible to add this function for Global Moderators?  :)

This is a very nice mod!
I'm using SMF 2.0.2 and SimplePortal 2.3.4

Doburpally

Quote from: MaXiForum.cz on December 11, 2011, 09:37:55 AM
Hello,
nice mod but in the version 1.7 is bug!
Info there:
www.simplemachines.org/community/index.php?topic=462029.msg3226210#msg3226210
Version 1.6 works :-)

Hmm that's really odd. Are you sure it's my mod?
As Sheda has said, have you downloaded my newer file? Try re-downloading it ;)

Quote from: [Lucien] on December 19, 2011, 02:30:46 PM
Is it possible to add this function for Global Moderators?  :)

This is a very nice mod!

I will have to look in to that ;)

I'll try looking for is_admin  and try using "$allowed_groups = array(1, 2);"
If I use "$allowed_groups = array(1, 2);", not everyones forums are the same, I mean they all don't use the same Member Id's.

Based on Default forum:
1 = Admin
2 = Global Moderator

If the forum doesn't have Member ID 2, it will have an error.

I'll post back with my progress

MaXiForum.cz


[Lucien]

Quote from: Reaper.CSF. on December 20, 2011, 01:44:25 AM

Quote from: [Lucien] on December 19, 2011, 02:30:46 PM
Is it possible to add this function for Global Moderators?  :)

This is a very nice mod!

I will have to look in to that ;)

I'll try looking for is_admin  and try using "$allowed_groups = array(1, 2);"
If I use "$allowed_groups = array(1, 2);", not everyones forums are the same, I mean they all don't use the same Member Id's.

Based on Default forum:
1 = Admin
2 = Global Moderator

If the forum doesn't have Member ID 2, it will have an error.

I'll post back with my progress

Wow that's nice! It would be great if you succeed with this!  ;D
I'm using SMF 2.0.2 and SimplePortal 2.3.4

Doburpally

Quote from: MaXiForum.cz on December 20, 2011, 04:24:49 AM
Yea this mod :-)
Version 1.6 works :-)

What forum language are you using in your forum?

Do you see any error's during install of this mod?

andershz

I had a lot of errors like below in my error log:

http://example.com/index.php?topic=1.0
8: Undefined index: hide_edit
File: /var/www/clients/client1/web2/web/Themes/default/Display.template.php
Line: 837

Adding the line below to Themes/default/languages/index.english.php solved it:
$txt['hide_edit'] = 'Hide "Last Edit: by"';
This is the same text the mod adds to Themes/default/languages/Post.english.php

If there are more languages installed the modification must be made to all the corresponding language files.

MaXiForum.cz

Quote from: Reaper.CSF. on December 20, 2011, 10:37:09 AM
Quote from: MaXiForum.cz on December 20, 2011, 04:24:49 AM
Yea this mod :-)
Version 1.6 works :-)

What forum language are you using in your forum?

Do you see any error's during install of this mod?

1. Czech  - www.maxiforum.cz
2. No ;)

Doburpally

Quote from: andershz on January 14, 2012, 12:32:09 PM
I had a lot of errors like below in my error log:

http://example.com/index.php?topic=1.0
8: Undefined index: hide_edit
File: /var/www/clients/client1/web2/web/Themes/default/Display.template.php
Line: 837

Adding the line below to Themes/default/languages/index.english.php solved it:
$txt['hide_edit'] = 'Hide "Last Edit: by"';
This is the same text the mod adds to Themes/default/languages/Post.english.php

If there are more languages installed the modification must be made to all the corresponding language files.

Interesting concept, I have made a newer package here Reply #93
The new change to that package is the change from post.english.php to Modifications.english.php.

I have not uploaded that newer package because I forgot.

However, I will remove the current v1.7 with the newer one.
I am working on v1.8 which is going back the original concept. (v1.6)
However, I am working on implementing the enable / disable feature in v1.1.x admin cp.

So far the admin controls will be in Admin CP > Features and Options > Basic Features.

Quote from: MaXiForum.cz on January 14, 2012, 01:33:07 PM
1. Czech  - www.maxiforum.cz
2. No ;)

Have you tried the package in this topic here Reply #93

Inti31

hmmh - I am still using v1.6

I have this error message in the log:

2: in_array(): Wrong datatype for second argumentDatei: /var/customers/webs/xxxxxx/Sources/Post.php
line: 1978


line 1978

// Have admins allowed people to hide their screwups?
==>1978:

if (!$modSettings['enable_disable_last_edit_by'] || (in_array(1, 2, $user_info['groups'])) && (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member']))



Any idea -  the mod itself works fine

cheers Inti31
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

Doburpally

Quote from: Inti31 on February 10, 2012, 04:35:23 AM
hmmh - I am still using v1.6

I have this error message in the log:

2: in_array(): Wrong datatype for second argumentDatei: /var/customers/webs/xxxxxx/Sources/Post.php
line: 1978


line 1978

// Have admins allowed people to hide their screwups?
==>1978:

if (!$modSettings['enable_disable_last_edit_by'] || (in_array(1, 2, $user_info['groups'])) && (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member']))



Any idea -  the mod itself works fine

cheers Inti31

Oh! I believe I've upped the wrong 1.6
I'll look in to that later.

In Post.php
Find:
if (!$modSettings['enable_disable_last_edit_by'] || (in_array(1, 2, $user_info['groups'])) && (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member']))

Replace with:
if (!$modSettings['enable_disable_last_edit_by'] || (!$user_info['is_admin']) && (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member']))

That should fix that issue, I have found that error + not compatible with others.
Doing the above should fix that error and you will loose out on Global Moderators being able to hide their edits as well.

Inti31

@Reaper.CSF. - glad that I could inform you about that issue  :) - and thx for that fix - will keep an eye to the errorlog if this message is gone...

cheers Inti31
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

Ron_W

Tried your 1.7 version and installed ok but didnt work. Tried a manual install incase something got over looked and still doesn't work.

The error log is saying Undefined Index: hide_edit this is in the Display.template.php This is the line code error




', ($user_info['is_admin'] ? '<input id="check_hide_qedit" type="checkbox" name="hide_modify" /><label for="check_hide_qedit">' . $txt['hide_edit'] . '</label>' : ' ') . ',



What am I missing here something is missing lol

Sheda

Sounds like for some reason you don't have the text for hide_edit in your Theme/default/languages/Post.english.php.
You should go there and take a look...

Although wait. You're using 1.7, then you should uninstall it for now and either use 1.6 (but beware, it works very differently) or wait a few days/maybe a week more. There are still some bugs in the version up here and the debugged version has not yet been approved, as well... it's a bit complicated, but i've submitted it as a mod of its own.

If you want you can fix this error now, by manually adding $txt['hide_edit'] = 'Hide "Last Edit: by"'; to your Post.english.php, but the mod will screw up your quick modify (when you use the small pen below your post to edit it instead of the one above the post).
It's your decision for now, sorry for the inconvenience. :-\

Advertisement: