By romagromov on Wednesday, 03 June 2015
Posted in Technical Issues
Likes 0
Views 711
Votes 0
Hi!
How to enable Last-Modified and If-Modified-Since headers in EasyBlog?
For example, if I updated blog enrty — page should display Last-Modified header.
Thanks.
You can replace this following code so it will show created and modified date on entry page.


<?php if ($this->entryParams->get('post_date', true)) { ?>
<div class="eb-entry-date">
<i class="fa fa-clock-o"></i>
<time class="eb-meta-date" itemprop="datePublished" content="<?php echo $post->getCreationDate('created')->format(JText::_('DATE_FORMAT_LC4'));?>">
<?php echo $post->getDisplayDate('created')->format(JText::_('DATE_FORMAT_LC1')); ?>
<meta itemprop="dateModified" content="<?php echo $post->getModifiedDate()->format(JText::_('DATE_FORMAT_LC4'));?>"/>
<meta itemprop="mainEntityOfPage" content="<?php echo $post->getPermalink(true, true);?>"/>
</time>
</div>
<?php } ?>

<?php if ($this->entryParams->get('post_date', true)) { ?>
<div class="eb-entry-date">
<i class="fa fa-clock-o"></i>
<time class="eb-meta-date" itemprop="datePublished" content="<?php echo $post->getCreationDate('modified')->format(JText::_('DATE_FORMAT_LC4'));?>">
<?php echo $post->getDisplayDate('modified')->format(JText::_('DATE_FORMAT_LC1')); ?>
<meta itemprop="dateModified" content="<?php echo $post->getModifiedDate()->format(JText::_('DATE_FORMAT_LC4'));?>"/>
<meta itemprop="mainEntityOfPage" content="<?php echo $post->getPermalink(true, true);?>"/>
</time>
</div>
<?php } ?>
·
Saturday, 04 February 2017 13:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi romagromov,

You can enable the setting from your backend > Easyblog > themes > select your current theme > Show last modified date

Hope this help.

If still not appear, can you provide us with your Joomla backend and FTP access so we can help you check on this?
·
Wednesday, 03 June 2015 18:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks, but I mean Last-Modified headers for search engines.

This is tool for checking headers:

http://last-modified.com/
·
Wednesday, 03 June 2015 21:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi romagromov,

Unfortunately that was not possible in current system.
·
Thursday, 04 June 2015 01:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi romagromov,

You can enable the setting from your backend > Easyblog > themes > select your current theme > Show last modified date


I'm guessing this setting is no longer available as described? I want to show both the published date and modified date in the entry view for each post. I don't have such a setting under easyblog > themes > my theme
·
Friday, 03 February 2017 05:27
·
0 Likes
·
0 Votes
·
0 Comments
·
If you asking for Easyblog 5 setting, it located at backend > Easyblog > setting > layout > post option > post date , you can refer on my attached screenshot below.

But unfortunately that was not possible to populate both published and modified date time from the entry page.

You have to modify on this file JoomlaFolder/components/com_easyblog/themes/wireframe/blogs/entry/default.php by yourself.

Hope this will help.
·
Friday, 03 February 2017 10:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Right, that makes perfect sense. I'm familiar with the code you are referring to, but (to me), it seems to be checking for which date is used as the source. In my case, the creation date is the source. How can the code be modified so that it will also display the modified date, while still using the created date as the source?


<?php if ($this->entryParams->get('post_date', true)) { ?>
<div class="eb-entry-date">
<i class="fa fa-clock-o"></i>
<time class="eb-meta-date" itemprop="datePublished" content="<?php echo $post->getCreationDate($this->entryParams->get('post_date_source', 'created'))->format(JText::_('DATE_FORMAT_LC4'));?>">
<?php echo $post->getDisplayDate($this->entryParams->get('post_date_source', 'created'))->format(JText::_('DATE_FORMAT_LC1')); ?>
<meta itemprop="dateModified" content="<?php echo $post->getModifiedDate()->format(JText::_('DATE_FORMAT_LC4'));?>"/>
<meta itemprop="mainEntityOfPage" content="<?php echo $post->getPermalink(true, true);?>"/>
</time>
</div>
<?php } ?>
·
Friday, 03 February 2017 22:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Perfect. Worked like a charm. Thank you.
·
Tuesday, 07 February 2017 04:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome. Glad to hear that your issue has been resolved now.

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Tuesday, 07 February 2017 10:16
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post