-
AuthorPosts
-
lg21 Friend
lg21
- Join date:
- July 2012
- Posts:
- 335
- Downloads:
- 109
- Uploads:
- 100
- Thanks:
- 36
- Thanked:
- 9 times in 1 posts
December 8, 2013 at 6:47 pm #192834In 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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 9, 2013 at 5:32 pm #514826This 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,
);1 user says Thank You to Ninja Lead for this useful post
lg21 Friendlg21
- Join date:
- July 2012
- Posts:
- 335
- Downloads:
- 109
- Uploads:
- 100
- Thanks:
- 36
- Thanked:
- 9 times in 1 posts
December 9, 2013 at 9:20 pm #514867Thanks it works. But I can not order items from the most recent
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 10, 2013 at 5:15 am #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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 12, 2013 at 4:23 pm #515244If 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 Friendlg21
- Join date:
- July 2012
- Posts:
- 335
- Downloads:
- 109
- Uploads:
- 100
- Thanks:
- 36
- Thanked:
- 9 times in 1 posts
December 12, 2013 at 6:32 pm #515270I 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 34lg21 Friendlg21
- Join date:
- July 2012
- Posts:
- 335
- Downloads:
- 109
- Uploads:
- 100
- Thanks:
- 36
- Thanked:
- 9 times in 1 posts
December 12, 2013 at 6:36 pm #515271and 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 GiornoNone of these categories fits correctly the items from the most recent
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 13, 2013 at 8:14 am #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 GiornoNone 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
1 user says Thank You to Ninja Lead for this useful post
lg21 Friendlg21
- Join date:
- July 2012
- Posts:
- 335
- Downloads:
- 109
- Uploads:
- 100
- Thanks:
- 36
- Thanked:
- 9 times in 1 posts
December 13, 2013 at 1:30 pm #515366perfect thanks
but just below the categories, dates are not entered for order recently, but range from the oldest to the most recent
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 16, 2013 at 4:35 am #515513The 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 user says Thank You to Ninja Lead for this useful post
Gruponea.com FriendGruponea.com
- Join date:
- March 2014
- Posts:
- 89
- Downloads:
- 350
- Uploads:
- 11
- Thanks:
- 18
- Thanked:
- 1 times in 1 posts
May 6, 2016 at 12:16 pm #927589Hi! is there any way to add the time to the date? thanks!
Gruponea.com
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 9, 2016 at 2:59 am #928132Hi! 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>
AuthorPostsViewing 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, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum