Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comments
Comment #1
Moo64c CreditAttribution: Moo64c commentedFirst attempt.
Comment #2
Moo64c CreditAttribution: Moo64c commentedRerolled (diff was wrong).
Comment #3
Moo64c CreditAttribution: Moo64c commentedTo 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.
Result:
Notice: message subscribe module should be enabled, and so should relevant flags (subscribe_node, subscribe_user, etc..)
Comment #4
ezra-g CreditAttribution: ezra-g commentedThanks for the patch and screenshots, Moo64c!
I did some initial testing and made the following changes:
- Moved the
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.
Comment #5
Moo64c CreditAttribution: Moo64c commentedUsing your patch:
- Cleaned up views handlers.
- Added an integration for following a group.
- Minor cleanups.
Comment #6
ezra-g CreditAttribution: ezra-g commentedThanks, Moo64c!
I'm bumping this to "critical" so that it'll show up on the top of issues I should work on next.
Comment #7
ezra-g CreditAttribution: ezra-g commentedI added the missing strongarm.inc file and committed. Huge thanks, Moo64c!
http://drupalcode.org/project/commons_follow.git/commit/33b2caf