consolidate sequential actions into a single list item
| Project: | Activity Stream |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
I'd like the ability to consolidate sequential actions into a single list item. In my specific case, what I'm trying to accomplish is a list like this (with flickr and twitter).
# (T) Ben tweeted "testing again" 5:04pm#
# (F) Ben posted new photos 4:23pm #
[ img ] [ img ] [ img ]
# (T) Ben tweeted "testing activity stream" 4:20pm#
# (F) Ben posted new photos 4:18pm #
[ img ] [ img ] [ img ] [ img ] [ img ]
Unless I'm missing something, with the way that the module's implemented now, each flickr item would be its own list item, and there's no way to consolidate them with a custom theme function.
This patch allows modules to implement a new function (theme_module_item_append) and will call that function if the last action type and the current are the same and the date is the same. If that function is not implemented, the functionality does not change at all:
http://lug.wsu.edu/~ben/drupal_activitystream_consolidate_items_D6.patch
This patch implements that function in the flickr module and it changes the styling to what I posted above. I.E., it eliminates most of the words and replaces them with thumbnail images linked to the flickr pages. Flush theme cache after applying because this adds a new theme function:
http://lug.wsu.edu/~ben/drupal_activitystream_consolidate_items_flickr_D...

#1
If you're combining different actions into the same item, the time stamp and permalink no longer make and sense placed where they are.
#2
No they don't. I didn't have a good solution to that. Figured I'd percolate on it a bit. The timestamp doesn't bother me (it shows /about/ when this group of photos was posted) and I might just remove the permalink from my install.
Got any other ideas?