Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

CB activity: How to hide certain activities from certain users

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
8 years 1 day ago #290532 by timstohr
Hi Kyle,
I have an interesting problem for you. I have listed the facts as bulletpoints to make it easier to read:
1) I have a site where are a LOT of events are happening (I am using a third party event component) where all events are created.
2) I have auto-actioned the cb activity stream into each event that is happening.
3) I have labelled all activities that happen in the events activity stream already on the main stream using the override you have written.
4) I am using an activity module on the homepage, kind of like Facebook does with the homescreen.
5) How can I set that the events activities (people posting questions in the activity stream, location updates etc...) only gets shown on the module if a person who is viewing the module has clicked on a button in the events that they are interested in the event?

Would be great to know :)

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
8 years 1 day ago #290548 by krileon
Same way GJ and CB Gallery do it by parsing through the activity and removing what they don't have access to. You can also modify the database queries like GJ does to extend the activity query and remove those entries at a query based level. This is all done by using triggers. See the below for how CB Gallery does it.

components/com_comprofiler/plugin/user/plug_cbgallery/library/Trigger/ActivityTrigger.php

The trigger binding is in the following file at the top.

components/com_comprofiler/plugin/user/plug_cbgallery/cbgallery.php

CB GroupJive does the same for it self and each of its integrations. Note this API has changed entirely in CB Activity 4.0.0. Most of the trigger names have change as well as the API has breaking changes and to avoid fatal errors trigger names were changed.


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.

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
8 years 1 day ago #290561 by timstohr
OK thanks, I will ponder on what you have written and then start thinking of implementing it. Will properly do only when the new activity is out.
Thanks
Tim

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
8 years 1 day ago #290571 by krileon
Updating the old usage to the new usage took just a few short minutes and the old usage will not cause fatal errors (due to the triggers changing to prevent such cases). So you maybe able to just go ahead and implement it now following how GJ and CB Gallery do it then make the minor adjustments to update it after CB Activity 4.0.0 is out. Note GJ and CB Gallery releases will be made the same day as CB Activity to make them compatible.


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