[#7653] How to filter on cb activity modules?

4 years 9 months ago - 4 years 8 months ago #313329 by timstohr
Hi Kyle,
I am using the cb activity bot to call in activity streams into menues. I would like to introduce the ability for users to filter there as well. Any way to do that?

Kind regards,
Tim

Please Log in to join the conversation.

4 years 9 months ago #313334 by timstohr
Amazing, the filter is now inside the module. However it is not inside the CB Activity Bot (although I just updated it). I am guessing that you simply forgot to update the description?

It would be great to have the description updated as well because I have no idea what language I have to use to allow the filtering.

Best
Tim

Please Log in to join the conversation.

4 years 9 months ago - 4 years 9 months ago #313344 by krileon
The filtering works everywhere so yes it can be used in the substitution usages. It wasn't added to the description because most won't have a clue how to correctly format the JSON string and would just confuse users. It's significantly easier to simply use a module and substitute in the module in most cases. Example as follows for the expected JSON string.

[{"filter":"Groups","assets":"groupjive.%","users":"[user_id],connections","access":"1"},{"filter":"Connections","assets":"connectionsonly","users":"","access":"1"}]

That should display a Groups and Connections filter.

Configuring streams all over the place will be a thing of the past in a future release. The plan is to have a backend management view for streams. There you'd pre-configure the streams (as many as you like) then in the module you'd just select the pre-configured stream and substitution usages just supply the stream id. The idea is to centralize stream configuration so they're easier to manage.


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.

4 years 9 months ago #313350 by timstohr
Hey Kyle,
Yeah I am trying something similar with the CB Activity Bot. I have a few different types of stream activity bot strings that I just copy and paste where I want to have them.
Still having problem though with the CB Activity Bot. Not managing to set it up...

I am using this here:
[cbactivity:activity asset="mainforum.[user_id],mainforum.%,onlyconnected.mainforum.%,groupjive.group.%,marketplace.%,events.%,jobs.%","filter":"Groups","assets":"groupjive.%","users":"[user_id],connections","access":"1","filter":"Connections","assets":"connectionsonly","users":"","access":"1"/]

Could you help?
Also, I think it would be better to have the sequence added in CB Activity Bot description as only advanced users tend to use CB Activity Bot for anything more complex.

Please Log in to join the conversation.

4 years 9 months ago - 4 years 9 months ago #313352 by krileon
The JSON string needs to be added to the filters parameter. Example as follows.

filters="[{"filter":"Groups","assets":"groupjive.%","users":"[user_id],connections","access":"1"},{"filter":"Connections","assets":"connectionsonly","users":"","access":"1"}]"

That probably won't even work without encoding the nested JSON. So probably has to be as follows. It's just not a usecase I planned to account for as the vast majority aren't going to be doing this.

filters="[{\"filter\":\"Groups\",\"assets\":\"groupjive.%\",\"users\":\"[user_id],connections\",\"access\":\"1\"},{\"filter\":\"Connections\",\"assets\":\"connectionsonly\",\"users\":\"\",\"access\":\"1\"}]"

If that doesn't work then probably has to be HTML encoded, which might not even decode right.

filters="[{"filter":"Groups","assets":"groupjive.%","users":"[user_id],connections","access":"1"},{"filter":"Connections","assets":"connectionsonly","users":"","access":"1"}]"

Also, I think it would be better to have the sequence added in CB Activity Bot description as only advanced users tend to use CB Activity Bot for anything more complex.

I don't think adding filters example JSON string would be of any use to the majority of users. It's just too confusing to use there. Nothing in your current usage warrants even using CB Activity Bot. It would be significantly easier for you to use a CB Activity Module and load it in using the below.

docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F


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.

4 years 9 months ago #313357 by timstohr
Yeah I had used that arrangement at first but it does not work perfectly with my multi-site arrangement... So this way, I can display a certain module from my main database (which is a custom HTML code containing the CB Activity bot code) and display it on all my sister websites. That means I can immediatly control all Streams from all my sites via the cb activity bot code from my main site.
Having a stream backend like you are planning would naturally make it a LOT easier and neater (I can share aspects of Community Builder without any problems between the different sites but not modules (apart from custom HTML modules).

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.227 seconds

Facebook Twitter LinkedIn