X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Easy dynamic thumbnail generation (https://forum.x-cart.com/showthread.php?t=22308)

Steve-C 08-07-2007 06:42 AM

Re: Easy dynamic thumbnail generation
 
Not sure why this is happening but I found my /modules/Detailed_Product_Images/product_images.tpl wasn't having any effect at all. I disabled it and everything kept on working. Then I copied the files given on this thread into my /modules/Detailed_Product_Images/popup_image.tpl .......and it works!!?

connie 01-05-2008 11:24 PM

Re: Easy dynamic thumbnail generation
 
thanks for sharing!

davidsaldana 02-19-2008 06:00 PM

Re: Easy dynamic thumbnail generation
 
Getting the following error message:

[img]images/cache/38be615b1e97c9573c1d3c8a756970f9.gif[/img]
[img]images/cache/431f777e53ca640f904abbbaaa4e5277.gif[/img]

which are showing up as links, that work, but no thumbnails. Here is product_images.tpl:

Code:

{if {$images[image].image_path neq ""}
<tr>
<td>
<a href="#" onmouseover="document.main_image.src=Image{$images[image].imageid}.src;">{thumb file=`$images[image].image_path` longside="100" link="false" html="alt='`$product.product`' border='0'"}</a>
</td>
</tr>
{/if}
{/section}
</table>
</td>
<td>
<img src="{$images[0].image_path}" name="main_image" alt="{$product.product}" />
</td>
</tr>
</table>
{/capture}
{include file="dialog.tpl" content=$smarty.capture.dialog extra='width="100%"'}
{/if}


any help would be greatly appreciated.

Also this is for branch 4.1

davidsaldana 03-07-2008 11:16 AM

Re: Easy dynamic thumbnail generation
 
Anyone ????

balinor 03-07-2008 11:50 AM

Re: Easy dynamic thumbnail generation
 
You need to be very careful when copying older code from teh forums. When the forum switched from PHPBB to Vbulletin, all <img tags were corrupted and display [img] instead. Check the source and replace any [img] tags with actual <img src="

davidsaldana 03-07-2008 11:58 AM

Re: Easy dynamic thumbnail generation
 
Thanks Balinor. The only [img] I have in my code is in function.thumb, which is as follows:

### RЭckgabe-Strings erstellen
if (empty($params['html'])) $_RETURN['img'] = '[img]'.$_DST['file'].'[/img]';
else $_RETURN['img'] = '[img]'.$_DST['file'].'[/img]';

What would I replace it with?

-ds

balinor 03-07-2008 12:04 PM

Re: Easy dynamic thumbnail generation
 
Right, that is incorrect. Try this:

### RЭckgabe-Strings erstellen
if (empty($params['html'])) $_RETURN['img'] = '<img src="'.$_DST['file'].'" '.$params['html'].' '.$_DST['string'].' alt="" title="" />';
else $_RETURN['img'] = '<img src="'.$_DST['file'].'" '.$params['html'].' '.$_DST['string'].' />';

davidsaldana 03-07-2008 12:52 PM

Re: Easy dynamic thumbnail generation
 
Thanks Balinor. Worked like a charm. Someone might want to edit that original file, as I banged my head against the wall for about 2 days on this one (formidable opponent).

johnmate 05-29-2008 08:24 AM

Re: Easy dynamic thumbnail generation
 
Hello, I am using this mod and it works great! Thank you. Having one issue. During HTML catalog generation it is changing all the img src on the thumbs from http: to https: anyone know a solution?

Thanks, John xcart 4.1.10

MythNReality 10-14-2008 11:40 AM

Re: Easy dynamic thumbnail generation
 
Got this worked with 4.1.9 underneath (within the tabbed menu.)
After followed the post #70, I managed to get the thumbnails show up next to the default detail image, but NO hovering effect. Any idea how can I get this to work properly?

efindlow 10-18-2008 08:41 PM

Re: Easy dynamic thumbnail generation
 
Quote:

Originally Posted by balinor
Right, that is incorrect. Try this:

### RЭckgabe-Strings erstellen
if (empty($params['html'])) $_RETURN['img'] = '<img src="'.$_DST['file'].'" '.$params['html'].' '.$_DST['string'].' alt="" title="" />';
else $_RETURN['img'] = '<img src="'.$_DST['file'].'" '.$params['html'].' '.$_DST['string'].' />';

ohh perfect - thanks for this works great

nfc5382 03-01-2014 10:44 AM

Re: Easy dynamic thumbnail generation
 
Just noticed that my php log was filling up with errors related to this mod. Anyone else see the same?

[12-Feb-2014 19:54:30] PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /var/.../store/Smarty-2.6.9/plugins/function.thumb.php on line 298
[12-Feb-2014 19:54:30] PHP Warning: imagedestroy(): supplied argument is not a valid Image resource in /var/.../store/Smarty-2.6.9/plugins/function.thumb.php on line 403
[12-Feb-2014 19:54:30] PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /var/.../store/Smarty-2.6.9/plugins/function.thumb.php on line 298
[12-Feb-2014 19:54:30] PHP Warning: imagedestroy(): supplied argument is not a valid Image resource in /var/.../store/Smarty-2.6.9/plugins/function.thumb.php on line 403
[12-Feb-2014 19:54:31] PHP Warning: imagecopyresized(): supplied argument is not a valid Image resource in /var/.../store/Smarty-2.6.9/plugins/function.thumb.php on line 285


All times are GMT -8. The time now is 09:01 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.