Video mapper for Drupal 6 is work fine with a patch,.. But how about image and audio file mapper?

CommentFileSizeAuthor
#3 feedapi_mapper_imagefield.inc_.txt4.75 KBpeter.walter

Comments

alex_b’s picture

Status: Active » Postponed (maintainer needs more info)

Image field patch to be ported to 6: http://drupal.org/node/224235

Which image and audio fields are you asking for?

peter.walter’s picture

I would love to see a mapper to take an image from an RSS feed, copy the image to the local fileserver, and insert it into the CCK imagefield.module field.

The D5 patch works in part with D6 - it downloads the image(s) to a temp directory, but the file data does not get inserted into the CCK field.

Presumably there is a missing call or something, but I am getting lost in the imagefield/filefield/cck complexities!

peter.walter’s picture

StatusFileSize
new4.75 KB

Attached is a modified/hacked version of the D5 . I had to add some code to write the image to the drupal temporary directory, call field_file_save_file() to save the file in the widget specified directory and call field_file_save() to update the image-node association in the database.

Seems to work for my needs if others would like to test.

Peter

Krummrey’s picture

Category: support » feature
Status: Postponed (maintainer needs more info) » Needs review

Except for the Audio part it's a duplicate to #224235: Mapper for CCK Image Field

Changed to code needs review

loze’s picture

the patch in #3 appears to work.
however I get this error when a feed is parsed and made into nodes.

warning: imagecolorsforindex() [function.imagecolorsforindex]: Color index 255 out of range in /var/www/vhosts/.../httpdocs/includes/image.gd.inc on line 108.
ball.in.th’s picture

http://drupal.org/node/224235#comment-1373150 is a slightly updated version of the patch in #3. It seems to work with all the latest modules, i.e., Feed Element Mapper 6.x-1.0-beta4, FileField 6.x-3.0-beta1, ImageField 6.x-3.0-beta1.

alex_b’s picture

Status: Needs review » Closed (duplicate)

Setting this to duplicate now, for imagefield/fielfield refer to #319538: Mapper for FileField / ImageField . Audio field: #336985: Mapper for Embedded audio field (emaudio) field