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

Easy dynamic thumbnail generation

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #91  
Old 04-20-2007, 10:26 AM
 
Cefko Cefko is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 69
 

Default Re: Easy dynamic thumbnail generation

I got it now

I should use

{thumb file="$tfile" ....

and not

{thumb file="tfile" ...

Damn $$$$$$!!!
__________________
X-cart version 4.1.7
Apache/2.0.52 (CentOS)
My SQL 5.0.58
PHP Version 5.1.6
Reply With Quote
  #92  
Old 05-08-2007, 02:51 AM
 
ProMuscles ProMuscles is offline
 

Advanced Member
  
Join Date: Apr 2007
Posts: 45
 

Default Re: Easy dynamic thumbnail generation

Cefkl can you post your code
__________________
4.7.5 Gold Glory be to God!
Reply With Quote
  #93  
Old 05-20-2007, 06:57 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

Default Re: Easy dynamic thumbnail generation

I can't seem to get this to work I get the large image no thum nail this is what it says

[img]images/cache/75f39e7784e8a3ebdcfc27282918244a.jpg[/img]

please help my product.tpl look like this


{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *}
{if $images ne ""}
{capture name=dialog}
<table width=100%>
<tr>
<td>
<table>
{section name=image loop=$images}
{if $images[image].image_path|replace:'server path to remove':''}
<tr><td>{thumb file=`$images[image].image_path` longside="100" link="false"}</td></tr>


{/if}
{/section}
</table>
</td>
<td>
<img src={$images[0].image_path|replace:'server path to remove':''} name="main_image"/>
</td>
</tr>
</table>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra='width="100%"'}
{/if}

What am I doing wronge?
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #94  
Old 05-20-2007, 06:58 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

Default Re: Easy dynamic thumbnail generation

I can't seem to get this to work I get the large image no thum nail this is what it says

[img]images/cache/75f39e7784e8a3ebdcfc27282918244a.jpg[/img]

please help my product.tpl look like this


{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *}
{if $images ne ""}
{capture name=dialog}
<table width=100%>
<tr>
<td>
<table>
{section name=image loop=$images}
{if $images[image].image_path|replace:'server path to remove':''}
<tr><td>{thumb file=`$images[image].image_path` longside="100" link="false"}</td></tr>


{/if}
{/section}
</table>
</td>
<td>
<img src={$images[0].image_path|replace:'server path to remove':''} name="main_image"/>
</td>
</tr>
</table>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra='width="100%"'}
{/if}
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #95  
Old 05-20-2007, 07:18 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

Default Re: Easy dynamic thumbnail generation

so sorry about the double post!! does anyone have this working in 4.1.6 I really like this mod but can't get it to work
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #96  
Old 05-21-2007, 10:15 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Easy dynamic thumbnail generation

Wambli

Just a suggestion, but did you replace the parts that say "server path to remove" with the path to your server? It should be something like "home/wambli/public_html/".
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #97  
Old 05-21-2007, 04:58 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

Default Re: Easy dynamic thumbnail generation

Thanks Just wait I changed the path and it still doesn't work does it have something to do with the fact I'm running 4.1.6 I still get this instead of thum nail

[img]images/cache/75f39e7784e8a3ebdcfc27282918244a.jpg[/img]

my code:

{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *}
{if $images ne ""}
{capture name=dialog}
<table width=100%>
<tr>
<td>
<table>
{section name=image loop=$images}
{if $images[image].image_path|replace:'home/omagruen/public_html/xcart/':''}
<tr><td>{thumb file=`$images[image].image_path` longside="100" link="false"}</td></tr>


{/if}
{/section}
</table>
</td>
<td>
<img src={$images[0].image_path|replace:'home/omagruen/public_html/xcart/':''} name="main_image"/>
</td>
</tr>
</table>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra='width="100%"'}
{/if}

I have tired many diffrent paths even hard code still nothing?
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #98  
Old 05-22-2007, 12:27 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Easy dynamic thumbnail generation

[img]images/cache/75f39e7784e8a3ebdcfc27282918244a.jpg[/img] ??

It should be "files/cache/75f39e7784e8a3ebdcfc27282918244a.jpg" (the forum screws up the img markers). Did you edit your function.thumb.php to point somewhere else (images)?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #99  
Old 05-24-2007, 06:09 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

Default Re: Easy dynamic thumbnail generation

Jwait,
nope I didn't change the function.thumb.php ? I weird thing is that is finds the detailed image and displays it,but it will not display the thumbnail?
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #100  
Old 05-25-2007, 05:47 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Easy dynamic thumbnail generation

My bad.. I changed my function.thumb.php

In function.thumb.php, mine says..
if (empty($params['cache'])) $_CONFIG['cache'] = 'files/cache/';

What does yours say?

Also, the detailed image is probably where it is supposed to be (where you told X-cart to put it) so that isn't a problem.

I have uploaded my product_images.tpl (actually mod_product_images.tpl) so you can check it against what you have. It is kind of unique but you should be able to compare it to what you have (or simply "call" it by replacing your "include") to check your setup. It goes in skin1/modules/Detailed_Product_Images. I've also included blank_dialog.tpl which is pretty self-explained. It goes in /skin1. They are both for version 4.1.6.

I'm wondering, do you have the thumbnails on your server? The function.thumb.php will create them the first time a customer opens the page. Using either FTP or Cpanel look for the folder name "cache" and see if there are any of the thumbnails in it. The folder needs to have a htaccess with "Allow from all" (without quotes) in it and the folder needs to have writable permissions. Just make several of the folders where you think they may need to be (root, /xcart, /images, etc.) and one of them should fill up with thumbnails in no time. You may need to adjust your function.thumb.php to write the thumbnails where you want them.
Attached Files
File Type: tpl mod_product_images.tpl (1,003 Bytes, 105 views)
File Type: tpl blank_dialog.tpl (173 Bytes, 98 views)
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
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 08:29 PM.

   

 
X-Cart forums © 2001-2020