-
AuthorPosts
-
April 30, 2011 at 11:04 am #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 252I 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 Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
April 30, 2011 at 5:59 pm #389183I 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)
1 user says Thank You to khoand for this useful post
May 2, 2011 at 9:54 am #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 Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
May 2, 2011 at 5:34 pm #389469Could you give me username+password of backend? You give me a snapshot with your annotation describes your problem. I will help you solve it.
May 3, 2011 at 9:59 am #389601Site is on local machine so far. When I put it online, I’ll get back to you. Thanks
-
AuthorPosts
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