ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Revision Author vs Entry Author

June 09, 2011 12:55pm

Subscribe [4]
  • #1 / Jun 09, 2011 12:55pm

    Te3d

    17 posts

    This may be a ‘newbie’ question, but I haven’t tripped across the answer yet when doing some quick searches…

    What is the easiest way to display the author of the latest revision of an entry (Revisions are turned ‘on’) instead of the original entry creator/author?

    Thanks,

    Ted

  • #2 / Nov 11, 2011 10:15am

    What we ended up doing was replacing line 1139 on the controller:

    system_dir\expressionengine\controllers\cp\content_publish.php

    with:

    $data[‘author_id’] = $this->session->userdata(‘member_id’);

    to always update edited posts with the current author’s id so that the author tag will always give you the last person who touched the file. With revisions enabled we can see the last 10 revisions as well so its a good way to keep tabs on each entry.

    I know it’s editing the core controllers, maybe someone has a nicer solution using a hook or extension?

    Hope it helps.

    Ryan

  • #3 / Nov 11, 2011 3:16pm

    I don’t know of any plugins for that so the best option may be the query module. This isn’t tested but after a quick look SQL like the following should work…

    SELECT M.username, M.screen_name FROM exp_entry_versioning V LEFT JOIN exp_members M ON M.member_id = V.author_id WHERE entry_id = {entry_id} ORDER BY version_id DESC LIMIT 1

  • #4 / Oct 14, 2013 1:49am

    Bhashkar Yadav

    727 posts

    I developed a plugin “Entry Revisions”. Hope it would useful for someone having same need. One can download from here: http://www.sidd3.com/entry-revisions-plugin/

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases