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

Moo64c’s picture

Status:Active» Needs review
StatusFileSize
new12.72 KB

First attempt.

Moo64c’s picture

StatusFileSize
new12.71 KB

Rerolled (diff was wrong).

Moo64c’s picture

StatusFileSize
new15.95 KB
new18.47 KB
new25.15 KB
new27.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".

S003.png

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

S006.png

Result:

S008.pngS009.png

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
StatusFileSize
new16.27 KB

Thanks for the patch and screenshots, Moo64c!

I did some initial testing and made the following changes:

- Moved the

<?php
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 strongarm.inc file and committed. Huge thanks, Moo64c!

http://drupalcode.org/project/commons_follow.git/commit/33b2caf

Status:Fixed» Closed (fixed)

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