Closed (fixed)
Project:
Leech
Version:
5.x-1.9
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2006 at 21:12 UTC
Updated:
16 Oct 2007 at 15:21 UTC
If I'm interpreting things correctly, the README file says you can use CCK in place of stories to create feed items. It does work. However, the problem is that I am unable to get the body of the feed item to appear when I go to edit a cck node.
Has someone found a good, easy workaround for this?
Comments
Comment #1
alex_b commentedhey steve,
try to use the loading php code and saving php code fields on the node template of the cck node you created. I never tried that... but I guess you should be able to redirect what's on $node->body or $node->teaser to the corresponding cck fields.
alex
Comment #2
Steve Dondley commentedGood thought. I'll bone up on the node_tempalte module and give it a shot. I was also thinking of creating my own node-type to do this.
What was the reasoning behind not supplying a pre-made node-types (one for the feed and one for feed items) with leech anyway? I don't see the advantage to hitching a ride on pre-existing node types.
Comment #3
alex_b commentedYou could think of a site on which you seemlessly intermingle your own news as story type and the news that are coming in from leech as the same story type, you could think of a complex CCK node type as feed item that allows you to add fields for e. g. localization of news, a very minimal CCK node type for feeds, that only has a title for the feed or a very complex CCK node type that stores all kinds of meta information of the feed etc. etc.
The advantage is flexibility - it's bought for only a little bit of complexity.
Comment #4
chrisada commentedI have the exact same problem. I tried using a very minimal CCK content type, with just title and a text field called "Body". It is not filled with the feed item body during aggregation.
I think there are more sites that differentiate aggregated content vs. local content, compared to sites that treat them the same. Having and easy way to use CCK for feed item node will be a big plus.
Comment #5
alex_b commentedalso see http://drupal.org/node/105975#comment-173286
Comment #6
alex_b commentedComment #7
patchak commentedHi!
I'm sorry this is quite a newbie question, but could you please post an example php code to move the node>body content of the feed item to the appropriate cck field??
Thanks for your help.
Comment #8
alex_b commented1) Create a CCK node type for your feed items. Be sure that you create a body field for it.
2) Create an actual node from this node type
3) Go to the template tab of the node and put this
Into the "Saving PHP code" text field. Replace field_body[0]['value'] with the variable name of your CCK body field. You can find out the variable name for example by using the "object structure" tab on a node provided by devel module.
Hope this helps.
Comment #9
alex_b commentedOf course you don't need the drupal_set_message() in it. That was for debugging :)
Comment #10
andrew7 commentedBut what about parsing photos from feeds? And then putting them into the CCK node?
Comment #11
alex_b commentedLet's not disturb the dead here. Discussion about how to download/deal with enclosures is over here: http://drupal.org/node/180387