Putting date when editing news

Fuzzy date when editing the news in the database, with several options.
This commit is contained in:
Catalin 2023-03-10 21:24:32 +01:00 committed by GitHub
parent 4ac20a09f7
commit 0a4dce082f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,13 @@
</div>
<div class="card-body">
<p class="card-text">{$news["description"]|noescape}</p>
{if empty(!$news["edited"])}
<p class="text-right">Edited: {strtotime($news["edited"])|fuzzyDateAbbr}</p>
{/if}
{* or you can use with translation and a CSS class for example, creating your css obviously *}
{* <p class="card-edited">{_"NEW_EDITED"}{strtotime($news["edited"])|fuzzyDateAbbr}</p> *}
{* option without fuzzyDate *}
{* <p class="card-edited">{_"NEW_EDITED"}{strtotime($news["edited"])|date:'d/m/Y - H:i'}</p> *}
</div>
</div>
{/foreach}