Skip to Content Skip to Menu

Connection & autoactions

  • phcprod
  • phcprod
  • OFFLINE
  • Posts: 39
  • Thanks: 1
  • Karma: 0
4 years 3 months ago #319946 by phcprod
Replied by phcprod on topic Connection & autoactions
Thank you very much for your answer.
My website has author and members who want to hear their news or their content.
Community Builder offers all the functionalities, better than its competitors, but for my specific case it is necessary to consider that each author has his own community, his own independent cb from each other.
With the default features I noticed that by allowing access to author's "private" content, all members who belong to the same accesslevel can access to the content governed by the "privacy accesslevel" rule.
So I have to work with groups, one group per author.
By testing the "privacy usergroups" rules, all members also had access to content of all authors because the groups are all children of "registered".
I must therefore distinguish the group of author_a from the group of author_b, author_c, etc ...
I think the only way is to use the relationships through autoactions because I can't ask the member to request a relationship with an author ... and ask the member to wait while the author accepts the relationship.
So the system of relations proposed in cb and triggered by autoactions seems good to me.
The ideal would be to be able to add conditions to the privacy rules such as:
- public -> displayed to all (same as basic privacy rules)
- private -> displayed to the owner (same as basic privacy rules)
- registered -> displayed by registered (same as basic privacy rules)
- accesslevel -> displayed by members who are in a common "author" group (same as basic privacy rule) AND in addition which correspond to the condition that usergroupid of viewing user = recorded value of the custom field "cb_usergroup_id"
In this case, if author_a is set to "3" in its custom field "cb_usergroup-id" only members of the author_a group with id = 3 can see the protected content of author_a.... if not public, private or registerd users rules are applied.
If you have a better solution or another idea, I'll take it;)

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
4 years 3 months ago #319947 by krileon
Replied by krileon on topic Connection & autoactions

Community Builder offers all the functionalities, better than its competitors, but for my specific case it is necessary to consider that each author has his own community, his own independent cb from each other.

That's exactly what CB GroupJive aims to provide. They're independently ran communities. Your author's could simply be owners of a group. If they want the group private they can set its mode to Invite and turn invites off so only they can invite others to join. You can demo CB GroupJive below.

demo.cbdemosites.com/demos/cb-groupjive/all-groups

CB GroupJive can be integrated with CB Activity and CB Gallery using CB Auto Actions and its System Actions as well so each group would have its own group specific activity stream and gallery. Note you will not need to use CB GroupJive Photos, CB GroupJive Files, CB GroupJive Videos, or CB GroupJive Wall if integrating CB Activity and CB Gallery.

I understand why you're using usergroups, but over time that will significantly bloat your sites ACL and slow it down more and more. I do not recommend going that direction and highly recommend considering using CB GroupJive instead.

If CB GroupJive won't fit your needs your best option is to use a Query Select to query for all authors. Then you'd have a CB Auto Actions act on the value of that query select field to establish a connection. Next your authors would simply use the Connections privacy rule instead of needing to use an ACL privacy rule. Example of how to do this as follows.

Query Field
Name: cb_author
Type: Query Drop Down (Single Select)
Parameters > Query
Query:
Code:
SELECT u.`id`, u.`name` FROM `#__users` AS u INNER JOIN `#__user_usergroup_map` AS g ON g.`user_id` = u.`id` WHERE g.`group_id` = AUTHOR_GROUP_ID
Parameters > Options
Value Column: id
Label Column: name

With the above you only need 1 usergroup that you'd assign to every author. You don't need a per-author usergroup. You'd set its ID to AUTHOR_GROUP_ID. It will display a dropdown field with their names that you can select within a users profile. Now we just need to act on this field changing to establish the connections. This is done using the below in CB Auto Actions.

Global
Triggers: onAfterUserUpdate, onAfterUpdateUser
Type: Connection
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var1_cb_author]
Operator: Not Equal To
Value: [var3_cb_author]
Condition 2
Field: cb_author
Operator: Not Empty
Action
Users: [cb_author]

This should connect the user being edited to whatever author is selected in cb_author. You can turn off profile edit display for the field if you only want it accessible in backend otherwise you can use CB Privacy edit permissions to limit access in profile edit to just moderators for example.


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