I wonder if it was possible to include a imagefield mapper in the next releases of feedapi-mapper. I came across a few feeds that needed integration featuring multiple namespaces which contained links to images (thanks to http://drupal.org/project/feedapi_parser_exhaustive). So i wrote a mapper for imagefield doing just that (@see attachment). Its really rough and probably only fits my personal needs, but I'd be willing to take ownership for this little mapper if thats what it takes ;) That way the community could audit my code and we all benefit from it.
What do you think ?
p.s. had to save the file as 'txt' or wouldn't have been able to upload the file ...
Comment | File | Size | Author |
---|---|---|---|
feedapi_mapper_imagefield.inc_.txt | 5.86 KB | macedigital |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedGreat - have not had a look yet. Does your work build on #319538: Mapper for FileField / ImageField ?
Comment #2
mcload CreditAttribution: mcload commentedSubscribing. Came from #513100: Multiple images in node?. Does this mapper support importing all images in a Flickr set to a multivalue imagefield in a single node?
Comment #3
alex_b CreditAttribution: alex_b commentedTaking a closer look at filefield/imagefield, this is actually a duplicate of #319538: Mapper for FileField / ImageField .
#2: Use parser_simplepie to expose image fields in flickr feeds to the rest of the feedapi. As soon as the URL of the image is thus exposed to the feedapi mapper you should be able to map it to a filefield or imagefield with the patch in #319538: Mapper for FileField / ImageField or this patch.
Comment #4
macedigital CreditAttribution: macedigital commented@mcload,
Sounds like a great idea, wonder why I didn't think of this in the first place. Unfortunately, right now my code will only insert / replace the first image for its respective image-field. The code-snippet at http://drupal.org/node/319538 is probably able to achieve importing multiple images, though I haven't tested it (yet).
@alex_b
sorry, yes, after taking a look at http://drupal.org/node/319538 it seems I did file a duplicate. Anyway, I'd still be willing to contribute to get an generic filefield (imagefield) mapper into Feed Element Mapper. Especially importing a large number of feed items is a interesting topic, as the import process can quite easily max out php-max-execution / max-input time limits.