I am trying to find a way to view the last edit date of entries while in the control panel. I haven't found an EE2 plug-in or module, and have no idea of any other way to do it. Does anyone have any ideas?

I basically need to make sure I am not overriding any database info a user has entered when I import a new database from the staging site with changes.

up vote 20 down vote accepted

Zenbu will let you filter entries by edit_date (similar to the Edit page in ExpressionEngine, see screenshot below).

enter image description here

If you don't want to use an add-on you could run a MySQL query to check the edit_date in exp_channel_titles. Something like:

SELECT entry_id, title, DATE_FORMAT(edit_date, '%m-%d-%Y-%k:%i') AS updated
FROM exp_channel_titles
ORDER BY edit_date DESC LIMIT 50

This above just returns a list of entries along with the edit date, with the most recently edited entry listed first. You can easily run this query in the EE Control Panel using the Database Query Form, or with an application like Sequel Pro or Navicat.


Note that there will likely be other data besides the edit date entry data you'd want to check before you import a copy of the staging database (changes in categories, members, and comments for example). But if you know for sure that the only data changing on your staging site is entries then you should be good just checking edit_date.

  • I was just going to post about Zenbu. – CreateSean Dec 3 '12 at 19:52
  • Thank you very much :) I will test out Zenbu and see how it goes this week. I would prefer to avoid SQL queries even tho I would only need to check entries (nothing else is edited by the other users). – Alexa L Dec 3 '12 at 20:12

If you want to do it yourself without installing anything or using SQL, this code in a template will display the most recent 5 entries and when they were edited:

{exp:channel:entries limit="5" orderby="edit_date" sort="desc" dynamic="no"}
    {edit_date format="%Y %m %d - %g:%i:%s"}: {title} ({relative_date})
{/exp:channel:entries}

The {relative_date} tag is kind of cool and also gratuitous here :)

  • Thank you, but I needed to view it in the control panel, not on a page on the front end. – Alexa L Dec 12 '12 at 20:07

If you don't care about the created date at all, you could conceivably write an extension which runs every time an entry is saved, and syncs the created date with the edit date.

That would avoid hacking the core, and would show the date you need in the control panel. It does mean you will forever lose the created date though.

  • I used Zenbu. I don't write extensions or modules. (not much of a php person) lol – Alexa L Apr 18 '13 at 20:53
  • Fair enough. Zenbu is definitely the easiest option. – Adrian Macneil Apr 19 '13 at 5:39

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.