test
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • corticalcolumn Friend
    #172253

    Dear,

    I have issue with last update module. Hours and minutes don’t change – there is the same hour all the time. Can you help me to fix it?

    Thank you.

    http://www.kompresja.pl/www


    1. lastupdateerror
    gray Friend
    #431765

    Update time is based on date & time of article’s creation (articles are taken from jos_content table). So, if you update an article, it’ll not change. Also, if you keep your articles in other tables (like K2 component) it will not update also. Moreover, it seems you modified contstant T3_DATE_FORMAT_LASTUPDATE from en-GB.plg_system_jat3.ini file and/or function getLastUpdate from jat3corecommon.php. Please copy the constant and the function on the forum to check them.

    corticalcolumn Friend
    #431792

    thank you for quick reply, can you let me know exactl location of that file? i can’t see ja3 directory at all…
    if i have everything under k2, so that module wouldn’t work? if so, how to remove it?
    yes, i changed english version for polish translation…

    gray Friend
    #431794

    function getLastUpdate – in /plugins/system/jat3/jat3/core/common.php
    T3_DATE_FORMAT_LASTUPDATE in /administrator/language/en-GB/en-GB.plg_system_jat3.ini

    To remove the last update info bar at the top, find & remove in /templates/ja_teline_iv/blocks/topbar.php
    <p class=”ja-updatetime”><span><?php echo JText::_(‘LAST_UPDATE’)?></span><em><?php echo T3Common::getLastUpdate(); ?></em></p>
    If it creates some layout problems, do not remove <p> tag, so replace the above code with
    <p class=”ja-updatetime”> </p>

    If you use K2, the function getLastUpdate should be modified, as it looks for Joomla content table.

    corticalcolumn Friend
    #431805

    thank you information. so, could you modify that fuction for me to work with K2, please?

    gray Friend
    #431824

    <em>@corticalcolumn 291951 wrote:</em><blockquote>thank you information. so, could you modify that fuction for me to work with K2, please?</blockquote>
    in function getLastUpdate from /plugins/system/jat3/jat3/core/common.php
    find (around line 1072)
    [PHP]$query = “SELECT `$fieldname` FROM #__content a ORDER BY `$fieldname` DESC LIMIT 1”;[/PHP]
    replace with
    [PHP]$query = “SELECT `$fieldname` FROM #__k2_items ORDER BY `$fieldname` DESC LIMIT 1”;[/PHP]

    corticalcolumn Friend
    #431825

    i think it is working, at least hour changed 🙂 i will publish new item tomorrow to confirm
    is it taking time of the server or publishing time?

    gray Friend
    #431830

    It takes cretion time, with server time offset.
    As I’ve already mentioned, time fromat is set in constant T3_DATE_FORMAT_LASTUPDATE in /administrator/language/en-GB/en-GB.plg_system_jat3.ini
    by default it’s

    T3_DATE_FORMAT_LASTUPDATE="%I:%M:%S %p"

    you can change it to

    T3_DATE_FORMAT_LASTUPDATE="%d.%m.%Y %I:%M"

    to display 20.12.2011 34:33
    consult php strftime for other formats.

    corticalcolumn Friend
    #433245

    works perfectly! thank you for your assistance
    sorry for late reply

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

This topic contains 9 replies, has 2 voices, and was last updated by  corticalcolumn 12 years, 10 months ago.

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