Kunena 6.3.0 released

The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Ordering system

More
13 years 5 months ago #1 by Alhazred
Ordering system was created by Alhazred
I've installed Kunena, it order the messages according to their message id, I want them sorted by date and time. How can I do that?
I've seen inside kunena.config.class.php the variable var $ordering_system = 'mesid'; and the value mesid inside the jos_kunena_config table.

Do I have to change them? What should I write there? I haven't seen any option on Kunena's control panel.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago - 13 years 5 months ago #2 by Alhazred
Replied by Alhazred on topic Re: Ordering system
I missed to say that I migrated from phpBB3 (where the posts where shown correctly) to Kunena, I've tried both passing through Fireboard 1.0.4 and straight to Kunena 1.6 with the same result.

The problem doesn't look to be exactly as I said in the 1st post, I make an example.
I have a topic with 5 posts in it, if I order it with "asc" method I have the posts shown in this way:

id: 21125
date and time: 09/26/2010 5:05pm

id: 21126
date and time: 09/26/2010 7:52pm

id: 21128
date and time: 09/26/2010 9:06pm

id: 21131
date and time: 09/26/2010 9:48pm

id: 25980
date and time: 09/26/2010 11:47am <-- this is the opening post


If I set "desc" order I see this:

id: 25980
date and time: 09/26/2010 11:47am <-- this is the opening post

id: 21131
date and time: 09/26/2010 9:48pm

id: 21128
date and time: 09/26/2010 9:06pm

id: 21126
date and time: 09/26/2010 7:52pm

id: 21125
date and time: 09/26/2010 5:05pm

As you can see is the opening post which is not placed correctly, how to fix this?
Last edit: 13 years 5 months ago by Alhazred.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #3 by haithun
Replied by haithun on topic Re: Ordering system
How did you migrate? I don't know how to do it so you have o tell me.
If it is a PHP script or a SQL statement you only have to go into it and change the order to "desc".

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #4 by Alhazred
Replied by Alhazred on topic Re: Ordering system
I've used the converter suggested here
docs.kunena.com/index.php/PHPBB3_to_Kunena

The only "asc" sort in it is about Groups' id, not for posts.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago - 13 years 5 months ago #5 by haithun
Replied by haithun on topic Re: Ordering system
Well there is an ASC for the post but its not written due to the fact that ASC is the default.

change the line
Code:
$query="SELECT p.post_id, p.poster_ip, p.topic_id, p.poster_id, p.post_time, ". "p.post_username, t.topic_title, t.forum_id, t.topic_views, p.post_subject". " FROM `$phpbb_db`.`{$phpbb_dbprefix}posts` AS p, ". "`$phpbb_db`.`{$phpbb_dbprefix}topics` AS t ". " WHERE p.topic_id = t.topic_id ". // $JMI " ORDER BY p.topic_id, p.post_id";
to
Code:
$query="SELECT p.post_id, p.poster_ip, p.topic_id, p.poster_id, p.post_time, ". "p.post_username, t.topic_title, t.forum_id, t.topic_views, p.post_subject". " FROM `$phpbb_db`.`{$phpbb_dbprefix}posts` AS p, ". "`$phpbb_db`.`{$phpbb_dbprefix}topics` AS t ". " WHERE p.topic_id = t.topic_id ". // $JMI " ORDER BY p.topic_id, p.post_id DESC";

This should turn around the posts processing.
Last edit: 13 years 5 months ago by haithun.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #6 by Alhazred
Replied by Alhazred on topic Re: Ordering system
Thanks, but that didnt help.
It looks that the posts are sorted using their ID, not their timestamp.
If you have a clean installation everithing works also if you sort by messages' ID, but if you come from another forum when you import posts they can have their ID altered.

Does Kunena sorts posts only in that way? Is it possible to change this method?

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago - 13 years 5 months ago #7 by sozzled
Replied by sozzled on topic Re: Ordering system
G'day, Alhazred. We're getting awfully technical here. What, exactly, is the problem that you are trying to solve?

Alhazred

I've installed Kunena. It orders the messages according to their message id, I want them sorted by date and time. How can I do that?

"It" orders the messages according to their message-id. What is "it"? Does "it" mean Kunena? In that case, where, specifically, in what view of your Kunena, to you see messages ordered by message-id?

Does "it" mean the MySQL database? In which case, what does it matter what primary key your messages are indexed? As long as you're using Kunena to access the messages, it should not matter.

Therefore, can you please tell us, which Kunena function you are trying to use that is causing you a problem. Thank you.
Last edit: 13 years 5 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #8 by haithun
Replied by haithun on topic Re: Ordering system
I think he just want to order by date and time because the FB migration script generated the message-ids in the wrong order.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #9 by sozzled
Replied by sozzled on topic Re: Ordering system

haithun wrote: I think he just want to order by date and time because the FB migration script generated the message-ids in the wrong order.

What does it matter what order the message-id were assigned? My question in, what function of Kunena displays the results in message-id order? Let us first understand when this "order" comes into play ... if it ever does.

Please Log in or Create an account to join the conversation.

Time to create page: 0.535 seconds