View Single Post
  #2  
Old 03-05-2008, 04:54 AM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 694
 

Default Re: Greybox Smart Window v5.53 Implementation

Awesome implementation. Thanks for doing that.

I needed this to work with 4.0 on one site so here's the only modifications I had to do to make to gb_productpage.tpl work with 4.0 branches:

replaced {lng.lbl_click_to_enlarge} with 'enlarge' - you could also add the lang variable if you wish.
replaced the second image href from 4.1 version to 4.0 version.
changed 'http://xcart/skin1/greybox/files/' to '{$SkinDir}/greybox/files/ - stops the 'unsecure page elements' warning in IE if your site uses http & https.

Here's the adapted gb_productpage.tpl - replace the one supplied in the 4.1 zip above to this and your 4.0 site will have a working greybox mod...

Code:
{if $images ne ""} {section name=image loop=$images} {if $images[image].avail eq "Y"} {if $images[image].tmbn_url} <div style="display:{cycle values="block,none,none,none,none,none"};"> <a href="{$images[image].tmbn_url}" title=" {$images[image].alt|escape}" rel="gb_imageset[detailed]">enlarge</a> </div> {else} <div style="display:{cycle values="block,none,none,none,none,none"};"> <a href="{$xcart_web_dir}/product_image.php?imageid={$images[image].imageid}" title="{$images[image].alt|escape}" rel="gb_imageset[detailed]">enlarge</a> </div> {/if} {/if} {/section} <script type="text/javascript"> var GB_ROOT_DIR = "{$SkinDir}/greybox/files/"; </script> <script type="text/javascript" src="{$SkinDir}/greybox/files/AJS.js"></script> <script type="text/javascript" src="{$SkinDir}/greybox/files/AJS_fx.js"></script> <script type="text/javascript" src="{$SkinDir}/greybox/files/gb_scripts.js"></script> <link href="{$SkinDir}/greybox/files/gb_styles.css" rel="stylesheet" type="text/css" /> {/if}
__________________
Best regards,

Donavichi.
X-Cart developer and e-commerce website designer since 2002.
X-Cart versions supported 3.5.x to 5.x
Hosting support for Linux, cPanel, WHM, Plesk
Reply With Quote