-
AuthorPosts
-
todhost Friend
todhost
- Join date:
- August 2011
- Posts:
- 91
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 4 times in 1 posts
October 14, 2013 at 9:20 pm #191385Latest article module on position Home-10 shows most popular article instead of most recent article. Could this be an error? Any fix?
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
October 15, 2013 at 4:22 am #509006Hi todhost,
The latest module is working well.
It is not really the latest module.
We have custom it so that it will have a different behavior as below:
1. We will select 4 (or the number articles setting in module) latest articles.
2. We will pick the most read article among them (by hits count)
3. Display the most read article as the spotlight one, and also display 3 related article with this article.
4. Display the rest articles at bottom of module.You can try to create 4 news articles and check for this behavior.
Regards
todhost Friendtodhost
- Join date:
- August 2011
- Posts:
- 91
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 4 times in 1 posts
October 15, 2013 at 11:12 am #509042Hello,
Please how can change things to have the most recent article display as the spotlight image nstead of the most readThank you for helping.
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
October 16, 2013 at 1:26 am #509104Hi todhost,
It is easy to change the behavior. Please open templatesja_magzhtmlmod_articles_latestfocus.php and comment out these two lines of code:
//sort those latest article by hits
$compare = create_function('$a, $b', ' if ($a->hits == $b->hits) { return 0; } return ($a->hits < $b->hits) ? 1 : -1; ');
uasort($list, $compare);Regards
todhost Friendtodhost
- Join date:
- August 2011
- Posts:
- 91
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 4 times in 1 posts
October 16, 2013 at 6:12 am #509124Thanks. Fixed.
todhost Friendtodhost
- Join date:
- August 2011
- Posts:
- 91
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 4 times in 1 posts
October 18, 2013 at 8:29 pm #509542Issue resolved.
2capjob Friend2capjob
- Join date:
- October 2013
- Posts:
- 139
- Downloads:
- 1
- Uploads:
- 46
- Thanks:
- 55
- Thanked:
- 10 times in 1 posts
December 17, 2013 at 11:18 am #515722<em>@Wall Crasher 393756 wrote:</em><blockquote>Hi todhost,
It is easy to change the behavior. Please open templatesja_magzhtmlmod_articles_latestfocus.php and comment out these two lines of code:
//sort those latest article by hits
$compare = create_function('$a, $b', ' if ($a->hits == $b->hits) { return 0; } return ($a->hits < $b->hits) ? 1 : -1; ');
uasort($list, $compare);Regards</blockquote>
I have a question. hello.
and can be more accurate to say? what to do with the code? Thank you.Comment out what it means?
2capjob Friend2capjob
- Join date:
- October 2013
- Posts:
- 139
- Downloads:
- 1
- Uploads:
- 46
- Thanks:
- 55
- Thanked:
- 10 times in 1 posts
December 17, 2013 at 11:19 am #515723<em>@todhost 394309 wrote:</em><blockquote>Issue resolved.</blockquote>
I have a question. hello.
and can be more accurate to say? what to do with the code? Thank you.Comment out what it means?
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
December 18, 2013 at 2:34 am #515795Hi 2capjob,
<blockquote>Comment out what it means?</blockquote>
I mean you can turn these line of code to php comment statement
http://www.w3schools.com/php/php_syntax.aspOr you can simply delete it.
angie00 Friendangie00
- Join date:
- November 2011
- Posts:
- 294
- Downloads:
- 0
- Uploads:
- 80
- Thanked:
- 10 times in 1 posts
February 3, 2014 at 9:18 pm #521009If codes is left as is, it shows most recent 4 articles in alphabetical order with main showing introtext.
If I comment out those two lines, it does show most recent 4 articles ordered by recently published but also shows related links under main article.
What I would like to have is most recent published article as main with intro text without related links.
How do I do this?
Thanks!
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
AuthorPostsViewing 11 posts - 1 through 11 (of 11 total)This topic contains 11 replies, has 4 voices, and was last updated by Wall Crasher 10 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Error: Module shows wrong article
Viewing 11 posts - 1 through 11 (of 11 total)