image test

/**
* 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 ‘

‘;
?>

This entry was posted in Uncategorized. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>