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

alex_b’s picture

hey 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

Steve Dondley’s picture

Good 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.

alex_b’s picture

You 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.

chrisada’s picture

I 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.

alex_b’s picture

alex_b’s picture

Version: master » 4.7.x-1.x-dev
patchak’s picture

Hi!
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.

alex_b’s picture

Status: Active » Closed (fixed)

1) 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

<?php
drupal_set_message('Save template: <pre>'.print_r($node, true).'</pre>');
$node->field_body[0]['value'] .= $node->body;
?>

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.

alex_b’s picture

Of course you don't need the drupal_set_message() in it. That was for debugging :)

$node->field_body[0]['value'] .= $node->body;
andrew7’s picture

Version: 4.7.x-1.x-dev » 5.x-1.9
Status: Closed (fixed) » Active

But what about parsing photos from feeds? And then putting them into the CCK node?

alex_b’s picture

Status: Active » Closed (fixed)

Let's not disturb the dead here. Discussion about how to download/deal with enclosures is over here: http://drupal.org/node/180387