Hi, is there a way to make an icon appear in the title when an article has been updated?
Thanks
Thanks

<?php $updated = ($this->item->modified) ? true : false; ?><?php $updated = ($this->item->modified) ? true : false; ?>
<?php if ($updated): ?>
<b>The article was recently updated!</b>
<?php endif; ?>Edited 7 years 3 months ago by Chris Hogan
<?php
// First check if the item was modified/updated at all
$isUpdated = ($this->item->modified) ? true : false;
if ($isUpdated) {
// The item is recently updated, so get it's modified date and convert to a unix timestamp
$dateModified = strtotime($this->item->modified);
// Get the current time as a unix timestamp
$now = time();
// Calculate the difference in days
$diff = ($now - $dateModified)/(3600 * 24);
// Check if the difference is less than 2 days & output some message
if ($diff < 2) {
echo '<span>Item was recently updated!</span>';
}
}
?>Edited 7 years 3 months ago by JoomlaWorks
Edited 7 years 3 months ago by Chris Hogan
<?php if($this->item->params->get('catItemFeaturedNotice') && $this->item->featured): ?>
<!-- Featured flag -->
<span>
<sup>
<?php
// First check if the item was modified/updated at all
$isUpdated = ($this->item->modified) ? true : false;
if ($isUpdated) {
// The item is recently updated, so get it's modified date and convert to a unix timestamp
$dateModified = strtotime($this->item->modified);
// Get the current time as a unix timestamp
$now = time();
// Calculate the difference in days
$diff = ($now - $dateModified)/(3600 * 24);
// Check if the difference is less than 2 days & output some message
if ($diff < 14) {
echo '<span>Recently Updated!</span>';
}
}
?>
</sup>
</span>
<?php endif; ?>
</h3>
<?php endif; ?>
Log in or create an account to reply.