Skip to Content Skip to Menu

Substitutions for usergroup name?

  • saman2
  • saman2
  • ONLINE
  • Posts: 404
  • Thanks: 7
  • Karma: -1
6 years 6 months ago #304067 by saman2
Substitutions for usergroup name? was created by saman2
hi
i read this:
www.joomlapolis.com/documentation/18353-using-substitutions-throughout-cb
but i can not find usergroup Substitution.
i can find [gids] in my search but where is complete list of Substitution?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 6 months ago #304075 by krileon
Replied by krileon on topic Substitutions for usergroup name?
There is no usergroup substitution. You have to condition it using IF statements. Example as follows.

[cb:if usergroup includes "2"]Registered[/cb:if]

Further usage examples shown at the bottom of the substitution tutorial below.

www.joomlapolis.com/documentation/18353-using-substitutions-throughout-cb


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.

  • saman2
  • saman2
  • ONLINE
  • Posts: 404
  • Thanks: 7
  • Karma: -1
6 years 6 months ago - 6 years 6 months ago #304080 by saman2
Replied by saman2 on topic Substitutions for usergroup name?

krileon wrote: You have to condition it using IF statements. Example as follows.

[cb:if usergroup includes "2"]Registered[/cb:if]

but i have more than 100 Jusergroups...can you suggest any easier way?
i see [usertype] in this link:
www.joomlapolis.com/forum/130-cb-123-general-discussion/139560-solved-show-user-s-group-on-profile-page#139608
but it seems deprecated...
i want show usergroup in his profile and i have more than 100 usergroup that maybe need to add or remove some of them in future.
i find this post:
www.joomlapolis.com/forum/255-developer-members-support/231560-solved-show-joomla-usergroups-in-frontend-profile?limitstart=0#272216
that you say use CB query field. if i can get usergroup , then how to show result in some statement? for example i want say :
you are in " **** " and if it is not correct please contact us.
Last edit: 6 years 6 months ago by saman2.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 6 months ago #304087 by krileon
Replied by krileon on topic Substitutions for usergroup name?

but i have more than 100 Jusergroups...can you suggest any easier way?

I guess a CB Query Field and query for their usergroups.

but it seems deprecated...

It is.

i want show usergroup in his profile and i have more than 100 usergroup that maybe need to add or remove some of them in future.

We have no usage for that. There are no plans to implement usage for that. What usergroups a user specifically belongs to for security purposes should never be exposed.

that you say use CB query field. if i can get usergroup , then how to show result in some statement? for example i want say :
you are in " **** " and if it is not correct please contact us.

Query for their usergroups then substitute the query field into a Custom HTML field or use the query fields layout parameters or display parameters to customize how it outputs. Query example as follows would grab all the usergroup titles assigned to them.

Query:
Code:
SELECT g.`title` FROM `#__user_usergroup_map` AS m INNER JOIN `#__usergroups` AS g ON g.`id` = m.`group_id` WHERE m.`user_id` = '[user_id]'
Output: Multiple Rows
Row:
Code:
[column_title],


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.

  • saman2
  • saman2
  • ONLINE
  • Posts: 404
  • Thanks: 7
  • Karma: -1
6 years 6 months ago #304091 by saman2
Replied by saman2 on topic Substitutions for usergroup name?

krileon wrote: What usergroups a user specifically belongs to for security purposes should never be exposed.

is possible say me what is that's problem? i want do that but not at all costs. if it can harmful for my site can you say me why?
if i want implement that , is there any tips that i need do that for secure my site?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 6 months ago #304095 by krileon
Replied by krileon on topic Substitutions for usergroup name?
Because Usergroups are a part of ACL. The permission system. You're exposing what permissions a user has for everyone to see. It seams like you're trying to use ACL as a means of profile type or something of the sort, which would've been better to just use a field for that.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum