the left-side date box in joomla blog view

Professional Joomla social template with metro design and JomSocial extension support.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Feb 17, 2014 3:06 pm
Reply with quote
Report this post
Hi,

I read lotst of posts about date format setting, but still cannot find where to change settings to get the left-side date box to display the year.
I am using a joomla blog menu at [url]http:www.onderzoekspraktijk.nl/blog.html[/url]

Th date is set to the left of the article title, and also just below the article title. Both are incomplete: without the year.
I looked in the overrides but cannot find an override for this blog view.

Where do I have to change the dat code?

Thanks,
Paul
User avatar
Expert Boarder

GK User
Thu Feb 20, 2014 8:49 am
Reply with quote
Report this post
The left date is visible only when your screen width is bigger than 1100px (as I remember) and of course it is working in default article or K2 view. Could you provide me URL to your website to look at this issue?
User avatar
Platinum Boarder

GK User
Thu Feb 20, 2014 8:51 am
Reply with quote
Report this post
The mentioned date element is generated in this file:
templates/gk_msocial/html/com_k2/templates/default/item.php
by this line;
Code: Select all
<time datetime="<?php echo JHtml::_('date', $this->item->created, JText::_(DATE_W3C)); ?>"><?php echo JHTML::_('date', $this->item->created, JText::_('j')); ?><span><?php echo JHTML::_('date', $this->item->created, JText::_('M')); ?></span></time>

This part should interest you:
Code: Select all
<?php echo JHTML::_('date', $this->item->created, JText::_('j')); ?>
<span><?php echo JHTML::_('date', $this->item->created, JText::_('M')); ?></span>

You would need to add adidional line after it:
Code: Select all
<?php echo JHtml::_('date', $this->item->created, JText::_('Y')); ?>

to print out year. Also some html tags and styling will be required to make it look fine.

The final php line that prints day, month and year might look this way:
Code: Select all
<time datetime="<?php echo JHtml::_('date', $this->item->created, JText::_(DATE_W3C)); ?>"><?php echo JHTML::_('date', $this->item->created, JText::_('j')); ?><span><?php echo JHTML::_('date', $this->item->created, JText::_('M')); ?></span><spanclass="year"><?php echo JHtml::_('date', $this->item->created, JText::_('Y')); ?></span></time>
User avatar
Moderator

GK User
Thu Feb 20, 2014 4:18 pm
Reply with quote
Report this post
Hi,

Thank you for your feed-back.

I gave the site url already: it is this www.onderzoekspraktijk.nl/blog.html

This is a j2.5 site, with joomla articles in a blog view: so no K2.

I tried the code in the K2 spot: but that does not work to change the joomla article layout.
I tried again finding the correct override spot, and found two possible locations, tried the code there, but that also doesn not change the layout of the articles.

So could you look again at this issue, and avice where to change the code.

Thank you.

Greetings,
Paul
User avatar
Expert Boarder

GK User
Sat Feb 22, 2014 11:18 am
Reply with quote
Report this post
The files you should edit:
templates/gk_msocial/html/com_content/featured/default_item.php
templates/gk_msocial/html/com_content/archive/default_items.php
templates/gk_msocial/html/com_content/category/blog_item.php
templates/gk_msocial/html/com_content/article/default.php
Just please correct only the line that I have mentioned in first repaly, not any other.
User avatar
Moderator


cron