image test

<?php
/**
* This php snippet displays (x) random thumbnails with a link to
* the full images in a page.
*
* (assumes you already have the IMAGE.MODULE installed)
*
* To increase/decrease the number of thumbnails listed
* change the $thumbs field to suit.
*
* Tested and works with drupal 4.6
*/
print '

‘;
$thumbs = 3;
$images = (image_get_random($thumbs, $tid = 0));
foreach ($images as $im){
print ‘

‘;
print l(image_display($im, ‘thumbnail’, array(‘width’ => ’80’, ‘height’ => ’80’)),’node/’.$im->nid, array(), null, null, FALSE, TRUE);
print ‘

‘;

}
print ‘

‘;
?>

Advertisements