I am using both nodeteaser (nodeteaser-5.x-1.1) and cck imagefield (imagefield-5.x-1.2-rc1) on a site and I noticed that the images added by imagefield are not displayed on the front page when a custom teaser is used.
Imagefield adds the images to both the body and teaser field ($node->teaser) of a node. When a custom teaser is used, nodeteaser replaces $node->teaser with the custom teaser. However, it DOES NOT add any possible imagefields.
Since I was not able to find any report on this, I added some extra code to function _nodeteaser_teaser() in order to have it display the imagefield code. In order to do so, the cck function _content_field_view() is called to check if there are any imagefields for the node and it's value is inserted added to the new $node->teaser:
if ($nt->teaser != '') {
$node->teaser = $nt->teaser;
$node->nodeteaser = TRUE;
// next lines added
if (function_exists('_content_field_view')) {
$imagefield = _content_field_view($node, TRUE, FALSE);
if (!empty($imagefield)) {
foreach ($imagefield as $field) {
$node->teaser .= "\r\n".$field['#value'];
}
}
}
}else...I'm not sure if this is the best way to solve this problem and I'm not sure if this works for other ccd modules as well, but it's the best solution I could think of...
Greetings,
Marcel