[#7719] Filters in CB Activity

4 years 7 months ago - 4 years 7 months ago #314237 by Vorak
[#7719] Filters in CB Activity was created by Vorak
Hello,

I noticed it is possible to add "filters" to CB Activity. However, it's unclear to me how to create particular filters:

- Is it possible to filter forum posts (Kunena)? For example: only Kunena posts, or all posts except Kunena posts
- Is it possible to add a filter that shows only activity wall posts? Meaning only posts that people actually wrote on it, so no "is now connected with" or "joined group".
- Is it possible to add a filter that shows only posts from groups that a user is member of, or only of pictures the user's connections have uploaded to their gallery?

Thanks!

Please Log in to join the conversation.

4 years 7 months ago #314245 by krileon
Replied by krileon on topic Filters in CB Activity
See my blog post below which explains and shows some filter examples.

www.joomlapolis.com/blog/kyle/18850-cb-activity-5-0-0

- Is it possible to filter forum posts (Kunena)? For example: only Kunena posts, or all posts except Kunena posts

Yes, using an asset filter you can do that. Kunena activity is stored with an asset of kunena.POST_ID so an asset filter of kunena.% will show only Kunena activity.

- Is it possible to add a filter that shows only activity wall posts? Meaning only posts that people actually wrote on it, so no "is now connected with" or "joined group".

Yes, direct posts on a stream are stored with an asset of profile.USER_ID so an asset filter of profile.% should filter only to direct posts.

- Is it possible to add a filter that shows only posts from groups that a user is member of, or only of pictures the user's connections have uploaded to their gallery?

Yes, basically same situation as above. GJ example is in my blog.


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 7 months ago #314249 by Vorak
Replied by Vorak on topic Filters in CB Activity
Hello,

Thanks for the response. I have a few additional questions and remarks:

The asset of the activity module itself I have set to "self,connectionsonly" because I only want the activity wall to show posts of the user and his connections only.
Does this asset setting automatically also apply to the filters, or do they need to be set there as well?

The idea is that all fiters also only show posts related to the user himself and to his connections. However, when I try to apply this, it doesn't work and clicking on a filter just reloads whatever the previously shown filter showed. So I assume that I have put my settings in wrong.

I tried a few different combinations, such as e.g. "kunena.%,self,connectionsonly", or added the "self,connectionsonly" to the "users" field in the filter. I tried the settings as in the examples on your blog post as well, but the same results. When I leave all those out and only do e.g. kunena.% then it also shows posts from users not in my connections.

In addition to have a filter that shows kunena posts of both the user himself and his connection, I also want to have a filter that shows kunena posts ONLY of the user himself and not of his connections (so you'd have a handy overview of all the posts you have made).

As for the groups: here I would like to show posts ONLY of the groups a user is member of. This means:
- no posts of groups he's not a member of, even if the post is made by someone of his connections.
- includes posts of groups he's a member of, even if that post is made by someone not of his connections (but obviously someone who is member of a group he's in).

Also, what asset do I use to show only posts of the image gallery?

Just an idea: it might be handy to make a list/overview of all standard available assets, and exactly what they do. This assets functionality allows for so many possibilities, which is really great, but it also makes it more complesx and the tooltip doesn't really make it clear enough - for me anyway. A list in which I can find any standard asset and look up what it's supposed to do and where it's supposed to be used, would make things alot easer. :)

Please Log in to join the conversation.

4 years 7 months ago #314282 by krileon
Replied by krileon on topic Filters in CB Activity

The asset of the activity module itself I have set to "self,connectionsonly" because I only want the activity wall to show posts of the user and his connections only.

That would display all activity from the logged in users connections.

Does this asset setting automatically also apply to the filters, or do they need to be set there as well?

Filters just change the asset the stream is outputting. So if you want it to output a specific asset then you'd supply that for the asset.

The idea is that all fiters also only show posts related to the user himself and to his connections. However, when I try to apply this, it doesn't work and clicking on a filter just reloads whatever the previously shown filter showed. So I assume that I have put my settings in wrong.

Read the parameter descriptions very carefully. It explains how to utilize the filters parameters. You can specify multiple assets separated by a comma as well.

I tried a few different combinations, such as e.g. "kunena.%,self,connectionsonly", or added the "self,connectionsonly" to the "users" field in the filter. I tried the settings as in the examples on your blog post as well, but the same results. When I leave all those out and only do e.g. kunena.% then it also shows posts from users not in my connections.

Set the Asset to kunena.% and set Users to "connections" (without quotes).

In addition to have a filter that shows kunena posts of both the user himself and his connection, I also want to have a filter that shows kunena posts ONLY of the user himself and not of his connections (so you'd have a handy overview of all the posts you have made).

Same as the above except set Users to [user_id].

As for the groups: here I would like to show posts ONLY of the groups a user is member of. This means:
- no posts of groups he's not a member of, even if the post is made by someone of his connections.
- includes posts of groups he's a member of, even if that post is made by someone not of his connections (but obviously someone who is member of a group he's in).

Same as the above. Use the Asset in combination of the Users filter. Beyond that there's no special assets available for GJ specifically at this time. My blog provides a GJ example already for handling this.

Also, what asset do I use to show only posts of the image gallery?

Review your activity in CB Activity > Activity. All of the assets of stored activity are there. Formulate an Asset parameter value based off the assets of the stored activity. Substitute in a wildcard using % when necessary. So for example gallery.photos.30340 becomes gallery.% to display all CB Gallery activity or gallery.photos.% to show all CB Gallery photos activity.


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 7 months ago #314300 by Vorak
Replied by Vorak on topic Filters in CB Activity
Hello,

Thanks for your reply.

You say that the assets self,connectionsonly only shows activity of logged in users. I thought this would show all your own posts + all posts of your connections (regardless of whether they are logged in at that moment or not). When I change "connectionsonly" to "connections", the same posts still appear. Anyway, I have now set it to "connections".

I did read the parameter description carefully, but I have difficulty interpreting it correctly. I have set the filters as you suggested, but I still get the same issue. This is what I have as filter settings (access level is in all cases "registered"):

Filter: My Posts
Assets: self
Users: (left empty)
Results: this works as expected, it only shows my own activity

Filter: Forum Posts
Assets: kunena.%
Users: connections
Results: does not work, simply reloads the last used filter and therefore shows unrelated activity

Filter: My Forum Posts
Assets: kunena.%
Users: [user_id]
Results: this works as expected, it only shows my own kunena-related activity

Filter: Group Posts
Assets: groupjive.%
Users: connections
Results: does not work, simply reloads the last used filter and therefore shows unrelated activity

Filter: Gallery Posts
Assets: gallery.%
Users: connections
Results: does not work, simply reloads the last used filter and therefore shows unrelated activity

Filter: Wall Posts
Assets: profile.%
Users: connections
Results: does not work, simply reloads the last used filter (it's supposed to show only activity particular for the CB Activity wall, so no kunena posts etc.)


Now when I remove the parameter "connections" in "users" for these filters, they all show the related posts (forums, groups, gallery, ...) but of ALL users and not ONLY connections. :(

So I'm still not sure what I'm doing wrong...

Please Log in to join the conversation.

4 years 7 months ago #314302 by krileon
Replied by krileon on topic Filters in CB Activity

You say that the assets self,connectionsonly only shows activity of logged in users. I thought this would show all your own posts + all posts of your connections (regardless of whether they are logged in at that moment or not). When I change "connectionsonly" to "connections", the same posts still appear. Anyway, I have now set it to "connections".

You said you were using it in an Activity module so yes it will only do anything if you're logged in otherwise the module has no clue who you are.

Now when I remove the parameter "connections" in "users" for these filters, they all show the related posts (forums, groups, gallery, ...) but of ALL users and not ONLY connections

It sounds like the connections usage isn't working for you for some reason. Is CB Activity completely up to date? How many connections do you have?


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.

Moderators: beatnantkrileon
Time to create page: 0.221 seconds

Facebook Twitter LinkedIn