Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • walkysss Friend
    #354175

    Thanks..great job

    firon Friend
    #358502

    thanks

    i’ve changed so it shows the “last edited time”, coz sometime u edit a very old article as well 😉
    i just replaced the words CREATED by MODIFIED

    [PHP]function getLastUpdate(){
    $db = &JFactory::getDBO();
    $query = ‘SELECT modified FROM #__content a ORDER BY modified DESC LIMIT 1’;
    $db->setQuery($query);
    $data = $db->loadObject();

    if( $data->modified ){
    $user =& JFactory::getUser();
    if ( $user->getParam(‘timezone’) ) {
    $offset = $user->getParam(‘timezone’);
    } else {
    $conf =& JFactory::getConfig();
    $offset = $conf->get(‘config.offset’);
    }
    $format = ‘%d.%m.%Y %H:%M’;
    return JHTML::_(‘date’, $data->modified, $format, $offset);
    } else {
    return ”; // emtpy string
    }
    } [/PHP]

Viewing 2 posts - 16 through 17 (of 17 total)

This topic contains 17 replies, has 8 voices, and was last updated by  firon 13 years, 6 months ago.

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