Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Update post date after edit

by 1nickt (Abbot)
on Nov 26, 2018 at 14:21 UTC ( #1226339=monkdiscuss: print w/replies, xml ) Need Help??

Hi all, I propose that the timestamp on a post be updated to the time of the most recent edit.

The original time should also be preserved and used for computing the Best/Worst nodes lists. But if someone edits their post I would like to be able to know that programmatically (ie in RAT, Newest Nodes) rather than having to scan all existing posts to see if an author has added/changed/cribbed something (*if* they declare it).

I will gladly help with implementing these changes if needed.

Thanks!


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re: Update post date after edit
by pryrt (Parson) on Nov 26, 2018 at 14:39 UTC

    I have previously had a similar thought; I'm glad ++you took the important step of acting on the thought, rather than procrastinating like I did :-). It would be nice, when listed in the RAT/Newest Nodes, if such a post highlighted itself somehow (an asterisk or similar) to indicate it's a changed post, rather than a new post.

      ...a post highlighted itself somehow (an asterisk or similar) to indicate...

      I would suggest to tag an updated node using CSS class attribute (i.e. updated) with a sensible site-default:

      <div class="$AS_BEFORE updated"> ... </div>
      Now, every monk can fine-tune the layout using own CSS redefinitions (Help for Display Settings). Something like i.e.
      .updated { border-left: 1px solid red; }
      or
      .updated::before { content: "UPDATED: "; }
      Perhaps add ud-$YYYYMMDD or updated-today or similar for more customisation options?

Re: Update post date after edit
by jdporter (Canon) on Nov 28, 2018 at 17:42 UTC
Re: Update post date after edit
by jdporter (Canon) on Nov 26, 2018 at 19:33 UTC

    Please point me to an example node. tia.

      A couple people sent me some examples via pm. Thank you! It turns out that we currently can't show that a node has been edited, because the fact is not recorded in the database. We have the infrastructure in place to do so -- there is a "last edited" timestamp field associated with every document-type node -- but currently this field is not used for ordinary writeup-type nodes. (It is used for wikis and things like that.) pmdevils, take a look at the lastedit field. Patches welcome. :-)

      I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://1226339]
Approved by davies
Front-paged by erzuuli
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2019-05-20 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (123 votes). Check out past polls.

    Notices?