×
Blue Eagle 5 v1.5.3 has been Released (31 Mar 2020)

The Kunena team has announce the arrival of Kunena template Blue Eagle 5 v1.5.3 which is now available for download. This version addresses most of the issues that were discovered in development.

× This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.

This category may also contain a few topics relating to K 1.6 that may have been moved here possibly by mistake.

The topics in this category are for historical interest only. Owing to the structural differences between K 1.6 and K 1.7, these ideas in these topics will not work with later versions and, for that reason, the topics are locked.

Question Posts ordering set in kunena admin panel

More
10 years 11 months ago - 10 years 11 months ago #1 by xillibit
Hello,

I have made a little hack for change directly the post ordering in the kunena config panel, this works only on Kunena 1.5.3. But this need to be adapted if you use an another template that default_ex.

You need to add this, in your administrator/components/com_kunena/language/kunena.yourlanguage.php :
DEFINE('_COM_A_POSTORDER', 'Define the posts order');
DEFINE('_COM_A_POSTORDER_DESC', 'Define the posts order in two modes : ascending or descending.');

If you don't use the template default_ex, you need just to change this at line 169 :
$ordering = ($fbConfig->default_sort == 'desc' ? 'desc' : 'asc'); // Just to make sure only valid options make it

by this :
$ordering =  $fbConfig->default_sort;

Attachment Hack_posts_ordering.zip not found


I don't provide support by PM, because this can be useful for someone else.
Attachments:
Last edit: 10 years 11 months ago by xillibit.

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

More
10 years 11 months ago #2 by alakentu
Hello xillibit

Great little hack, but it does not work, at least I do not work, does not change the order of the hearing of the messages.

Just assume that if I choose to view messages in "asc" should see the first message in a message created and if I choose to see the messages in "desc" set up to the last message and that message is not so original.

Please could you tell me if you need something more than play the files: admin.kunena.php, admin.kunena.html.php, kunena.language.php and view.php?

Thanks in advance for your answers!

Greetings.

KS!
NO hacer Spam | NO esbribas todo en may├║sculas | Sigue las reglas

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

More
10 years 11 months ago - 10 years 10 months ago #3 by xillibit
Hello,

I don't know why but my modifications didn't worked, now I have fixed this.

File Attachment:

File Name: hack_posts...g_k1.zip
File Size:49 KB

I don't provide support by PM, because this can be useful for someone else.
Attachments:
Last edit: 10 years 10 months ago by xillibit.

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

More
10 years 11 months ago - 10 years 11 months ago #4 by alakentu
@Xillibit.

Ok, The try and tell you that it works my brother!

EDIT: Perfect brother, great job! Thank you very much.

Greetings.

KS!
NO hacer Spam | NO esbribas todo en may├║sculas | Sigue las reglas
Last edit: 10 years 11 months ago by alakentu.

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

More
10 years 10 months ago #5 by xillibit
Version for kunena 1.5.4 :

Attachment hack_posts_ordering_K1.zip not found


I don't provide support by PM, because this can be useful for someone else.
Attachments:

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

More
10 years 10 months ago - 10 years 10 months ago #6 by lavsteph
Hi,

my proposed amendment for an integrate in all languages. ;)

In admin.kunena.php

replace
$sorting[] = JHTML::_('select.option', 'asc', 'Ascending');
$sorting[] = JHTML::_('select.option', 'desc', 'Descending');
with
$sorting[] = JHTML::_('select.option', 'asc', _USER_ORDER_DESC);
	$sorting[] = JHTML::_('select.option', 'desc', _USER_ORDER_ASC);

Manager French translation
Last edit: 10 years 10 months ago by lavsteph.

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

More
10 years 10 months ago #7 by xillibit
Thanks lavsteph for this modification, i have it in the archive below. Don't forget to add this, in your administrator/components/com_kunena/language/kunena.yourlanguage.php :
DEFINE('_COM_A_POSTORDER', 'Define the posts order');
DEFINE('_COM_A_POSTORDER_DESC', 'Define the posts order in two modes : ascending or descending.');
DEFINE('_USER_ORDER_DESC', 'Descending');
DEFINE('_USER_ORDER_ASC', 'Ascending');

Attachment hack_posts_ordering_K1-20090719.zip not found


I don't provide support by PM, because this can be useful for someone else.
Attachments:

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

More
10 years 10 months ago #8 by lavsteph
Hi,

the translation already exists in the kunena.english.php

line 1331-1532
//New 0.9 to 1.0
DEFINE('_USER_ORDER', 'Preferred Message Ordering');
DEFINE('_USER_ORDER_DESC', 'Last post first');
DEFINE('_USER_ORDER_ASC', 'First post first');

Manager French translation

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

More
10 years 9 months ago #9 by sneadm
I'm using 1.5.4 w/CB 1.2.1. I've set Kunena to use the CB Profile. CB defines a field 'forumorder' which the user may set. You may also set the default to '0'(asc) or '1' (desc). This then populates the 'odering' field in fb_users which is used by the kuena_config_class::DoUserOverrides to override the default setting in the class.

I don't know if the native Kunena profile edit allows the user to change this but the CB profile does.

So, different users can have different sorts without the need for the hack.

Hope that helps clarify.

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

More
10 years 5 months ago #10 by Roo
Hi there. I'm pretty desperate to get my threads ordered with the oldest at the top but I'm very much an out-of-the-box man. I am rather terrified about hacking.

However, I am determined so....

I have downloaded hack_posts_ordering_K1-20090719.zip but I have no idea what to do with it.

Could some kind person please offer an idiot-proof step-by-step instruction on what I need to do. I would be most grateful.

I am using Kunena 1.5.7 (and, for what it's worth, Community Builder and CB SuperActivity)

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.188 seconds