Generic feed element to standard node field mapper

aaron - March 25, 2008 - 16:20
Project:Feed Element Mapper
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

seems like it would be useful to allow the mapper to map to the $node->body element, such as, for instance, when mapping to an unadulterated blog node.

#1

Summit - April 2, 2008 - 14:38

Subscribing, very interested. Greetings, Martijn

#2

alex_b - April 2, 2008 - 14:57
Title:feed to content body?» Generic feed element to stadard node field mapper

Would be great. This could be done by a generic mapper that maps to title, body, created = all standard fields on a node.

#3

buzink - August 20, 2008 - 21:44
Status:active» needs review

hi alex_b,

tried you approach and got stuck. Eventually created two vocabularies for the feed content type: custom body-field-override and title-field-override. I adjusted feedapi_node.module. The module now checks whether custom-body-field-override and/or custom-field-tag-override is set. if yes, it uses the terms of the custom-body-field and/or custom-title-field vocabularies(for example options--enclosures--application--x-shockwave-flash--0--description and options--enclosures--application--x-shockwave-flash--0--title) instead of the the default rss fields (description and title) to populate the title and body of the node that is created from the feed-item.

The modified file is attached

AttachmentSize
feedapi_node.module.txt 18.92 KB

#4

buzink - August 20, 2008 - 21:50

As for the author. It doesn't make sense to map the author of an feed-item to the drupal node-author, because node-authors must be existing drupal users. So I created a cck-field called author and mapped the author to that field.

#5

Aron Novak - September 16, 2008 - 08:19
Status:needs review» needs work

Generally this is a good idea to have a generic element -> node field mapper.
I have suggestions about the implementation:
Do not modify feedapi_node
Create a new module with bigger weight than feedapi_node and implement hook_nodeapi(). And after that, check if it's a feed node item and do the modifications as you do in the modified feedapi_node

#6

alex_b - May 20, 2009 - 14:36
Title:Generic feed element to stadard node field mapper» Generic feed element to standard node field mapper
Status:needs work» fixed

mapping to title, body, created date is part of FeedAPI Mapper now. There are open threads for related issues:

#373368: Mapper for $node->status
#363326: Mapper for $node->uid
#341377: Mapper for node title, body, etc

#7

System Message - June 3, 2009 - 14:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.