Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • outlaw77 Friend
    #156627

    Is it possible to add AM and PM to the comment time?

    nghiatd Friend
    #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 :-*

    max power Friend
    #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
    #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.

    max power Friend
    #378355

    Thanks, that worked

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 3 voices, and was last updated by  max power 13 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum