Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Resize thumbnails with GD

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 02-02-2009, 03:49 PM
 
pfarcus pfarcus is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 179
 

Default Re: Resize thumbnails with GD

Hi again,

The thumbnails are not lining up very well, some are higher or lower than others on the page. Is there anything in the above code from Ashley that might affect this? I can't make out what its doing in the code. Would the problem for sure be in the product_thumbnails.tpl or might it be somewhere else? I have that mod where there are 5 products per row but it was working fine before.

Thanks for any suggestions.
__________________
CDSEO PRO
4.1.11 PRO
Dynamic images by xcartmod.com
X-Cart CSSTemplate/Skin for v4.1.11 PRO
Reply With Quote
  #32  
Old 02-02-2009, 03:54 PM
 
pfarcus pfarcus is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 179
 

Default Re: Resize thumbnails with GD

yep, its definately in the product_thumnails code. Anyone know what part tells it how to line up on the page?

{* $Id: product_thumbnail.tpl,v 1.19.2.1 2007/07/09 05:00:35 svowl Exp $ *}
{if $config.Appearance.show_thumbnails eq "Y" or ($type ne "T" and $type ne "")}<img{if $id ne ''} id="{$id}"{/if} src="{if

$tmbn_url}./imager.php/product_thumb.jpg?width={$image_x}&cropratio=1 :1&image={$tmbn_url}{else}{if

$full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&id={$produc tid}{/if}"{if $image_x ne 0}

width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} style="margin:5px;" alt="{$product|escape}" />{/if}
{* xCartMod.com - Dynamic Images *}
{if $active_modules.Detailed_Product_Images ne "" and $config.Detailed_Product_Images.det_image_thumbnai ls eq "Y"}<script type="text/javascript"

language="JavaScript 1.2"><!--var orig_image_src='{if $tmbn_url}{$tmbn_url}{else}{if

$full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&id={$productid} '{/if};--></script>{/if}
{* xCartMod.com - Dynamic Images *}

{* Image sizer with GD and mod for non thumb squish by ashley *}
__________________
CDSEO PRO
4.1.11 PRO
Dynamic images by xcartmod.com
X-Cart CSSTemplate/Skin for v4.1.11 PRO
Reply With Quote
  #33  
Old 02-02-2009, 04:02 PM
 
pfarcus pfarcus is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 179
 

Default Re: Resize thumbnails with GD

I take out this {*style="margin:5px;*} and it moves some into line. Seems like its different every time. sometimes the 1st thumb is lower and the rest are fine and I comment this out and then the first 2 are lower than the last 3.


Could it be my 5 in a row mod in products.tpl?
__________________
CDSEO PRO
4.1.11 PRO
Dynamic images by xcartmod.com
X-Cart CSSTemplate/Skin for v4.1.11 PRO
Reply With Quote
  #34  
Old 02-02-2009, 06:49 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Resize thumbnails with GD

I'll check it out in a bit. off to the gym
__________________
xcart 5.1.2
Reply With Quote
  #35  
Old 02-02-2009, 07:21 PM
 
pfarcus pfarcus is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 179
 

Default Re: Resize thumbnails with GD

NEVER MIND! I think I got it where it works. Some had 2 lines of product name (but it was really happening on some that didn't) But the config I have now is working.

BESIDES, we may have a bigger problem afoot. Google images probably won't index these images as well. I've emailed Joe, the writer of this php image sizing script. I'm quoting him here, hope that's ok:

"That's a great question--I hadn't even really taken that into consideration. Unfortunately, I believe it will hinder google images from finding your images. You could probably get around this by using mod_rewrite. I've been meaning to do some mod_rewrite stuff with SIR for a while but haven't gotten around to it, so if you whip something up, please send it to me."

ok, so anyone know mod_rewright stuff? Doesn't that do it on the fly like xcart script?
Will creating static HTML pages solve this google image indexing problem with GD image sizer?

yeah, intense huh?
__________________
CDSEO PRO
4.1.11 PRO
Dynamic images by xcartmod.com
X-Cart CSSTemplate/Skin for v4.1.11 PRO
Reply With Quote
  #36  
Old 02-02-2009, 07:57 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Resize thumbnails with GD

glad you got it working.
__________________
xcart 5.1.2
Reply With Quote
  #37  
Old 02-12-2009, 11:25 AM
 
pfarcus pfarcus is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 179
 

Default Re: Resize thumbnails with GD

Ashley, are you familiar with this script? Could you tell me how to have it resize the main product image as well? Like anything over 500x500 would get cropped and sized? (its doing the thumbnail great, must be a way to do the main image too huh?)

Thanks!
__________________
CDSEO PRO
4.1.11 PRO
Dynamic images by xcartmod.com
X-Cart CSSTemplate/Skin for v4.1.11 PRO
Reply With Quote
  #38  
Old 02-27-2009, 08:29 AM
  fmoses's Avatar 
fmoses fmoses is offline
Banned
 

Senior Member
  
Join Date: Apr 2008
Posts: 155
 

Default Re: Resize thumbnails with GD

Is it possible to have this automatically resize detailed pics as well? How would that be done if possible?
Reply With Quote
  #39  
Old 03-24-2009, 10:41 PM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Resize thumbnails with GD

Hi ,
I used this resizer and works fine in my old site.
But now we have migrated to the new server and found that this one is not working .No image is displayed .
How to solve this.
New server have lastest version of php and gd library is enabled too.
Please advice me soon.
Thanks
Reply With Quote
  #40  
Old 03-31-2009, 06:42 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Resize thumbnails with GD

Still this mod didn't works.
Any body had this problem.I am just getting the image name instead of image.
FYI:
PHP version-PHP Version 5.2.9-0.dotdeb.1
GD Library

GD Support -enabled
GD Version -bundled (2.0.34 compatible)
FreeType Support -enabled
FreeType Linkage -with freetype
FreeType Version -2.3.7
T1Lib Support-enabled
GIF Read Support -enabled
GIF Create Support -enabled
JPG Support-enabled
PNG Support -enabled
WBMP Support -enabled
XPM Support -enabled
XBM Support -enabled

I think this two is the major requirement right.?
Please guide me.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:46 AM.

   

 
X-Cart forums © 2001-2020