Group deletion / Group link

1 year 6 months ago - 1 year 6 months ago #331244 by galanopd
Group deletion / Group link was created by galanopd
  • Group deletion
    I have an AA triggered onAfterUserApproval and creates a group having trigger user as owner.
    The group created belongs to a specific group category and this category has only 1 group per user due to Groupjive->Categories->Group->Create access restriction that doesn't allow any user to create groups in this category.
    What I need is users not to be able to delete these groups from their profile although they are owners. So these groups are like "system" groups and can't be deleted.
    Is that possible?
  • Group link
    Following /menu_alias/cateogry_id-category_name/group_id-group_name found in #329903 how can I use href in a field name in the profile to link with the group so the viewing user can go to the specific group related to the displayed user. For instance, using <a href="community/my-groups/1-groupcat" will open the category and show all groups from all users in the category. I need to open the specific group in the category related to the specific displayed user. Now, as this group is a group created by AA onAfterUserApproval (as mentioned above), it is difficult to include the group id in each link for each user. The common thing between these groups is part of their name. During creation is set to "Some text [cb_filename]". So "Some text" is common to all groups in the category while [cb_filename] changes according to different values. So, maybe I can somehow connect [user_id] & [cb_filename] for the displayed user in the link to find the specific group name? Or something else...?

Thanks

Please Log in to join the conversation.

1 year 6 months ago - 1 year 6 months ago #331245 by galanopd
Replied by galanopd on topic Group deletion / Group link
This
<a href="#cbtabpane47" class="cbTabNavExternal" data-tab="47">Groups tab</a>
links to the groups tab of the displayed user but I would like it to link to the particular group mentioned above and specifically to open the tab "Users" (#cbtabpanegrouptabusers) of the group.

Please Log in to join the conversation.

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

Group deletion
I have an AA triggered onAfterUserApproval and creates a group having trigger user as owner.
The group created belongs to a specific group category and this category has only 1 group per user due to Groupjive->Categories->Group->Create access restriction that doesn't allow any user to create groups in this category.
What I need is users not to be able to delete these groups from their profile although they are owners. So these groups are like "system" groups and can't be deleted.
Is that possible?

Suggest not letting them be an owner then. Create the group with the owner being a centralized user of your choosing and force them to join the group as an Administrator. That will give them the highest available privileges without being able to delete it. The only alternative is you'd need to act on the gj_onBeforeDeleteGroup trigger and redirect away using a Redirect action in CB Auto Actions with an error of some kind to block the delete.

Group link
Following /menu_alias/cateogry_id-category_name/group_id-group_name found in #329903 how can I use href in a field name in the profile to link with the group so the viewing user can go to the specific group related to the displayed user. For instance, using <a href="community/my-groups/1-groupcat" will open the category and show all groups from all users in the category. I need to open the specific group in the category related to the specific displayed user. Now, as this group is a group created by AA onAfterUserApproval (as mentioned above), it is difficult to include the group id in each link for each user. The common thing between these groups is part of their name. During creation is set to "Some text [cb_filename]". So "Some text" is common to all groups in the category while [cb_filename] changes according to different values. So, maybe I can somehow connect [user_id] & [cb_filename] for the displayed user in the link to find the specific group name? Or something else...?

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. 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

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.


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 to join the conversation.

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

Suggest not letting them be an owner then. Create the group with the owner being a centralized user of your choosing and force them to join the group as an Administrator. That will give them the highest available privileges without being able to delete it. The only alternative is you'd need to act on the gj_onBeforeDeleteGroup trigger and redirect away using a Redirect action in CB Auto Actions with an error of some kind to block the delete.


You mean that the centralized user will force them to join as administrators manually? Is there a AA for this?

Also, setting the AA to redirect the user doesn't seem to work due to another system AA which is asking for confirmation on deleting the group. Maybe by de-activating this system action it would work? But then the rest of the groups would be deleted immediately upon clicking delete (without confirmation). How can I set the AA to act only on all groups in a specific  group category?

Please Log in to join the conversation.

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

You mean that the centralized user will force them to join as administrators manually? Is there a AA for this?

Meaning someone other than them will own the group. They would just be joining it, but being given the administrator group user status. You can do this using the New Group method of the CB GroupJive auto action type. Simply set Unique to No. Now the owner of the group and the user joining the group can be separate. The below should accomplish that.

Mode: New Group
Name: My Group!
Owner: CENTRALIZED_OWNER_USER_ID_HERE
Unique: No
Auto Join: Yes
Group Status: Admin
User: (leave empty)

Also, setting the AA to redirect the user doesn't seem to work due to another system AA which is asking for confirmation on deleting the group. Maybe by de-activating this system action it would work? But then the rest of the groups would be deleted immediately upon clicking delete (without confirmation). How can I set the AA to act only on all groups in a specific  group category?

Not sure what you're referring to. There is no system action that asks them to confirm delete. The confirm delete dialog is just javascript. The redirect would have to happen on gj_onBeforeDeleteGroup trigger to try and interrupt the delete.


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 to join the conversation.

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

Mode: New Group
Name: My Group!
Owner: CENTRALIZED_OWNER_USER_ID_HERE
Unique: No
Auto Join: Yes
Group Status: Admin
User: (leave empty)

Really nice thanks, I will use it for sure somewhere else but for this specific usecase doesn't help much.

1. If I set as owner the system Admin, he will have a ton of groups created in his profile by various users.
2. With the above, in all groups created, the owner appears to be the system Admin.
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.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.237 seconds

Facebook Twitter LinkedIn