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] Sort articles depending on user group

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
9 years 2 months ago - 9 years 1 month ago #269793 by ricco1
​Hello guys, how are you?

In my site I use Community Builder to manage users and subscriptions, and I use SEBLOD to manage contents.

I've got FREE members and VIP (paid) members.

I've got for example let's say this 4 user groups like so:

Public (ID 1)
-Registered (ID 2)
--Free users (ID 3)
--VIP users (ID 4)

When a user is a FREE member he is assigned to the Free users group and when a user is a VIP member he is assigned to the VIP users group.

I also have a field in the Community Builder database table which changes its value depending if user is FREE or VIP. If the user is FREE the value of the field is 0 and if the user is VIP the value is 1.

The question is: How to sort the articles displayed by a SEBLOD search type so that the articles which belong to the users in the VIP users group to be first?

I've been torturing myself with this task for days now without success and will be very grateful to anyone who could give me some ideas or help please.

Thank you in advance,
Have a nice day,
ricco
Last edit: 9 years 1 month ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 2 months ago #269809 by krileon
Replied by krileon on topic Sort articles depending on user group
We're not the developers of SEBLOD so what we can suggest is pretty limited. My guess is you'd need to modify their search Joomla plugin to implement some sort of custom sorting by joining the _comprofiler table on the created_by with id.


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.

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
9 years 2 months ago #269815 by ricco1
Replied by ricco1 on topic Sort articles depending on user group
Hi Kyle,

What if the search is done by the default Joomla! Search or by the Joomla! Smart Search? Can I somehow sort that results by user group or by my CB VIP subscribed field then?

Thank you,
Best regards,
ricco

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 2 months ago #269825 by krileon
Replied by krileon on topic Sort articles depending on user group
SEBLOD would need a Joomla search plugin for Joomla to search it unless it's using Joomla _content for its storage. That search plugin is what you'd need to modify. If it's using Joomla _content then I don't know what to suggest other than maybe developing a custom search plugin to query for and output the results however you're wanting.


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.
The following user(s) said Thank You: ricco1

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

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
9 years 1 month ago - 9 years 1 month ago #270287 by ricco1
Last edit: 9 years 1 month ago by ricco1.

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

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
9 years 1 month ago #270288 by ricco1
Replied by ricco1 on topic Sort articles depending on user group
With 2 words: CB (1) - SEBLOD (0). CB WINS.

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

Moderators: beatnantkrileon
Powered by Kunena Forum