Request "last edited" feature

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Suggested Hosts
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20431
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Request "last edited" feature

Post by RMcGirr83 » Wed Nov 22, 2017 7:09 pm

accs-p wrote:
Wed Nov 22, 2017 6:55 pm
This has been placed into the Ideas forum as a suggestion, along with the above code change.

viewtopic.php?f=436&t=2447161
The term moderator is a hardocded language term so your idea will never be realized the way you have it now.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

accs-p
Registered User
Posts: 42
Joined: Sun Nov 05, 2017 4:08 pm

Re: Request "last edited" feature

Post by accs-p » Wed Nov 22, 2017 7:21 pm

Tarantino wrote:
Wed Nov 22, 2017 7:02 pm
It's better to use at least an if. If the user group of the user that edit the post is an moderator then display moderator else normal phpbb code.
If someone other than the original poster edits a post, they'd need to have some sort of Moderation capabilities (Moderative permissions -> Post actions -> Can edit posts). That ability, more than whatever group(s) they're in, makes them a Moderator.

accs-p
Registered User
Posts: 42
Joined: Sun Nov 05, 2017 4:08 pm

Re: Request "last edited" feature

Post by accs-p » Wed Nov 22, 2017 7:31 pm

RMcGirr83 wrote:
Wed Nov 22, 2017 7:09 pm
accs-p wrote:
Wed Nov 22, 2017 6:55 pm
This has been placed into the Ideas forum as a suggestion, along with the above code change.

viewtopic.php?f=436&t=2447161
The term moderator is a hardocded language term so your idea will never be realized the way you have it now.
Instead of:

Code: Select all

$display_username = "Moderator";
I believe you're suggesting something like:

Code: Select all

$display_username = $user->lang("MODERATOR");
Would that work better?

Sorry, I'm new to PHP and to phpBB. It's not a shallow learning curve.

User avatar
Tarantino
Registered User
Posts: 423
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: Request "last edited" feature

Post by Tarantino » Wed Nov 22, 2017 7:31 pm

No, you're wrong. :lol: It can be administrator too. And for me the admin should see everything. If you put someone else except the poster the admin will not see who edited.

;)

accs-p
Registered User
Posts: 42
Joined: Sun Nov 05, 2017 4:08 pm

Re: Request "last edited" feature

Post by accs-p » Wed Nov 22, 2017 7:43 pm

Tarantino wrote:
Wed Nov 22, 2017 7:31 pm
It can be administrator too. And for me the admin should see everything. If you put someone else except the poster the admin will not see who edited.
I'm using the Post Edit Log extension, so I didn't concern myself with that, but you're right.

What should I look for? The edit log (through the Post Edit Log extension) is available to anyone with the Can see the edit log permission, but that permission is added by the extension, so I can't piggyback on it. I think the best permission I can use is the Can edit posts permission. Alas, I have no idea as to how to check for that ... yet.

EDIT:

Perhaps also check for the Can alter moderator permission class permission, which is part of the Administrator role?

User avatar
Tarantino
Registered User
Posts: 423
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: Request "last edited" feature

Post by Tarantino » Wed Nov 22, 2017 7:50 pm

Just check with this

if ($auth->acl_getf_global('m_')) {
Display here the moderator text
}
Else{
Original phpbb code
}

Sorry but I'm on my phone

Ps: this is nothing to do with post edit log. Forget it about it xD

accs-p
Registered User
Posts: 42
Joined: Sun Nov 05, 2017 4:08 pm

Re: Request "last edited" feature

Post by accs-p » Wed Nov 22, 2017 8:15 pm

That change works great. I combined it with the language suggestion from RMcGirr83 and posted it into the suggestion (viewtopic.php?f=436&t=2447161).

I think we now have a clean tweak that anyone can apply and have work properly. With the exception of a configuration option (under ACP -> GENERAL -> BOARD CONFIGURATION -> Post settings), it's ready for real testing.

Thanks all :D

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: Brf, sfzeller and 14 guests

cron