-
AuthorPosts
-
kryptos Friend
kryptos
- Join date:
- November 2009
- Posts:
- 105
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 9
- Thanked:
- 13 times in 9 posts
November 29, 2009 at 5:29 pm #325234Wrong date displays only in Latest article module option… in Most read version, the date is fine…
gray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
November 29, 2009 at 8:39 pm #325238In both cases, most read and latest, the date is taken by the code in helper.php:
[php]if ($showdate) {
$lists [$i]->date = strtotime ( $row->modified ) ? $row->created : $row->modified;
}[/php]It means that in both cases, the date should be either correct or wrong… In my installation, in both cases the dates are OK.
Still, as a variant, maybe this code would resolve the issue (I haven’t checked it by myself)
[php]
if ($showdate) {
$lists [$i]->date = strtotime ( $row->created );
}
[/php]2 users say Thank You to gray for this useful post
kryptos Friendkryptos
- Join date:
- November 2009
- Posts:
- 105
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 9
- Thanked:
- 13 times in 9 posts
November 29, 2009 at 9:45 pm #325242Thanx, I’ll try this later, but first check your PM.
gray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
November 30, 2009 at 5:41 am #325268<em>@kryptos 155007 wrote:</em><blockquote>Thanx, I’ll try this later, but first check your PM.</blockquote>
Yes, I see that in dates in Latest seems to be not correct…
Could you try to use my hacked Bulletin module and report the result?kryptos Friendkryptos
- Join date:
- November 2009
- Posts:
- 105
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 9
- Thanked:
- 13 times in 9 posts
November 30, 2009 at 9:36 am #325275<em>@gray 155035 wrote:</em><blockquote>Yes, I see that in dates in Latest seems to be not correct…
Could you try to use my hacked Bulletin module and report the result?</blockquote>Thanx, I installed your module, but the date is still 30.11.99 :((
only way is to open each article, and save it without changes. in that case, the module works like it should.
So, I have a lot job to do… thank you again and good day 🙂
kryptos Friendkryptos
- Join date:
- November 2009
- Posts:
- 105
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 9
- Thanked:
- 13 times in 9 posts
November 30, 2009 at 9:44 am #325276<em>@gray 155001 wrote:</em><blockquote>In both cases, most read and latest, the date is taken by the code in helper.php:
[php]if ($showdate) {
$lists [$i]->date = strtotime ( $row->modified ) ? $row->created : $row->modified;
}[/php]It means that in both cases, the date should be either correct or wrong… In my installation, in both cases the dates are OK.
Still, as a variant, maybe this code would resolve the issue (I haven’t checked it by myself)
[php]
if ($showdate) {
$lists [$i]->date = strtotime ( $row->created );
}
[/php]</blockquote>This WORKS!
gray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
November 30, 2009 at 10:32 am #325280OK, the issue is clear. More accurate approach (implemented in my hacked version of the module) is:
in helper.php line
[php]
if ($showdate) {
$lists [$i]->date = strtotime ( $row->modified ) ? $row->created : $row->modified;
}
[/php]should be replaced with
[php]
if ($showdate) {
$lists [$i]->date = strtotime ( $row->modified == ‘0000-00-00 00:00:00’) ? $row->created : $row->modified;
}
[/php] -
AuthorPosts
This topic contains 37 replies, has 12 voices, and was last updated by gray 14 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum