various measures thumbnails

linuxbcn - February 10, 2008 - 12:58
Project:Node Images
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

It is possible to define various measures thumbnails? My idea is to show for each content type size of the thumbnails imàgines different.

#1

linuxbcn - February 11, 2008 - 18:52

Solved with CSS.
Take the example here if someone serves. Now only NO functioning in Internet Explorer; Tested in firefox and Opera (in Linux debian Lenny), Safati, Opera, Firefox and Netscape in Mac OS X Leopard.

1.- Created a new node type called node-blog-tpl.php (for put a little images in blog column)

<?php if ($node->node_images) { ?>
  <!-- Node images -->
<?php if ($page == 0): ?><td class="node-images-blog" rowspan="2" valign="top"><?php endif; ?>
<?php if ($page == 1): ?><td class="node-images" rowspan="2" valign="top"><?php endif; ?>
<?php print $node->node_images ?><?php ?>
<div style="text-align:center;">
<a href="<?php print url('node/'.$node->nid.'/image_gallery'); ?>">Gallery</a>
</div>
</td>
<?php }?>

2.- In style.css I add a new style:

.node-images-blog img { width:112px; }

3.- Select the "Manually set in node template by variable $node->node_images" at Node Images opcions editing the blog content type

That is all.

You need adapt this code at your theme

 
 

Drupal is a registered trademark of Dries Buytaert.