Save data in a CCK field

dpwolf - April 14, 2008 - 08:25
Project:Media Mover
Version:5.x-1.0-beta7
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I have been having trouble using media mover to create a thumbnail from a node's file field, and saving it back to another cck field (see http://drupal.org/node/220207.

Part of the problem in troubleshooting this issue is that I am not sure if I am using the module correctly and I can't find any documentation on this to clarify.

When saving back to a CCK field, which field types are allowed? In my case, should I be saving to an image field, file field, a plain text field with the thumbnail's url or something else?

Cheers

#1

Will White - June 5, 2008 - 19:17
Component:Documentation» Code
Category:support request» feature request
Status:active» needs review

This feature was marked as TODO. I've written some code that will save a thumbnail to a CCK imagefield. This allows it to be used with views, passed through imagecache easily, and sync'd with internationalization.

AttachmentSize
cck_image_field.patch.txt 3.76 KB

#2

alex_b - June 5, 2008 - 23:10

subscribing

#3

seaneffel - June 9, 2008 - 13:14

also subscribing

#4

arthurf - June 27, 2008 - 23:05

A fix is now is now in CVS

#5

Will White - June 28, 2008 - 12:53

Awesome! My patch works with imagefield so that you can use imagecache to manipulate thumbnails. I also plan to write some support for the filefield module so you can save encoded files in there. Does it make sense to take what is in CVS and build it out or is that just a temporary fix?

#6

arthurf - June 28, 2008 - 23:34

I went with a straight node_save($node) with a switch for future types of CCK. I looked around for your imagefield patch but didn't find it- can you repost it here and we'll get it going?

#7

Will White - July 8, 2008 - 15:18

Hey arthurf,
The patch is attached to the first comment. Here's a link directly to the file.

#8

arthurf - July 9, 2008 - 16:04

I reviewed the patch and made some changes to how this works- I think using the node_save($node) function makes things a bit cleaner- can you try this out and see if this is working or you?

AttachmentSize
mm_content.diff.txt 2.44 KB

#9

xcusso@drupal.cat - September 30, 2008 - 01:01
Version:5.x-4.1» 5.x-1.0-beta7

I tried to run your patch (included in the beta releases) and don't work.
I don't know if is only my problem or someone have the same issue...

 
 

Drupal is a registered trademark of Dries Buytaert.