Wondering if anyone has given thoughts to CCK support for Activity Stream items.
Use case:
-I want to store information beyond body text and title (e.g. Edit dates from FlickR)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | cck_fix.patch | 900 bytes | seanb |
Wondering if anyone has given thoughts to CCK support for Activity Stream items.
Use case:
-I want to store information beyond body text and title (e.g. Edit dates from FlickR)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | cck_fix.patch | 900 bytes | seanb |
Comments
Comment #1
xurizaemonWhat you want is the capacity to record additional data about imported items in CCK fields? That's a good idea, Jorge.
(If I'm wrong, please correct the issue title to be more descriptive.)
Comment #2
GMercey commentedIt can be a good idea to store image link attach to an item, like a Greader item. How can we get the link and store it in a cck field?
Comment #3
jorge commentedxurizaemon: correct. Thanks for renaming.
GMercey: Exactly, there are sometimes more complex pieces of information in these streams.
I'm open to sponsor this addition to the API, anyone able to do it soon?
Comment #4
winstonford commentedHere's an example of what I believe to be the goal of this thread, or at least similar to it:
1. Enable the Aggregator module found here /admin/build/modules under 'Core - optional'.
2. Create a feed at /admin/content/aggregator/add/feed using the feed below:
http://feeds.pandora.com/feeds/people/john/recentactivity.xml
2. View the results at /aggregator
You should see the feed, with each item showing all the elements exactly as the original raw feed presents them, such as images, icons, links, etc.
I understand that Aggregator does not then go and create a node for each feed item, which I actually prefer, and so these extra elements in each feed item are not cck fields.
I am just wanting the imported feed at /user/1/activitystream, or the activitystream block, to look like the one at /aggregator
Is this example, at least visually, similar to the goal of this thread?
Comment #5
seanbFor a client I needed to store the link and image of a Facebook status with the activity stream node. I wanted to store this in CCK because storing the data in the body field of the node was not flexible enough. To make this possible I created a patch for the activity stream module. It basically merges the data returned by hook_streamapi with the node object. This way any extra module can return the CCK fields.
I hopes this helpes someone. I did some tests and it didn't break any default functionality, so I think this could be commited to the module.
Let me know if it helps!
Comment #6
seanbHere's an example of how I added the CCK data:
Comment #7
morbus iffThis is possible in 7.x-3.x - the Activity Stream item nodes are fully fielded, and a module could add new fields to the content type, then listen on hook_node_presave() to apply the extra data to those fields. Themes receive the whole $node object and would be able to use that data in the stream if they'd like.