Use message_subscribe module's subscription flags to differentiate between content that the user is subscribed to and content that the user is not subscribed to.
Add a view handler.

Members fund testing for the Drupal project. Drupal Association Learn more


Moo64c’s picture

Status: Active » Needs review
12.72 KB

First attempt.

Moo64c’s picture

12.71 KB

Rerolled (diff was wrong).

Moo64c’s picture

15.95 KB
18.47 KB
25.15 KB
27.21 KB

To use the filtering - in a view, create a contextual filter for node IDs with the following settings:
- Allow multiple values.
- Under "When filter value is not in the URL" - "provide default value" - select "The node IDs the user is subscribed to".


To expose this filter, add a "Content: User Follow" filter and expose it.





Notice: message subscribe module should be enabled, and so should relevant flags (subscribe_node, subscribe_user, etc..)

ezra-g’s picture

Project: Commons Follow » Drupal Commons
Component: Code » Activity/status streams
16.27 KB

Thanks for the patch and screenshots, Moo64c!

I did some initial testing and made the following changes:

- Moved the

return $nids

into commons_follow_get_nids (it was outside of the function's close bracket)

- Renamed common_follow_get_subscription_flags_ids() to commons_follow_get_subscription_flags_ids (plural)

- Exported the 'message_subscribe_flag_prefix' variable to commons_follow so that we can use the existing Commons Follow flags.

Based on initial testing this appears to be working well!

Remaining is the integration for following a group.

Marked #1828778: Create a view handler to display content user subscribed to as a duplicate and moving to the main Commons queue which we've started to use to centralize Commons issues, including those that affect included projects such as Commons_Follow.

Moo64c’s picture

Using your patch:

- Cleaned up views handlers.
- Added an integration for following a group.
- Minor cleanups.

ezra-g’s picture

Assigned: Moo64c » ezra-g
Priority: Normal » Critical

Thanks, Moo64c!

I'm bumping this to "critical" so that it'll show up on the top of issues I should work on next.

ezra-g’s picture

Status: Needs review » Fixed

I added the missing file and committed. Huge thanks, Moo64c!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.