View Single Post
  #15  
Old 03-28-2005, 11:08 AM
 
weckie weckie is offline
 

eXpert
  
Join Date: Feb 2005
Location: Netherlands
Posts: 220
 

Default new version

Well here's a new one. This one will popup even if there is a popupblocker activated. (SO THIS IS REALLY THE ONE)

Here's what to do, it is very simple. In your modules/Detailed_Product_Images directorie, first backup your PRODUCT_IMAGES.TPL
Then create a new one with this data, and thats it. THATS REALLY it. So very simple, even the newbies can do this.

Code:
{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *} {if $images ne ""} {capture name=dialog} <CENTER> <DIV {literal}<head><script language="JavaScript" type="text/javascript"> // hier definieer je alle afbeeldingen var afbeeldingen=new Array(){/literal} {section name=image loop=$images} {if $images[image].avail eq "Y"} {if $images[image].tmbn_url}{literal} afbeeldingen[{/literal}{%image.index%}{literal}]=["{/literal}product_image.php?imageid={$images[image].imageid}{literal}", "#"] // "pad en naam van de foto", "eventuele hyperlink" {/literal}{/if}{/if}{/section}{literal} var voorladen="ja" // "ja" of "nee" var optlinktarget="" // optioneel: hier kun je een target invullen bij framesgebruik var beeldrandbreedte=0 var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.2)" // hieronder niets wijzigen if (voorladen=="ja"){ for (x=0; x<afbeeldingen.length; x++){ var ditbeeldje=new Image() ditbeeldje.src=afbeeldingen[x][0]}} function beeldcode(dezeafbeelding){ var beeldhtml="" if (dezeafbeelding[1]!="") beeldhtml='<a href="'+dezeafbeelding[1]+'" target="'+optlinktarget+'">' beeldhtml+='[img]'+dezeafbeelding[0]+'[/img]' if (dezeafbeelding[1]!="") beeldhtml+='</a>' return beeldhtml} function wijzigbeeld(beeldplaatsing, beeldindex){ if (document.getElementById){ var imgobj=document.getElementById(beeldplaatsing) if (imgobj.filters && window.createPopup){ imgobj.style.filter=filterstring imgobj.filters[0].Apply()} imgobj.innerHTML=beeldcode(afbeeldingen[beeldindex]) if (imgobj.filters && window.createPopup) imgobj.filters[0].Play() return false}} </script></head> <body>{/literal} {section name=image loop=$images} {if $images[image].avail eq "Y"} {if $images[image].tmbn_url} {literal} <a href="#" onMouseover="wijzigbeeld('beeldplaatsing',{/literal}{%image.index%}{literal})"> [img]{/literal}product_image.php?imageid={$images[image].imageid}{literal}[/img]</a> {/literal}{/if}{/if}{/section}{literal} <center> <div id="beeldplaatsing" style="width:1px;height:1px"></div> </center> </body> {/literal} </DIV> {/capture} {if $smarty.capture.dialog ne ""} {include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra="width=100%"} {/if} {/if}


SEE IT LIVE http://www.weckonline.nl


Tell me what you think of it....

EASTER was very productive for me....

Greetz
__________________
Herman Steijn

Using: X-cart 4.5.4
AT: http://www.weckonline.com LIVE
Reply With Quote