Skip to Content Skip to Menu

Module for filtering the activity feed

  • Latypov
  • Latypov
  • ONLINE
  • Posts: 9
  • Thanks: 0
  • Karma: 0
1 day 6 hours ago #344284 by Latypov
Hi. Tell me how to make a module that allows you to filter the activity feed. The standard filter that is built into the activity feed plugin is not very intuitive. This way, the filter will always be visible. And it will be possible to make several modules for specific filtering. I want to make a filter in the module of links based on different contact types (Friend, Co Worker, Family, etc.)

Thanks, best regards 
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50596
  • Thanks: 8666
  • Karma: 1473
1 day 1 hour ago #344288 by krileon
Replied by krileon on topic Module for filtering the activity feed
No such feature is provided.

The standard filter that is built into the activity feed plugin is not very intuitive.

In what way is it not intuitive? Suggestions are certainly welcomed.

This way, the filter will always be visible.

The filter bar shows exactly what you've filtered by. Is there a specific reason you want all the inputs always visible?

I want to make a filter in the module of links based on different contact types (Friend, Co Worker, Family, etc.)

Filters can be applied by GET. So you can create an HTML module and add buttons that link to your CB Activity page and force a filter to be applied. Example as follows.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbactivity&action=activity&stream=1&filter=FILTER_ID_HERE

Replace FILTER_ID_HERE with the ID of the filter you want to apply. A filters ID is just its row number. So for example in your case "Connections" is just a filter ID of 1. All of the searches work this way. So for example if you want a URL to mention someone it'd just be as follows.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbactivity&action=activity&stream=1&mentioned=USERNAME_HERE

Due to this you could effectively make your own search module entirely with an HTML form.


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.

  • Latypov
  • Latypov
  • ONLINE
  • Posts: 9
  • Thanks: 0
  • Karma: 0
6 hours 45 minutes ago - 6 hours 30 minutes ago #344294 by Latypov
Replied by Latypov on topic Module for filtering the activity feed
Creating a link to filter the feed is a good idea. Tell me how to make a link for Connection Types.
Attachments:
Last edit: 6 hours 30 minutes ago by Latypov.

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

  • Latypov
  • Latypov
  • ONLINE
  • Posts: 9
  • Thanks: 0
  • Karma: 0
6 hours 33 minutes ago #344295 by Latypov
Replied by Latypov on topic Module for filtering the activity feed

The filter bar shows exactly what you've filtered by. Is there a specific reason you want all the inputs always visible?

I want to make a module that's always visible in the sidebar-left position. I want it to stick as the feed scrolls (apply the CSS sticky style to it). This way, users can quickly filter the feed with one click. Currently, they have to go to the top of the feed and click on the filter.

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

  • Latypov
  • Latypov
  • ONLINE
  • Posts: 9
  • Thanks: 0
  • Karma: 0
2 hours 44 minutes ago #344297 by Latypov
Replied by Latypov on topic Module for filtering the activity feed
I tried to create a module with links for filtering by contacts. I couldn't do it. Can you tell me which links should I use to filter the feed by Flair?

I tried two options. It doesn't work


index.php?option=com_comprofiler&view=pluginclass&plugin=cbactivity&action=activity&stream=1&flair=1

index.php?option=com_comprofiler&view=pluginclass&plugin=cbactivity&action=activity.flair&flair=1

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50596
  • Thanks: 8666
  • Karma: 1473
1 hour 31 minutes ago #344299 by krileon
Replied by krileon on topic Module for filtering the activity feed

Creating a link to filter the feed is a good idea. Tell me how to make a link for Connection Types.

You can't directly link to a filter by connection type. That's not an option for streams. You have to use one of the filters you've configured within your activity stream under the Filters tab. All of the "Search By" can also be linked to.

I want to make a module that's always visible in the sidebar-left position. I want it to stick as the feed scrolls (apply the CSS sticky style to it). This way, users can quickly filter the feed with one click. Currently, they have to go to the top of the feed and click on the filter.

There's nothing stopping you from doing that with the filter bar using CSS. It'd then sticky and scroll with the page. For example the below CSS works on our demo site to make it sticky and be just below the menu bar.
Code:
.activityStreamToolbar.streamFilters { position: sticky !important; top: 115px; z-index: 999; }

I tried to create a module with links for filtering by contacts. I couldn't do it. Can you tell me which links should I use to filter the feed by Flair?

Filter by flair via GET works as well. Example as follows.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbactivity&action=activity&stream=1&flair=FLAIR_ID_HERE

Flair ID can be found in CB Activity > Activity > Flairs.

I tried two options. It doesn't work

Will investigate further and patch if I find a bug with URL filtering. Isn't really meant to be the main way to interact with filters, but are supposed to work regardless.


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