test
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • peterchernov Friend
    #163423

    I believe there is a problem with the way Jabulletin module displays the date. Even though it retrives articles by date created (which is good), it displays the date when they were last modified. It looks rather odd especially for news site. Try the following: modify and save some article which is displayed in mod_jabulletin. As you see it stay at the same position in the module, but now displays current date which is inconsistent with the ordering concept:((

    I solved it this way for mod_jabulletin.v1.0.4:
    in file modulesmod_jabulletinhelper.php file on line 252

    I changed:
    $lists [$i]->date = strtotime ( $row->modified ) ? $row->modified : $row->created ;

    into:
    $lists [$i]->date = strtotime ( $row->сreated ) ? $row->modified : $row->created ;

    Now works fine.
    Is it safe way of changing the code. Any better ideas?

    khoand Friend
    #389183

    I think it’s not safe way. First code check $row->modified variable is date, if it is, $lists [$i]->date use $row->modified. Otherwise, $lists [$i]->date use $row->created. Because $row->modified could be not date, $row->created is always date (when you create article, system set $row->created is time when you create it)

    peterchernov Friend
    #389393

    <em>@khoand 237723 wrote:</em><blockquote>I think it’s not safe way. First code check $row->modified variable is date, if it is, $lists [$i]->date use $row->modified. Otherwise, $lists [$i]->date use $row->created. Because $row->modified could be not date, $row->created is always date (when you create article, system set $row->created is time when you create it)</blockquote>

    Many THNX for your explanation. I perfectly understand, that what I did is wrong. I just wanted to say – it works. Which means 1) New article shows up in correct position – both in page layout and in the module 2) It displays correct date (which is date of creation, not last editing from my point of view). So I wanted to ask couple more questions:
    1) Do you think this issue should be addressed anyway? I saw in this forum one person asking how to sort items by date of their last modification in Jabulletin module and he got the recipe. But in default presentation articles are being delivered by creation date and module displays date of last edit. This mix of two approaches doesn’t look quite logical to me.
    2) If so, what is the right way of dealing with it?
    Sorry that I keep bugging you with this “minor” thing but this module is really important for my project.

    khoand Friend
    #389469

    Could you give me username+password of backend? You give me a snapshot with your annotation describes your problem. I will help you solve it.

    peterchernov Friend
    #389601

    Site is on local machine so far. When I put it online, I’ll get back to you. Thanks

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  peterchernov 13 years, 7 months ago.

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