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
  #21  
Old 06-17-2006, 01:59 AM
 
Eddie Hillegers Eddie Hillegers is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 47
 

Default

Got the preloader working halfway.
i get the images but after a mouseover it chances to the last image
and than gets locked up, i think it's javascript related because if you
view the pagesource everything is there.

Image0 = new Image();
Image0.src = "/samenstellen/images/cache/d_38.gif";
Image0 = new Image();
Image0.src = "/samenstellen/images/cache/d_39.gif";
Image0 = new Image();
Image0.src = "/samenstellen/images/cache/d_40.gif";
Image0 = new Image();
Image0.src = "/samenstellen/images/cache/d_41.gif";
</script>
<tr><td>[img]images/cache/4314547fabe40818438c2e98033ca920.gif[/img]</td></tr>


<tr><td>[img]images/cache/32d2076704113ad58fdf9845fb49ad65.gif[/img]</td></tr>


<tr><td>[img]images/cache/db7523fe115c642349f7b87b65fa632f.gif[/img]</td></tr>


<tr><td>[img]images/cache/db3ae42fa5ac3fb13d35a72f43399ddd.gif[/img]</td></tr>


</table>
</td>

<td>
<img src=/samenstellen/images/cache/d_38.gif name="main_image"/>

it must be in de onmouseover syntax i think.
and there is a differens in paths: new image: samenstellen/images/cache
onmouseover images/cache

funny thing is i dont get a broken image


Cheers Eddie

Alltibes, i wil sent you a pm so you can see what's going on,
my shop is still under a password protected area.
__________________
X-cart 4.1.11
PHP 5.2.0
MySQL 5.0
www.ebonist.nl
Reply With Quote
  #22  
Old 06-17-2006, 07:39 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default

You need to set the orderby field for the detailed images. Otherwise the swapping won't work. I've edited the original code and reposted it. It now uses imageid instead of orderby to preload the images.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #23  
Old 06-17-2006, 11:47 PM
 
Eddie Hillegers Eddie Hillegers is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 47
 

Default

That does the trick! i,m very glad with this mod.
A perfect way to show your detailed images in large.

thanks very much. Eddie
__________________
X-cart 4.1.11
PHP 5.2.0
MySQL 5.0
www.ebonist.nl
Reply With Quote
  #24  
Old 06-18-2006, 12:46 AM
 
Eddie Hillegers Eddie Hillegers is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 47
 

Default

to get rid of the border around the thumbnails i changed

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

in function.thumb.php to this

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

maybe a bit rude but it does the trick for me

Cheers Eddie
__________________
X-cart 4.1.11
PHP 5.2.0
MySQL 5.0
www.ebonist.nl
Reply With Quote
  #25  
Old 06-18-2006, 01:35 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default

You don't need to change the source, just stick the border=0 in the html parameter.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #26  
Old 06-19-2006, 01:55 PM
 
jdedba jdedba is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 96
 

Default re-size images

It is a wonderful mod / addition to x-cart. Thank you very much.

Is it a way using the same function to re-size the image?

Thanks.
__________________
version 4.1.1
Reply With Quote
  #27  
Old 06-19-2006, 02:43 PM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default

Sure, just change the paramaters. I have it set so the pictures are 100 pixels on their longest side. Read the link in the first post for all the different parameters you can use. I think all you need to do is change longside="100" to longside="400".

I don't know how you'd integrate it with x-cart directly, but you can use it to display the image in the proper dimensions after it's uploaded.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #28  
Old 06-19-2006, 03:54 PM
 
jdedba jdedba is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 96
 

Default

Thank you for your replay.
Thanks.
__________________
version 4.1.1
Reply With Quote
  #29  
Old 06-20-2006, 06:12 AM
  JWait's Avatar 
JWait JWait is offline
 

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

Default

What I am trying to achieve is to have the original image (and detailed images if there are any) displayed on the product page as a thumbnail that will open in a popup window if they are clicked. Presently we are using the telefirma image mod in xcart version 4.0.18 and are very happy with it, but plan to change to 4.1 when it is stable. Will this plugin work for what we are trying to do? If so any help in incororating it would be appreciated.
__________________
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
  #30  
Old 06-20-2006, 08:12 AM
 
netgene netgene is offline
 

Newbie
  
Join Date: Jan 2006
Posts: 6
 

Default perfect squares and a question...

in reply to how to make them square... no, dont use photoshop, it will take for ever.

look at http://www.cerdmann.com/thumb/ they have an example, about forcing it to crop on the sides.



==========

second, i have a problem, i am trying to replace the normal product_thumbnail.tpl so that all the pictures will go 'into' the mod, but i get an error here..

{thumb file=$tmbn_url longside="100" link="true"}


Fatal error: Smarty error: thumb: parameter 'file' cannot be empty and must exist in /hsphere/local/home/samor/edecodrive.com/Smarty-2.6.12/Smarty.class.php on line 1095


Can anyone help? i already tryed, double quotes, single quotes, etc... i even tryed entering the name of file, directly... but it still says that error..
__________________
4.1.10
Linux
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 05:19 PM.

   

 
X-Cart forums © 2001-2020