Here is a patch to add a subscribe/unsubscribe field for nodes in views. Use it to add a subscribe link to a table of results, show a subscribe/unsubscribe views block on node pages, or whatever else your cunning mind can come up with.

Rough patch based on a module I created for a client, needs testing.

/Robin

Comments

robin monks’s picture

Status: Active » Needs review
salvis’s picture

Status: Needs review » Needs work

That's very interesting.

Unfortunately I get

The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.

when I try to add the Subscribe link field.

EDIT: Yes, I've cleared all caches.

robin monks’s picture

Stupid me forgot the menu callbacks for this from the original module; I'll re-roll later.

leomaru79’s picture

Any progress to fix this? I'm having this issue too and need to put a subscribe link in one of my Views. Any workaround?

Patribus’s picture

same here!

robin monks’s picture

Barring natural disaster I'll make a new patch this weekend; that, of course, stops no one from re-rolling it before I get the opportunity (somehow managed to forget about this issue >.<)

robin monks’s picture

Status: Needs work » Needs review
StatusFileSize
new8.26 KB

Alright, this should fix things back to a working state; and is based off of 7.x-1.1 (which apparently contains part of my broken patch...somehow?)

This add views links support and menu hooks via tabs, although it's not clear if tabs are desired. In any case it works.

robin monks’s picture

StatusFileSize
new7.79 KB

Alternative a/b patch in proper git format; because PHPStorm is being mean to me.

Patribus’s picture

Hello, I'm trying to apply the patch using this method here http://drupal.org/node/14231#comment-22776.

But somehow I get an error. I did manage it once with another patch, but not with yours.

Can you indicate me how to patch the module files on a windows desktop basis?

thanks

EDIT1: well, i found now this http://drupal.org/node/60179 and I'm using the NetBeans Software to apply the patch

salvis’s picture

The current instructions are on http://drupal.org/patch/apply

salvis’s picture

Feedback?

Patribus’s picture

it's working fine ;-) (is that the feedback you wanted ?)

vuil’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

The patch #8 is ready to be committed! Thanks.

salvis’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new10.26 KB

I meant to commit this, but I found some open issues.

I fixed these:
— move the functionality into its own module in the directory 'views'
— fix a number of t() calls with variable arguments
— improve the look of the option on the content type pages
— add check for 'subscribe to content' permission

This needs work:
— remove the variables in hook_uninstall() to avoid having state that persists across reinstalls

Nice to have:
— add a filter and sort for this virtual field