It's hard to moderate CCK-fields with images as there are no previews for them.

For 6.x-1.3 I've done it by replacing
'#value' => $teaser,
on 256-th line of modr8_admin.inc with
'#value' => $teaser.theme('imagecache', 'name-of-imagecache-preset', $node->field_custom-cck-field[0]['filepath'], $alt = $altimg, $title = $titleimg, $attributes=null), // preview hack
where name-of-imagecache-preset is user-defined imagecache preset (can be viewed and added on /admin/build/imagecache ) and field_custom-cck-field is CCK field, can be added on /admin/content/node-type/custom-name/fields.

Comments

geneatwell’s picture

Thanks for this hack! It works just fine with a single custom CCK image field, but I have two different CCK image fields (field_custom_cck1 and field_custom_cck2) that need to be previewed. Each node will have one or the other image field, but never both. How would I preview the correct one using the above example? I do not know PHP and my searches have not led me to an answer. Thanks in advance.

geneatwell’s picture

Tried the following and it did not work.

$form[$node->nid]['preview'] = array(
'#type' => 'value',
if (empty($node->field_newspaper_photo)) {
'#value' => $teaser.theme('imagecache', 'gallery-cover', $node->field_photo[0]['filepath'], $alt = $altimg, $title = $titleimg, $attributes=null);
} else {
'#value' => $teaser.theme('imagecache', 'gallery-cover', $node->field_newspaper_photo[0]['filepath'], $alt = $altimg, $title = $titleimg, $attributes=null);
}, // preview hack

int_ua’s picture

Try to
print_r($node);
before using $node->field_...
And see what is present in different situations.

geneatwell’s picture

Same thing happens when I try to add the php. I've used Firebug to trace the correct variables.

fugazi’s picture

You can also leave this show with lightbox second I've searched but unfortunately I'm not porgramierer and do not know how to write this. Maybe a tip?