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)
Scam Warning
accs-p
Registered User
Posts: 42
Joined: Sun Nov 05, 2017 4:08 pm

Request "last edited" feature

Post by accs-p » Wed Nov 15, 2017 7:46 pm

I've looked around (i.e. I ran a few searches) and didn't find this feature. I'd like to see the time that a post was last edited, and who did the editing. Does this exist? Is there anyone willing to write it if it doesn't?

I've seen this feature on arstechnica.com

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20430
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 15, 2017 8:09 pm

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 15, 2017 9:12 pm

RMcGirr83 wrote:
Wed Nov 15, 2017 8:09 pm
viewtopic.php?t=2384176
I was aware of that extension, but it's not supported in phpBB 3.2 and the author doesn't seem very responsive to queries (it seems abandoned to me).

Additionally, I wanted "Registered users" to be able to see at least the edit time. I don't think that's available through this extension.

User avatar
david63
Jr. Extension Validator
Posts: 13129
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Request "last edited" feature

Post by david63 » Wed Nov 15, 2017 9:31 pm

accs-p wrote:
Wed Nov 15, 2017 9:12 pm
it's not supported in phpBB 3.2
Works just fine in 3.2.x
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they 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 » Thu Nov 16, 2017 3:09 am

david63 wrote:
Wed Nov 15, 2017 9:31 pm
accs-p wrote:
Wed Nov 15, 2017 9:12 pm
it's not supported in phpBB 3.2
Works just fine in 3.2.x
I downloaded and installed the extension. It works well, but I need something SLIGHTLY different.

If the user who edits the post is in the "Global moderators" group, I'd like it to list "Moderator" as the user who edited the post. This is to keep the user name of the actual Moderator private from users not in the "Global moderators" group, so that the user doesn't try to do anything "evil" to the Moderator (it's a VERY competitive environment).

While I don't speak PHP, it appears to me that this extension hooks into the Edit function and saves the critical information in a DB table. Could anyone help me make this (hopefully small) adjustment?

EDIT: I also posted in the support forum for the 'Log Post Edit' extension that it works properly in 3.2.

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

Re: Request "last edited" feature

Post by accs-p » Thu Nov 16, 2017 4:48 pm

accs-p wrote:
Thu Nov 16, 2017 3:09 am
If the user who edits the post is in the "Global moderators" group, I'd like it to list "Moderator" as the user who edited the post. This is to keep the user name of the actual Moderator private from users not in the "Global moderators" group, so that the user doesn't try to do anything "evil" to the Moderator (it's a VERY competitive environment).

While I don't speak PHP, it appears to me that this extension hooks into the Edit function and saves the critical information in a DB table. Could anyone help me make this (hopefully small) adjustment?
This morning I realized that the check could be much simpler. All I need to do is compare the user who posted to the user who last edited. If they're different, I could display "Moderator". The problem is that I can't find where this needs to be done. Could someone please point me to the right file? I might be able to figure it out from there.

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 3:19 pm

But with the extension that was shared above, just moderators will be able to see the logs. No normal user will have that permission, so why does you want to show just moderator? Am i missing something?

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 4:56 pm

Tarantino wrote:
Wed Nov 22, 2017 3:19 pm
But with the extension that was shared above, just moderators will be able to see the logs. No normal user will have that permission, so why does you want to show just moderator? Am i missing something?
Yes. Here's a line that a "Registered User" sees on an edited post:
Last edited by forum-admin on Tue Nov 21, 2017 4:28 pm, edited 1 time in total.
I want the time and fact of the edit, but if the editor wasn't the poster, I want it to be "Last edited by Moderator".

The feature request for the Post Edit Log extension is here:
https://www.phpbb.com/customise/db/exte ... pic/185306
Last edited by accs-p on Wed Nov 22, 2017 6:08 pm, edited 1 time in total.

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 5:12 pm

Ahhh, I see now! That should be easy to do (with code edits). Via extension dunno if its that easy.

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 5:18 pm

Tarantino wrote:
Wed Nov 22, 2017 5:12 pm
Ahhh, I see now! That should be easy to do (with code edits). Via extension dunno if its that easy.
If I could find the line to adjust, I might even be able to do it.

Sorry, I don't speak PHP (yet) - I'm an old-school 'C' programmer.

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 5:39 pm

It must be on viewtopic.php ;) I'll take a look soon, when I got some free time.

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 6:16 pm

Tarantino wrote:
Wed Nov 22, 2017 5:39 pm
It must be on viewtopic.php ;) I'll take a look soon, when I got some free time.
That's a step in the right direction. I was looking through the extension, as I thought (incorrectly) that the message came from there.

Digging through the code, it appears that this comes from a block of code starting at about line 1700. If I understand what I'm reading correctly, it should be trivial to modify, even for me :D

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 6:25 pm

accs-p wrote:
Wed Nov 22, 2017 6:16 pm
Tarantino wrote:
Wed Nov 22, 2017 5:39 pm
It must be on viewtopic.php ;) I'll take a look soon, when I got some free time.
That's a step in the right direction. I was looking through the extension, as I thought (incorrectly) that the message came from there.

Digging through the code, it appears that this comes from a block of code starting at about line 1700. If I understand what I'm reading correctly, it should be trivial to modify, even for me :D
IT WORKED!!!!

Lines 1705 and 1724 used to be:

Code: Select all

$display_username = get_username_string('full', $row['post_edit_user'], $post_edit_list[$row['post_edit_user']]['username'], $post_edit_list[$row['post_edit_user']]['user_colour']);
$display_username = get_username_string('full', $row['post_edit_user'], $user_cache[$row['post_edit_user']]['username'], $user_cache[$row['post_edit_user']]['user_colour']);
These lines were commented out and the following line was inserted after them:

Code: Select all

$display_username = "Moderator";
Thanks :D

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 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

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:02 pm

That doesn't seem the best approach xD
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.

You can do it. Believe in me that believes in you. XD

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: Bing [Bot], Holger and 12 guests

cron