Greybox Multi Product Images with Actinic 10.0.3

Adds a Lightbox slideshow to your products.
Post Reply
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Greybox Multi Product Images with Actinic 10.0.3

Post by norman »

Actinic 10.0.3 (now in Beta 2) places the PreviewHTML folder in a completely new location that breaks Greybox Multi Product Images, especially on Preview.

Note that Preview only works with the full page Preview using Internet Explorer (not in Firefox). Actinic's built-in Preview window doesn't work with this add-on (never has).

The following is an experimental workaround. Feedback would be appreciated.

Go to Design / Library / Layouts / Lightbox Images / Lightbox Support. The code there should be:

Code: Select all

 	<script type="text/javascript">
      var GB_ROOT_DIR = "<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" >.</actinic:block>./<actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e" ><actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e"><actinic:variable name="CatalogDirectory" />/</actinic:block></actinic:block>";
   </script>
   <script type="text/javascript" src="AJS.js"></script>
   <script type="text/javascript" src="AJS_fx.js"></script>
   <script type="text/javascript" src="gb_scripts.js"></script>
   <link href="gb_styles.css" rel="stylesheet" type="text/css" media="all" />
   <script type="text/javascript" src="greyboxwithmultiimagesupport.js"></script>
Only if you see the above code, proceed to replace it with the below:

Code: Select all

   <script id="ajs_js" type="text/javascript" src="AJS.js"></script>
   <script type="text/javascript" src="AJS_fx.js"></script>
 	<script type="text/javascript">
		<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e">var GB_ROOT_DIR = document.getElementById('ajs_js').src.replace(/AJS\.js$/,'');</actinic:block>
		<actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e">var GB_ROOT_DIR = "./<actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e" ><actinic:variable name="CatalogDirectory" />/</actinic:block>";</actinic:block>
   </script>
   <script type="text/javascript" src="gb_scripts.js"></script>
   <link href="gb_styles.css" rel="stylesheet" type="text/css" media="all" />
   <script type="text/javascript" src="greyboxwithmultiimagesupport.js"></script>
Norman
phoenix164
Posts: 5
Joined: Wed Jan 26, 2011 3:15 pm

Re: Greybox Multi Product Images with Actinic 10.0.3

Post by phoenix164 »

This fix has not worked for me Norman.

The site is www.formyoffice.co.uk

The images will swap but the enlarge does not work and there is a js error.
phoenix164
Posts: 5
Joined: Wed Jan 26, 2011 3:15 pm

Re: Greybox Multi Product Images with Actinic 10.0.3

Post by phoenix164 »

here is a direct link to a page with the problem

http://www.formyoffice.co.uk/acatalog/A ... 12363.html
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: Greybox Multi Product Images with Actinic 10.0.3

Post by norman »

The file gb_scripts.js hasn't been uploaded to your server. Check that it's in your Site folder. If not, unzip it into there from your Greybox Zipfile.

If it is there, then Actinic may be erronously omitting it from the upload (don't know why). You can fix that by adding it via Design / Additional Files.
Norman
phoenix164
Posts: 5
Joined: Wed Jan 26, 2011 3:15 pm

Re: Greybox Multi Product Images with Actinic 10.0.3

Post by phoenix164 »

Not sure why that was missing. I have now upload it.

Then enlarge button now does something, but the images are missing. Please see link above again.
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: Greybox Multi Product Images with Actinic 10.0.3

Post by norman »

We're a bit further on.

Now the file loader_frame.html does not appear to be on your server. Once again, make sure it's in your Site folder. If not, it may be best to unzip the whole Greybox Zipfile into your site folder as it looks like a lot of bits of that add-on are missing.

I cannot see how simply upgrading to 10.0.3 can cause files to go missing.
Norman
phoenix164
Posts: 5
Joined: Wed Jan 26, 2011 3:15 pm

Re: Greybox Multi Product Images with Actinic 10.0.3

Post by phoenix164 »

Most strange, the site was certainly functioning before the upgrade. No files were removed manually.

It appears we are now getting close, one last problem, the zoom window now appears but the next icon is stretched.
phoenix164
Posts: 5
Joined: Wed Jan 26, 2011 3:15 pm

Re: Greybox Multi Product Images with Actinic 10.0.3

Post by phoenix164 »

Sorted it Norman. I have posted the fix you sent to me previously regarding this issue

Edit gb_scripts.js
Look for (include the quotes) "left"
Replace with (include the quotes) "gb_left"

Look for (include the quotes) "right"
Replace with (include the quotes) "gb_right"

Edit gb_styles.css
Look for .left
Replace with .gb_left

Look for .right
Replace with .gb_right

Many thanks for your quick responses to my issues.
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: Greybox Multi Product Images with Actinic 10.0.3

Post by norman »

Ahah! I was just re-discovering that problem and the fix.

Actinic added CSS for .left and .right with V10 in May 2010. This rather general terminology broke the Greybox add-on which likewise used .left and .right for completely different purposes. I fixed that problem with the tweaks you discovered and they are now in the current version of that plugin.

I'm now using a jQuery based variant called "Fancybox" ( http://fancybox.net/ ) for new sites using this add-on. Same Lightbox like effect but with a different look and feel. You can see the test site at http://www.drillpine.biz/v10-greyboxmpi ... g_Kit.html - try using the mouse-wheel when in the lightbox.

Another nice feature of the new version is that it works within the Actinic real-time Preview and also Previews in Firefox.

Conversion kit available for those who want to switch to Fancybox.
Norman
Post Reply