Group deletion / Group link

1 year 6 months ago - 1 year 6 months ago #331272 by krileon
Replied by krileon on topic Group deletion / Group link

1. If I set as owner the system Admin, he will have a ton of groups created in his profile by various users.

Doesn't have to be your system admin. You can create a regular registered user for the sole purpose of holding onto groups.

2. With the above, in all groups created, the owner appears to be the system Admin.

You can use CSS to hide them under the Users tab or just not display the Users tab at all.

3. During group creation I use "Some text [cb_company]" as group name. What happens is that every group, instead of showing Admin's company name, it shows system Admin's company.

Use substitution parameters to specify who you want the information to come from. For example the below would output cb_company for the user who fired the trigger.

[cb:userdata field="cb_company" user="#me" /]

You also have access to the trigger variables itself and if it's a registration trigger then you've access to the raw user data via var1 substitutions. Example as follows.

[var1_cb_company]

The below will also work.

[cb:userdata field="cb_company" user="[var1_user_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.
The following user(s) said Thank You: galanopd

Please Log in to join the conversation.

1 year 6 months ago - 1 year 6 months ago #331277 by galanopd
Replied by galanopd on topic Group deletion / Group link

Doesn't have to be your system admin. You can create a regular registered user for the sole purpose of holding onto groups.

Will it be ok for a user to have hundreds of groups? Is there a limit?

You can use CSS to hide them under the Users tab or just not display the Users tab at all.

I will try to see how to implement this

Use substitution parameters to specify who you want the information to come from. For example the below would output cb_company for the user who fired the trigger.
[cb:userdata field="cb_company" user="#me" /]
You also have access to the trigger variables itself and if it's a registration trigger then you've access to the raw user data via var1 substitutions. Example as follows.
[var1_cb_company]
The below will also work.
[cb:userdata field="cb_company" user="[var1_user_id]" /]

Yes, this way [cb:userdata field="cb_fieldgrp__0__cb_company" user="[var1_user_id]" /] it worked an brought Admin's company. It is not during registration but onAfterUserApproval. Perfect, thanks



Concerning the 2nd part of my original post

Not sure I understand the need for this given you already have a Group tab visible on their profile that will display it and link to it.

Inside the active tab a user sees when visits a profile, I have some fields and I need one of them to be a link to the specific group and the specific tab of that group "Users".

At any rate the non-SEF URL that you should use is as follows.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbgroupjive&action=groups&func=show&id=GROUP_ID_HERE

I tried index.php?option=com_comprofiler&view=pluginclass&plugin=cbgroupjive&action=groups&func=show&id=3#cbtabpanegrouptabusers but it doesn't take me to users tab directly. How can I do this?

You will need access to the group id. How you get that is entirely up to you. You could store it after creating the group, you could use a Code Field to use PHP to get their group, you could use a Query Field to use SQL to query for it.

Thanks, I will try to work it out

Please Log in to join the conversation.

1 year 6 months ago #331278 by krileon
Replied by krileon on topic Group deletion / Group link

 Will it be ok for a user to have hundreds of groups? Is there a limit?

Yes. There is no limit. My local test has my admin user owning over 100,000 groups. It's performance tested to scale.

I tried index.php?option=com_comprofiler&view=pluginclass&plugin=cbgroupjive&action=groups&func=show&id=3#cbtabpanegrouptabusers but it doesn't take me to users tab directly. How can I do this?

Add &tab=TAB_NAME_CLASS_OR_ID_HERE to the URL to link to a specific tab. So for example &tab=Users should work.
 


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

Please Log in to join the conversation.

1 year 6 months ago - 1 year 6 months ago #331280 by galanopd
Replied by galanopd on topic Group deletion / Group link

Yes. There is no limit. My local test has my admin user owning over 100,000 groups. It's performance tested to scale.

Perfect, I will do as you say.

Add &tab=TAB_NAME_CLASS_OR_ID_HERE to the URL to link to a specific tab. So for example &tab=Users should work.

Yes, that worked, thank you.

You can use CSS to hide them under the Users tab or just not display the Users tab at all.

I have implemented this but I can't find how to set it only for the specific group category. .gjGroupUsersUserOwner hides all the owners from all groups under Group tab no matter the category. The group category id that I need to hide its owners is 1 and I can't find something like .gjCategories to narrow it down. Is there another way of doing it?

Please Log in to join the conversation.

1 year 6 months ago #331288 by krileon
Replied by krileon on topic Group deletion / Group link

I have implemented this but I can't find how to set it only for the specific group category. .gjGroupUsersUserOwner hides all the owners from all groups under Group tab no matter the category. The group category id that I need to hide its owners is 1 and I can't find something like .gjCategories to narrow it down. Is there another way of doing it?

There isn't a CSS class on that page that's category specific. Probably the only way to have conditional CSS like that is to use CB Auto Actions. A code action on gj_onBeforeDisplayGroup can accomplish this as you'll be able to condition against the group category id using the below.

Field: [var2_category]
Operator: Equal To
Value: CATEGORY_ID_HERE


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

Please Log in to join the conversation.

1 year 6 months ago - 1 year 6 months ago #331290 by galanopd
Replied by galanopd on topic Group deletion / Group link
Yes!
That worked, thank you Kyle!
Spent last night struggling with this!
You really know the CB environment well after all !!! 
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.314 seconds

Facebook Twitter LinkedIn