test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • teletrance Friend
    #160371

    Hi, I would like to change Las update function with current time in teline IV. can you tell please what php code should change?
    thanks!

    teletrance Friend
    #377366

    hm, solved: 🙂 in /templates/ja_teline_iv/blocks/topbar.php replace
    <p class="ja-updatetime"><span><?php echo JText::_('Last update')?></span><em><?php echo T3Common::getLastUpdate(); ?></em></p>

    with

    <p class="ja-updatetime"><span><?php echo JText::_('')?></span><em><?php echo JHTML::date(''); ?></em></p>

    powerfuldarkangel Friend
    #401939

    The only thing this does is put the current date instead of the last update…. I need it to show the time not the date… Pls help! :((

    chavan Friend
    #403011

    Hi powerfuldarkangel

    This is a bug and it will be fixed soon. You can follow this bug via http://pm.joomlart.com/browse/JAECPLGTIIIJOOMLAIVI-177

    chavan Friend
    #403860

    Hi powerfuldarkangel

    You open file plugins/system/jat3/jat3/core/common.php

    Replace


    function getLastUpdate($fieldname = null) {
    .....
    }

    by


    function getLastUpdate($fieldname = null)
    {
    if (!$fieldname) $fieldname = 'created';
    $db = &JFactory::getDBO();
    $query = "SELECT `$fieldname` FROM #__content a ORDER BY `$fieldname` DESC LIMIT 1";
    $db->setQuery($query);
    $data = $db->loadObject();
    if ($data->$fieldname) {
    $date = JFactory::getDate(strtotime($data->$fieldname));
    //get timezone configured in Global setting
    $app = & JFactory::getApplication();
    // Get timezone offset
    $tz = $app->getCfg('offset');
    // Set timezone offset for date
    $date->setTimezone(new DateTimeZone($tz));
    //return by the format defined in language
    return $date->toFormat(JText::_('T3_DATE_FORMAT_LASTUPDATE'), true);
    }
    return ;
    }

    This bug was fixed and will be release in next version of T3 framework.

    norito Friend
    #427409

    I am using the latest Teline IV but the problem is not fixed.

    http://www.joomlart.com/forums/topic/date-and-time-information-at-left-corner-top-does-now-work/.

    <em>@Do Ha 256735 wrote:</em><blockquote>Hi powerfuldarkangel

    You open file plugins/system/jat3/jat3/core/common.php

    Replace


    function getLastUpdate($fieldname = null) {
    .....
    }

    by


    function getLastUpdate($fieldname = null)
    {
    if (!$fieldname) $fieldname = 'created';
    $db = &JFactory::getDBO();
    $query = "SELECT `$fieldname` FROM #__content a ORDER BY `$fieldname` DESC LIMIT 1";
    $db->setQuery($query);
    $data = $db->loadObject();
    if ($data->$fieldname) {
    $date = JFactory::getDate(strtotime($data->$fieldname));
    //get timezone configured in Global setting
    $app = & JFactory::getApplication();
    // Get timezone offset
    $tz = $app->getCfg('offset');
    // Set timezone offset for date
    $date->setTimezone(new DateTimeZone($tz));
    //return by the format defined in language
    return $date->toFormat(JText::_('T3_DATE_FORMAT_LASTUPDATE'), true);
    }
    return ;
    }

    This bug was fixed and will be release in next version of T3 framework.</blockquote>

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

This topic contains 6 replies, has 4 voices, and was last updated by  norito 13 years ago.

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