Thanks for your response!
I’ve seen that before..but, I’m looking to see if there is a way to have that entry show multiple times within the channel entries tag.
For example:
Post A: Created April 1st Post B Post C Post A: Updated April 4th
This might not be possible, but the idea is that I have members updating entries through Safecracker and am looking for a way to have their updates show within the channel entries field.
Thanks again,
Jordan
So it looks like you want to take all the Post entries and sort them by the combined ‘created’ and ‘updated’ fields. Unless someone knows of an add-on that accomplishes this, you’re probably looking at bypassing the template entries loop doing some type of mysql self join (for example http://www.w3resource.com/sql/joins/perform-a-self-join.php ). Or enabling php for your template and setting and sorting arrays from the EE entry output. There may be a way to do this with the Stash add-on https://github.com/croxton/Stash or something similar.
Hi Jordan,
It’s possible with feature of entry revision. So first you need to check “Enable Entry Versioning” from the channel preferences and set the “Maximum Number of Recent Revisions per Entry”.
Now by using the query module you can write the query like:
{exp:query sql="SELECT version_date,
SUBSTRING_INDEX(SUBSTRING_INDEX(version_data,';', 16),':',-1) AS entry_id,
SUBSTRING_INDEX(SUBSTRING_INDEX(version_data,';', 22),':',-1) AS title,
SUBSTRING_INDEX(SUBSTRING_INDEX(version_data,';', 30),':',-1) AS url_title
FROM exp_entry_versioning
WHERE channel_id=1 AND author_id=1
ORDER BY version_date DESC"}
{entry_id} :: {title} :: {url_title} :: {version_date format="%d-%m-%Y"}
{/exp:query}See the channel_id and author_id in the WHERE condition of query. You need to update it accordingly.
Please Note: Above query will work properly for the entries submitted via Safecraker.
I hope, it would help you.
To display when a member edits an entry within the channel:entries tag in ExpressionEngine, you can use the edit_date variable, which shows the date and time of the last edit made to the entry. Here’s how you can incorporate it into your template:
{exp:channel:entries channel="your_channel"}
{if edit_date} Last Edited: {edit_date format="%Y-%m-%d %H:%i:%s"} {/if} {body} {/exp:channel:entries}
In the above example, {edit_date format="%Y-%m-%d %H:%i:%s"} will output the edit date in a format like 2024-06-05 06:34:46. You can customize the date and time format according to your needs using standard PHP date format characters.
For more advanced usage, if you want to track and display a history of edits, you might need to implement additional custom functionality or use an add-on that provides audit trail capabilities.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.