[SOLVED] The param of kind of user (registered, author and so on) in user lists

3 months 4 weeks ago - 3 months 4 weeks ago #303911 by lucablue
Hi,
I'd like to show in my CB user list the kind of group in which the user is in, like registered, author, publisher and so on.

Which is the parameter I need to put into column setting of CB Lists configuration?

Thank you
3 months 4 weeks ago #303918 by krileon
There is no field for displaying a users usergroup. It's generally not a good idea to expose that information directly. Best I can suggest is using a Custom HTML field and IF substitutions to substitute what usergroup they have. See the bottom of our substitution tutorial below for examples of using the usergroup IF substitution.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb

Specifically the below examples.

[cb:if usergroup includes "2"]I have Registered Usergroup[/cb:if]
[cb:if usergroup !includes "2"]I do NOT 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 - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
3 months 4 weeks ago #303923 by lucablue
Actually the lists are used by me and my moderators to verify if an user is Register or more. For my website is not necessary show lists to users.

Anyway I'll try the tutorial, even if I think it coudl be usefull put the user group param for special or Superuser.
3 months 4 weeks ago #303925 by lucablue

krileon wrote: There is no field for displaying a users usergroup. It's generally not a good idea to expose that information directly. Best I can suggest is using a Custom HTML field and IF substitutions to substitute what usergroup they have. See the bottom of our substitution tutorial below for examples of using the usergroup IF substitution.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb

Specifically the below examples.

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


I've insert this:
[cb:if usergroup includes "2"]Registrato BASIC [/cb:if][cb:if usergroup includes "3"]Animatore PREMIUM [/cb:if][cb:if usergroup includes "4"]Agenzia PREMIUM [/cb:if]

The problem is that if an user is "Basic" it appears correctly but if he is an "Animatore Premium" (Author) or "Ageniza PREMIUM" (Editor) the param displays both "Registrato BASIC" and "Animatore PREMIUM"... where I'm wrong?
3 months 4 weeks ago - 3 months 4 weeks ago #303926 by lucablue
Solved with this:
[cb:if usergroup includes "2" && usergroup !includes "3" && usergroup !includes "4"]Registrato BASIC [/cb:if][cb:if usergroup includes "2" && usergroup includes "3" && usergroup !includes "4"]Animatore PREMIUM [/cb:if][cb:if usergroup includes "2" && usergroup includes "3" && usergroup includes "4"]Agenzia PREMIUM [/cb:if]
The following user(s) said Thank You: nant
Moderators: beatnantkrileon
Time to create page: 0.383 seconds
Facebook Twitter Google LinkedIn