Merging in existing user variables.

Integration of Magic Zoom Plus from http://www.magictoolbox.com with Actinic.
Post Reply
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Merging in existing user variables.

Post by norman »

If you have a set of existing variables containing image file-names and you'd like to use these with Magic Zoom Plus then this tweak may help. If a Zoom Image(n) setting is empty, your corresponding variable will be used instead. Code below is for 6 additional variables.

Look in layout Magic Zoom First Product Image (back it up first) for:

Code: Select all

$zoomimages = array('<actinic:variable name="ZoomImage0" encoding="perl" selectable="false" />',
						   '<actinic:variable name="ZoomImage1" encoding="perl" selectable="false" />',
						   '<actinic:variable name="ZoomImage2" encoding="perl" selectable="false" />',
						   '<actinic:variable name="ZoomImage3" encoding="perl" selectable="false" />',
						   '<actinic:variable name="ZoomImage4" encoding="perl" selectable="false" />',
						   '<actinic:variable name="ZoomImage5" encoding="perl" selectable="false" />',
						   '<actinic:variable name="ZoomImage6" encoding="perl" selectable="false" />');
Immediately after it add:

Code: Select all

$oldimages = array('  '<actinic:variable name="OldImage1" encoding="perl" selectable="false" />',
						   '<actinic:variable name="OldImage2" encoding="perl" selectable="false" />',
						   '<actinic:variable name="OldImage3" encoding="perl" selectable="false" />',
						   '<actinic:variable name="OldImage4" encoding="perl" selectable="false" />',
						   '<actinic:variable name="OldImage5" encoding="perl" selectable="false" />',
						   '<actinic:variable name="OldImage6" encoding="perl" selectable="false" />');
for ( $i=1; i<=6; i++ ) {if ( $zoomimages[$i] == '' ) $zoomimages[$i] = $oldimages[$i];}
Repeat the above for layout Magic Zoom Image List (back it up first).

Note that you'll have to replace OldImage1 ... OldImage6 with the actual names of the variables you are using.

Whenever you add a ZoomImage(n) setting, the old variable will be superseded.
Norman
Post Reply