Still seeking date help...
Rate this topic: 1.00 out of 6 based on 1 vote(s)
- GK User
- Sat Feb 22, 2014 3:52 am
- Reply with quote
- Report this post
Hey folks,
It's been a couple of months and I'm still seeking an answer to this:
In Publisher, the article published date displays as simply month and date - how can I get the year to show as well?
Thank you.
It's been a couple of months and I'm still seeking an answer to this:
In Publisher, the article published date displays as simply month and date - how can I get the year to show as well?
Thank you.
-
- Fresh Boarder
- GK User
- Sat Feb 22, 2014 10:06 am
- Reply with quote
- Report this post
Hi,
you have to add "Y" Year tag in article view and change some CSS.
I will check and add you more details...
you have to add "Y" Year tag in article view and change some CSS.
I will check and add you more details...
-
- Platinum Boarder
- GK User
- Sat Feb 22, 2014 10:15 am
- Reply with quote
- Report this post
Few useful tips:
1) Inside: templates/gk_publisher\html\com_content\article\default.php
2) Open in editor and in edit mode find:
You have to add "Y" after "M" (month) :
3) Save changes
4) Override with this style to reduce size of font
1) Inside: templates/gk_publisher\html\com_content\article\default.php
2) Open in editor and in edit mode find:
- Code: Select all
<time datetime="<?php echo JHtml::_('date', $this->item->created, DATE_W3C); ?>">
<?php echo JHtml::_('date', $this->item->created, JText::_('d M')); ?>
</time>
You have to add "Y" after "M" (month) :
- Code: Select all
<?php echo JHtml::_('date', $this->item->created, JText::_('d M Y')); ?>
3) Save changes
4) Override with this style to reduce size of font
- Code: Select all
article > time {font-size: 22px; }
-
- Platinum Boarder
- GK User
- Sat Feb 22, 2014 3:09 pm
- Reply with quote
- Report this post
Thanks for that - certainly helpful (trying it now), but how would I go about adding the year to the date in the article itself - under the article title? It, too, simply shows the month and day in the Publisher template.
-
- Fresh Boarder
- GK User
- Sat Feb 22, 2014 3:28 pm
- Reply with quote
- Report this post
This same file line 106
remove "." before "Y" , must be:
- Code: Select all
<?php echo JHtml::_('date', $this->item->created, JText::_('F j, Y')); ?>
remove "." before "Y" , must be:
- Code: Select all
<?php echo JHtml::_('date', $this->item->created, JText::_('F j Y')); ?>
-
- Platinum Boarder
- GK User
- Sat Feb 22, 2014 3:33 pm
- Reply with quote
- Report this post
Thank you! Very much appreciated
-
- Fresh Boarder
6 posts
• Page 1 of 1