test melih
 melih
Viewing 7 posts - 31 through 37 (of 37 total)
  • Author
    Posts
  • kryptos Friend
    #325234

    Wrong date displays only in Latest article module option… in Most read version, the date is fine…

    gray Friend
    #325238

    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]

    kryptos Friend
    #325242

    Thanx, I’ll try this later, but first check your PM.

    gray Friend
    #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 Friend
    #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 Friend
    #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 Friend
    #325280

    OK, 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]

Viewing 7 posts - 31 through 37 (of 37 total)

This topic contains 37 replies, has 12 voices, and was last updated by  gray 15 years, 2 months ago.

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