-
AuthorPosts
-
November 20, 2010 at 5:33 pm #156627
Is it possible to add AM and PM to the comment time?
nghiatd Friend
nghiatd
- Join date:
- October 2009
- Posts:
- 324
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 7
- Thanked:
- 39 times in 37 posts
November 23, 2010 at 5:02 am #363824<em>@outlaw77 204456 wrote:</em><blockquote>Is it possible to add AM and PM to the comment time?</blockquote>
Hi,
It is possible.
1. Uncheck “Enable timestamps”
in link:
administrator/index.php?option=com_jacomment&view=configs&group=layout
for not using timestamps in comment time
2. Edit file
componentscom_jacommentthemesYOUR COMMENT THEMEhtmlcommentsitems.php
Find code:
echo "<span class='comment-date'>". $item->date ."</span>";
Edit to
echo '<span class="comment-date">'. date("F j, Y, g:i a",strtotime($item->date)) .'</span>
Note: If you use override template function, find code in file:
templatesYOUR JOOMLA TEMPLATEhtmlcom_jacommentthemesYOUR COMMENT THEMEhtmlcommentsitems.php
Best Regards :-*February 19, 2011 at 6:56 am #377455<em>@nghiatd 204795 wrote:</em><blockquote>
echo '<span class="comment-date">'. date("F j, Y, g:i a",$item->date) .'</span>
</blockquote>I tried that and the date went from 2010-06-04 19:22:09 to December 31, 1969, 4:33 pm. This makes no sense whatsoever. Probably the same type of problem relating to this post…
http://www.joomlart.com/forums/topic/problem-with-date-stamp-time-since/#post-377444
nghiatd Friend
nghiatd
- Join date:
- October 2009
- Posts:
- 324
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 7
- Thanked:
- 39 times in 37 posts
February 21, 2011 at 5:05 am #377654<em>@max power 222491 wrote:</em><blockquote>I tried that and the date went from 2010-06-04 19:22:09 to December 31, 1969, 4:33 pm. This makes no sense whatsoever. Probably the same type of problem relating to this post…
http://www.joomlart.com/forums/topic/problem-with-date-stamp-time-since/#post-377444</blockquote>
Hello,
Sorry there was mistake in my code:
please edit from
echo '<span class="comment-date">'. date("F j, Y, g:i a",$item->date) .'</span>
to
echo '<span class="comment-date">'. date("F j, Y, g:i a",strtotime($item->date)) .'</span>Best Regards.
-
AuthorPosts
This topic contains 5 replies, has 3 voices, and was last updated by max power 13 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum