Adding the year to the blog date

Business template for Joomla 3 and 2.5 ideal to create blog or personal website.
GK User
Thu Jan 17, 2013 8:33 pm
Hi There
http://www.joomlabookkeeping.com/blog.html
Is it possible to add the year number to the date in any form on the blog date like in the link i have posted.

I have looked and cant see it in the template options.

Many thanks
Ian
User avatar
Fresh Boarder

Konrad M
Fri Jan 18, 2013 8:11 am
Hi, you can achieve that. But tell me where exactly you want to show year ?
User avatar

GK User
Fri Jan 18, 2013 1:27 pm
Hi Konrad
Just under the current date in the same box, so like

18
JAN
2013

Something like that.

Thanks
Ian
User avatar
Fresh Boarder

Konrad M
Fri Jan 18, 2013 10:58 pm
Please go to html/com_content/category/blog_item.php and paste this code:
Code: Select all
<div><?php echo JHTML::_('date', $this->item->publish_up, JText::_('Y')); ?></div>

after:
Code: Select all
<div><?php echo JHTML::_('date', $this->item->publish_up, JText::_('M')); ?></div>
User avatar

GK User
Sat Jan 19, 2013 10:20 am
Thank you very much guys :)

Just for others reading this, the date box expanded too much, so I had to modify line 128 on
/templates/gk_the_real_design/css/joomla.css
and change the padding from 22px to 10px as below.

Code: Select all
.gkDate { position: absolute; float: left; width: auto; height: auto; margin: 3px 0 0 0; padding: 0; background: #151515; text-align: center;  padding: 10px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }


You can see the results here
http://www.joomlabookkeeping.com/blog.html

But honestly, very much appreciated :)
Regards
Ian
User avatar
Fresh Boarder


cron