[support] image module - too small attached pictures

Cyberswat cyberswat at gmail.com
Mon Apr 23 17:09:07 UTC 2007


The image cache preset that you defined will not show up as a selection on
the node edit form.   What it enabled is the ability for you to theme the
attached image to the dimensions you created in your imagecache preset.  On
the tutorial at http://drupal.org/node/134086 this is addressed under the
heading "Create a Module" but I'll summarize here.  The key to invoking the
images at your preset sizes is with this line:

theme('imagecache', 'thumbnail', $node->field_thumbnail[0]['filepath'])

In this example,  your invoking imagecache and telling it to use the
predefined preset 'thumbnail' (your name is whatever you typed in when
making your preset) ... you are then telling it to use the image whose
server path is stored in $node->field_thumbnail[0]['filepath'].  Simply
using echo or print on the value returned from the above code will print an
image according to the preset.

In that tutorial a module was created that pulled out a selection of blog
teasers and attached a thumbnail to them in a teaser list.  The way the
module was written provides the image as a link you can click on to be
directed to the view of the node.

Hope that helps.


On 4/23/07, Daniel <leva at az.isten.hu> wrote:
>
> 2007. April 19. 22:36, Cyberswat:
> > http://drupal.org/project/imagecache - I think imagecache would
> > resize the images for you.
> >
> > http://drupal.org/node/134086 - Here's a tutorial that shows you how
> > to attach an image to a node and call that image through imagecache
> > to create different sizes or thumbnails.
> >
> > I'm not sure if you'll need CCK or not.
> >
> Hi!
>
> Thanks for the input (for Nathaniel too) and sorry for the delayed
> reply.
> I've installed the imagecache module, and according to the tutorial I
> need the CCK module. I followed the steps written in the tutorial, and
> even read the http://drupal.org/node/101748 page too. What doesn't work
> for me is the preset selection, when editing the node.
> I've created the image cache presets, the new content type and added a
> new field, but the image cache's presets are missing in the node edit
> form (although they are present on the image cache admin page).
> What am I missing?
>
> Thanks
>
> Daniel
> > On 4/19/07, Daniel <leva at az.isten.hu> wrote:
> > > Hi!
> > >
> > > I'm using the Image module, and checked that I would like to attach
> > > images to my nodes. Now when I attach a picture to a node, then it
> > > will be thumbnail sized, and if I click on the image, it won't
> > > enlarge it. Any idea how to configure this? (if this is possible at
> > > all)
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 

Kevin Bridges
http://www.kevinbridges.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20070423/2ab33864/attachment.htm 


More information about the support mailing list