Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Order of forum posts in the forum tab of a GJ group

  • emanuelr
  • emanuelr
  • OFFLINE
  • Posts: 38
  • Thanks: 2
  • Karma: 3
11 years 6 months ago - 11 years 6 months ago #225637 by emanuelr
The default posts order in a forum tab of a group in GroupJive is "new first".

How can I change the order to "old first"?

I believe this feature should be clearly be chosen in the configuration panel or even as a personal preference of a user...

I use the Kunena 2.0 integration, GJ2.0.7, CB1.9, J2.5.9.

Thanks,
Emanuel.
Last edit: 11 years 6 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225679 by krileon
There is no ordering parameter. It always shows newest first.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • emanuelr
  • emanuelr
  • OFFLINE
  • Posts: 38
  • Thanks: 2
  • Karma: 3
11 years 6 months ago #225714 by emanuelr
Well, this is definitely should be a feature in the forum configuration of GJ...
Usually a forum is read from old to new since there is a progress in the conversation...

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225747 by krileon
I can't keep adding parameters for every desired usage I am afraid. GJ has I believe around 100+ parameters as is. You can implement this by editing the GJ Forum integrations models and changing the order of its queries or the API usage in case of K2.0.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • emanuelr
  • emanuelr
  • OFFLINE
  • Posts: 38
  • Thanks: 2
  • Karma: 3
11 years 6 months ago #225833 by emanuelr
Dear Kyle,
You are doing a great job here with some amazing advanced customization features.
Of course, as a developer you should put a limit and priorities.

But this feature seams to be obvious for me.
And your infrastructure is ready for it (since you already added this option in the main CB forum integration).

Anyway, to whom is also prefer this ORDER BY time ASC:
Find the kunena20.php model file in components\com_comprofiler\plugin\user\plug_cbgroupjive\plugins\cbgroupjiveforums\models\kunena20.php, there, look for row #35 (at least in version 2.0.7 of GroupJive) which says
Code:
$params = array( 'starttime' => -1, 'where' => ( count( $where ) ? implode( ' AND ', $where ) : null ) );
And add as another parameter
Code:
,'orderby' => 'm.time ASC'

It will show
Code:
$params = array( 'starttime' => -1, 'where' => ( count( $where ) ? implode( ' AND ', $where ) : null ), 'orderby' => 'm.time ASC' );

This will send the ORDER BY parameter to the Kunena helper.php file: administrator\components\com_kunena\libraries\forum\message\helper.php.
Look at the getLatestMessages function line #88 at the 2.0.4 version. There are many other interesting parameters which build the query.

This is a hack to a GJ core file of course...

Kyle, I hope you'll add this feature. The best will be if a user can set it, but if it is too complicated, at least the group owner or the site admin in the backend.

Thanks.
Emanuel.

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

Moderators: beatnantkrileon
Powered by Kunena Forum