test
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • lg21 Friend
    #192834

    In articles published you can bring up the publication date as (December 3, 2013) and not the elapsed time (1 week 8 hours ago)?

    Ninja Lead Moderator
    #514826

    This way will help you to do that

    Open templates/ja_magz/templateHelper.php file

    From


    static $units = array(
    'YEAR' => 31536000,
    'MONTH' => 2592000,
    'WEEK' => 604800,
    'DAY' => 86400,
    'HOUR' => 3600,
    'MIN' => 60,
    'SEC' => 1,
    );

    Change to


    return JText::sprintf(JHtml::_('date', $timespan, JText::_('DATE_FORMAT_LC3')));
    static $units = array(
    'YEAR' => 31536000,
    'MONTH' => 2592000,
    'WEEK' => 604800,
    'DAY' => 86400,
    'HOUR' => 3600,
    'MIN' => 60,
    'SEC' => 1,
    );

    lg21 Friend
    #514867

    Thanks it works. But I can not order items from the most recent

    Ninja Lead Moderator
    #514910

    <em>@lg21 401257 wrote:</em><blockquote>Thanks it works. But I can not order items from the most recent</blockquote>

    Are you mentioning the Latest News module, right?

    This module is using layout overrided in the template so articles will be ordered by recently added first and most view on module.

    To display related articles on latest news module as our demo, please following steps: Go to Content >> Article Manager >> Edit an article then add meta keywords for main article and articles which you want to display related news. See more detail here

    Ninja Lead Moderator
    #515244

    If you want to show the most article recent in Articles Latest Module. You can fix it from php code

    Open templates/ja_magz/html/mod_articles_latest/focus.php file

    From


    $compare = create_function('$a, $b', ' if ($a->hits == $b->hits) { return 0; } return ($a->hits < $b->hits) ? 1 : -1; ');
    uasort($list, $compare);

    $focus = array_shift($list);

    Change to


    $focus = $list;

    lg21 Friend
    #515270

    I followed your instructions, it gives me the following
    Fatal error: Call to a member function merge () on a non-object in on line 34
    /web/htdocs/www.controcorrentelido.it/home/corriere/templates/ja_magz/html/mod_articles_latest/focus.php on line 34

    lg21 Friend
    #515271

    and in any case I wanted to change the order of insertion of the news for all categories

    Politica
    Attualità
    Arte e Cultura
    Sport
    Tribuna Aperta
    Notizie del Giorno

    None of these categories fits correctly the items from the most recent

    Ninja Lead Moderator
    #515326

    <em>@lg21 401761 wrote:</em><blockquote>and in any case I wanted to change the order of insertion of the news for all categories

    Politica
    Attualità
    Arte e Cultura
    Sport
    Tribuna Aperta
    Notizie del Giorno

    None of these categories fits correctly the items from the most recent</blockquote>

    I have fixed directly on your site with this way:

    Open templates/ja_magz/html/mod_articles_latest/focus.php file

    From

    $compare = create_function('$a, $b', ' if ($a->hits == $b->hits) { return 0; } return ($a->hits < $b->hits) ? 1 : -1; ');

    Change

    $compare = create_function('$a, $b', ' if ($a->created == $b->created) { return 0; } return ($a->created < $b->created) ? 1 : -1; ');

    Please check it on your site again. Let me know if it helps

    lg21 Friend
    #515366

    perfect thanks
    but just below the categories, dates are not entered for order recently, but range from the oldest to the most recent


    1. politica
    Ninja Lead Moderator
    #515513

    The problem you mentioned belongs to Most Read Content module and we could not touch on it. This is description about Most Read Content module:

    <blockquote>This Module shows a list of the currently published Articles which have the highest number of page views.</blockquote>

    It’s related to JOOMLA default, you should raise this issue to JOOMLA Forum. You might get better answer from there.


    1. joomla_module
    Gruponea.com Friend
    #927589

    Hi! is there any way to add the time to the date? thanks!

    Gruponea.com

    Ninja Lead Moderator
    #928132

    Hi! is there any way to add the time to the date? thanks!

    This is an example to change time to date

    Open templates/ja_magz/html/mod_articles_latest/focus.php file

    <dd class="published">
        <span><?php echo MagzHelper::relTime($item->publish_up); ?></span>
    </dd>

    to

    <dd class="published">
        <span><?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?></span>
    </dd>
Viewing 12 posts - 1 through 12 (of 12 total)

This topic contains 11 replies, has 3 voices, and was last updated by  Ninja Lead 8 years, 7 months ago.

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