Skip to Content Skip to Menu

SOLVED: Group Jive - How to restrict access to photos and user list.

  • Florance
  • Florance
  • ONLINE
  • Posts: 13
  • Thanks: 4
  • Karma: 2
1 day 16 hours ago #341413 by Florance
Hello CB Team,

With regards to CB Group Jive, setting a group to invite or approval shows the groups photos and groups members to users who have not joined the group.

The tabs for files, forum and events are only visible to users who have joined the group which is what I want.

Can you tell me how to also make the groups photos and list of members hidden to those who have not joined the group please?
I have set the Photos configuration to display "Yes with approval".

In other words, the only tab that should be visible to people who have not joined the group is the About tab.

Joomla version: 5.3.1
Group Jive: 3.7.0

Many thanks,

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49302
  • Thanks: 8431
  • Karma: 1465
1 day 16 hours ago #341414 by krileon
All tabs are visible for public viewable groups. If you don't want them visible you should use a Private group type. In a future release there will be some better control over group tab visibility available for group owners to control, but for now no such feature is available.


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

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

  • Florance
  • Florance
  • ONLINE
  • Posts: 13
  • Thanks: 4
  • Karma: 2
1 day 15 hours ago #341415 by Florance

Hi Kyle, wrote: In a future release there will be some better control over group tab visibility available for group owners to control, but... 

Ok, I can simply set the access level for the photos and user list for groups to Super Admin until the privacy controls are available however, do you have an estimated release date please? This additional privacy control would be very useful to group owners. Something like the current privacy controls for users profiles.

Thank you.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49302
  • Thanks: 8431
  • Karma: 1465
1 day 15 hours ago #341416 by krileon
I do not have a timeframe. It's possible to implement this using CB Auto Actions globally. For example removing all tabs except the About if the viewing user isn't a member of the group. I can provide an example if you'd like to use that approach.


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.

  • Florance
  • Florance
  • ONLINE
  • Posts: 13
  • Thanks: 4
  • Karma: 2
1 day 15 hours ago #341417 by Florance

I do not have a timeframe. It's possible to implement this using CB Auto Actions globally. For example removing all tabs except the About if the viewing user isn't a member of the group. I can provide an example if you'd like to use that approach.

Wow, yes please!
I have used CB Auto Actions previously but for very simple tasks so your help with configuring this action is greatly appreciated.
 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49302
  • Thanks: 8431
  • Karma: 1465
19 hours 20 minutes ago #341419 by krileon
Ok, the solution is a bit silly, but gets the job done. There's no trigger for directly handling the array of tabs. Instead we need to remove the tabs HTML from the return response which would be the display of the group. The below will do this. It will remove every tab except the About tab if the viewing user is not a member of the group and is not a CB Moderator.

Global
Triggers: gj_onAfterDisplayGroup
Type: Code
User: Self
Access: All Non-Moderators
Action
Method: PHP
Code:
Code:
if ( ! in_array( $variables['var2']->getInt( 'type', 0 ), [ 2, 5 ], true ) ) { // the group isn't an invite or approval group so skip removing tabs return; } if ( $user->getInt( 'id', 0 ) === $variables['var2']->getInt( 'user_id', 0 ) ) { // viewing user is the owner of the group so skip removing tabs return; } if ( \CB\Plugin\GroupJive\CBGroupJive::getGroupStatus( $user, $variables['var2'] ) >= 1 ) { // viewing user is an active member of the group so skip removing tabs return; } // run some regexp to remove the tabs original html before it has been processed by javascript from the output buffer $variables['var1'] = preg_replace( '%<div class="cbTabPane tab-pane cbTabPaneMenu" id="cbtabpanegrouptab(?:activity|wall|photo|video|file|events|users)"><h2 class="cbTabNav cbNavBarItem nav-item" id="cbtabnavgrouptab(?:activity|wall|photo|video|file|events|users)"><a href="#cbtabpanegrouptab(?:activity|wall|photo|video|file|events|users)" class="cbTabNavLink cbNavBarLink nav-link">.+</a></h2><div class="cb_tab_content cb_tab_menu" id="cb_tabid_grouptab(?:activity|wall|photo|video|file|events|users)">.+</div></div>%is', '', $variables['var1'] );
Parameters
Reference Variables: Variable 1

I've tested the above and confirmed it works. This will also only apply to Approval and Invite group types. All other types are left alone. I've added comments for reach step so its a little understood what's going on in the code. Note this can result in groups basically having an empty tab bar if the group didn't supply any About content.


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

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

Moderators: beatnantkrileon
Powered by Kunena Forum