Imagefield and Imagecache Modules for Drupal - Screencast

We take a look at using the Imagefield and Imagacache modules for Drupal.
We pick up where we left off on creating a news site using cck node reference and now imagecache and imagefield.

Imagefield gives you the ability to have images as fields in you r cck content types. Imagecache lets you automatically create smaller images (like a thumbnail) bases on a large one. In the screencast we show you how to create a thumbnail version of an image for a node teaser while displaying the large version on a the full node page.

Feel free to post a question in the comments.

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

sort news by date

Great screencast, really helpfull. By the way, at the end of the video you stated that it could be easily achieved that always the lasted news get displayed. How do you do this?

path to image

Hi Geoff,

Thank you for the tutorials on the page, great help!

Maybe you can answer a question: in order to show the leadimage I had to use an absolut path. So my code looks like this

print "<img src=\"http://127.0.0.1/drupalCCK/" . $field_leadimage[0]['filepath'] . "\" style=\"float: left; padding-right: 6px;\">";

OR I had to use
print "<img src=\"../" . $field_leadimage[0]['filepath'] . "\" style=\"float: left; padding-right: 6px;\">";

Is this a problem in my Drupal installation?

Thanks

try the base path function

<?php print "<img src=\" . $base_path() .$field_leadimage[0]['filepath'] . "" style=\"float: left; padding-right: 6px;\">";?>

hope that helps! (code not verified)

thank you

Geoff, your videocasts are really useful, thank you. I'm struggling with the drupal learning curve at the moment because the documentation pretty disorganised - these were a big help.

Would be really useful if you also posted the code / node template file you end up with at the end of each video

thanks once again.

Inline Images

This is a great video, I used it to implement inline images, but I'm having a problem with the node_load() function on nodes that don't have images. I implemented the "if" statement, but for some reason I'm still having the issue. Do you have any insight on this?

maybe this - Here my image cck field is named lead_image:

<?php if($field_lead_image[0]['filepath']): ?>
    // print image here
    <img src="<?php print $field_lead_image[0]['filepath']; ?>"/>
<?php endif; ?>

nice video, but maybe a bit

nice video, but maybe a bit too big, it doesn't fit in my widescreen laptop firefox+toolbars window. I think if I remove the toolbars it still won't fit.