Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

[SOLVED] Show Joomla usergroups in frontend profile

  • Pachat
  • Pachat
  • OFFLINE
  • Posts: 52
  • Thanks: 3
  • Karma: -1
9 years 1 month ago - 9 years 1 month ago #272195 by Pachat
Id'd like to show (not edit) the Joomla usergroups of every user in its profile in the frontend
How can I achieve this?
Last edit: 9 years 1 month ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
9 years 1 month ago #272216 by krileon
Replied by krileon on topic Show Joomla usergroups in frontend profile
We don't provide a field for that. You'd need to use CB Query Field to query for that information or create a Custom HTML field and substitute in the information. Example substitution as follows.

[cb:if usergroup includes "2"]I have Registered Usergroup[/cb:if]


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.

  • Pachat
  • Pachat
  • OFFLINE
  • Posts: 52
  • Thanks: 3
  • Karma: -1
9 years 1 month ago #272247 by Pachat
Replied by Pachat on topic Show Joomla usergroups in frontend profile
Great. But it does more than I want :

Ex. : I put in the Custom HTML Description
[cb:if usergroup includes "29"]Premium[/cb:if] [cb:if usergroup includes "13"]Member[/cb:if] [cb:if usergroup includes "2"]Registered[/cb:if]

The Registered, Member and Premium groups are hierarchically dependent.
For the sake of simplicity, in our site, a user is Registered OR Member OR Premium exclusively.
This is the information I expect : the name of the group to which she really belongs to.

In fact, the instruction you gave me rebuilds the hierarchy. Therefore I get:
Registered
Member Registered
Premium Member Registered

How can I simply get
Registered
Member
Premium

On way would be to have "else" : could you provide the syntax?
Another way, if it exists, to have a function that gives only the real group.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
9 years 1 month ago #272284 by krileon
Replied by krileon on topic Show Joomla usergroups in frontend profile
There is no "else" feature in substitutions at this time. You could do the below.

[cb:if usergroup includes "29"]Premium[/cb:if]
[cb:if usergroup includes "13" and usergroup !includes "2"]Member[/cb:if]
[cb:if usergroup includes "2" and usergroup !includes "13"]Registered[/cb:if]

That might work by excluding the group above it.


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.

  • Pachat
  • Pachat
  • OFFLINE
  • Posts: 52
  • Thanks: 3
  • Karma: -1
9 years 1 month ago #272296 by Pachat
Replied by Pachat on topic Show Joomla usergroups in frontend profile
Well.No. It gives the same.
The problem is not at the input level, but at the output of the function " includes ".
This function, as far as I understand, gives all the parent groups of a group.
I understand that this may be useful for some purpose, but not in my case.

Don't spend too much on this, we will use it as it is.

Thank you for your attention

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
9 years 1 month ago #272311 by krileon
Replied by krileon on topic Show Joomla usergroups in frontend profile
Usergroups work off inheritance so yes the usergroup condition is checking against the current and inherited usergroups. You can try the below for exact usergroup matching.

[cb:if gids includes "29"]Premium[/cb:if]
[cb:if gids includes "13"]Member[/cb:if]
[cb:if gids includes "2"]Registered[/cb:if]


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: Pachat

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

Moderators: beatnantkrileon
Powered by Kunena Forum