I discovered how to size my images as thumbnails without a plugin or
the need to save them.
Here is the coding I used:
<?php echo image_tag($product-
>getProductImgPath(),'width=150', 'height=150') ?>
I didn't know image_tag had these attributes, but I found them at ..
\lib\vendor\symfony\lib\helper\AssetHelper.php
Hope this might help someone in the future! :)
On Oct 19, 4:50 pm, xpanshun <[email protected]> wrote:
> Hi Alan,
>
> Thanks for the post.
>
> I would like to use this plugin if I could. My problem is I am a
> complete novice with Symfony and so I don't know how to actually use
> it. What code needs to be inserted in the actions.class.php file and
> how do I call it for the effect I am trying to achieve? I do not want
> this to upload files, I just want to get the path I have in the
> database and have it transformed as it is displayed on my index page.
> Any help is greatly appreciated!
>
> Thanks in advance!
>
> On Oct 18, 3:33 am, Alan Bem <[email protected]> wrote:
>
>
>
>
>
>
>
> > Use sfImageTransformExtraPlugin - it is very easy to use, customizable
> > plugin, that requires almost nothing to make it work (transparently).
>
> > 2010/10/17 xpanshun <[email protected]>
>
> > > How would I call to this class from my indexSuccess.php to get the
> > > images to resize as they are displayed?
>
> > > *See coding in original post
>
> > > On Oct 17, 2:43 pm, Martin Ibarra Cervantes
> > > <[email protected]> wrote:
> > > > hi, you can try use this class with sfThumbnailPlugin
>
> > > >http://mic.misretratos.com/2010/10/17/sfresizedfile/
>
> > > > regards.
>
> > > > On Sun, Oct 17, 2010 at 9:45 AM, xpanshun <[email protected]> wrote:
> > > > > Hi all,
>
> > > > > I am trying to create a product gallery on the front end of my site.
>
> > > > > In my database a have a product table with a field containing the path
> > > > > to the image for each product called 'product_img_path'. I can bring
> > > > > up each product image with the following coding:
>
> > > > > <table>
> > > > > <?php foreach ($products as $product): ?>
> > > > > <tr>
> > > > > <td>
> > > > > <?php echo image_tag($product->getProductImgPath())
> > > > > ?>
> > > > > </td>
> > > > > </tr>
> > > > > <?php endforeach; ?>
> > > > > </table>
>
> > > > > The problem is: these are full size images. I want to create
> > > > > thumbnails with the sfThumbnailPlugin plugin, but I don't know how or
> > > > > where to code it correctly to make it work.
>
> > > > > I've found a few tutorials utilizing several other plugins for an
> > > > > image gallery, but they are either for Propel users (I use doctrine)
> > > > > or uploading images. I have these images in a file directory and plug
> > > > > them in to the database for each product. I'm sure there are ways
> > > > > around my issue, but I really wanted to use the sfThumbnailPlugin
> > > > > alone.
>
> > > > > Please, how can I use sfThumbnailPlugin to shrink my images on the
> > > > > index page? [I don't necessarily want to have to save these thumbnails
> > > > > either, if possible]
>
> > > > > P.S. I understand everyone has their own opinions on which ways are
> > > > > best to make image galleries or have images in your database, but
> > > > > please if there is just a solution to the way I have it set up here I
> > > > > would appreciate it.
>
> > > > > Thanks in advance!
>
> > > > > --
> > > > > If you want to report a vulnerability issue on symfony, please send it
> > > to security at symfony-project.com
>
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "symfony users" group.
> > > > > To post to this group, send email to [email protected]
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected]<symfony-users%2bunsubscr...@goog
> > > > > legroups.com>
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/symfony-users?hl=en
>
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it to
> > > security at symfony-project.com
>
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]<symfony-users%2bunsubscr...@goog
> > > legroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en