Add in publish/unpublish support per activity
pribeh - September 19, 2009 - 17:58
| Project: | Activity |
| Version: | 6.x-2.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hey, I'm using this module primarily for aggregating the comments, facebook_status (module) updates, and nodes in a single feed (as I'm sure many other activity module admins are). In activity 1.x only published nodes showed up in the aggregated feeds. But using 2.x with views I'm completely dumbfounded (and I am dumb) as to what to use to ensure only published nodes are displayed. I tried using the typical "Node: Published" but this simply removes anything that is not a node from being displayed. What am I overlooking?
Thanks so much.

#1
Please export your View and attach it.
Sounds like if you edit the Node relationship and uncheck 'required' will get you here.
#2
Very sorry for not having attached the view in the first place. Oh, and I do have node relationship's "required" unchecked.
#3
So the reason why this happens is really simple. By applying that filter, essentially becomes 'required'. Its the way SQL works.
But this feature is something I would like to add, the ability to unpublish an activity.
So heres the purposed solution
1.) add a column to activity table 'published'
2.) any time a node is unpublished, all activities matching that node are unpublished
3.) any time a user is blocked, all their activities are unpublished
4.) provide a handler for published/unpublished
and of course, when a node/user becomes published/unblocked then we publish those activities
Then as a followup, provide a method to publish/unpublish activity just like we do for the delete handler
#4
That would be fabulous, stellar and stupendous all at once.
#5
Oh, one concern. Is it possible to sync the activity creation time with that of the published time (with a module such as http://drupalmodules.com/module/published-time)? For a couple sites I'm planning on using Activity with I use a combination of the Save & Edit and Published_Time module to allow users to save their node before publishing. But activity doesn't sync with any sort of published time (obviously since there is no default Drupal feature of this sort).
#6
If I understand what you want, for node activities, you would only want to show the activity if the node is published. That is trivial, just add the Node relationship and then add the filter Node: Published.
As far as manipulating the time the activity is created, I don't see how Activity could do that, and it would be a separate issue.
#7
Ya, the original issue here is addressed by your response in #3. I've probably just made an additional request which I guess can't be supported so I won't bother making another thread for it. But the separate request is to provide a way of sorting an activity view with the published time set in an additional field that the module published_time provides. I can't even see how this would work considering the view in question would have to involve FBSS'. Perhaps I'll switch to the revision module. Sorry just thinking out-loud.