Image Swaps Using Thumbnails

4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 27, 2012   (RSS)

Re: [justritedesign] Image Swaps Using Thumbnails

Hi Michael,

When I look at your source code, it says:
<body onload="MM_preloadImages('
Notice: Undefined variable: upload in D:\HostingSpaces\2tinker\2tinker.com\wwwroot\products.php on line 79
')">

Try replacing the preload images with the following which is an excerpt from a recipe in my CMSB Cookbook http://www.thecmsbcookbook.com

For a multi record editor on a list page, you’d insert this into the opening <body> tag

<body onload="MM_preloadImages('<?php foreach ($your_tableRecords as $record): ?><?php foreach ($record['your_roll_over_image_field'] as
$upload): ?>’<?php echo $upload['thumbUrlPath'] ?>’, <?php endforeach; ?><?php endforeach; ?>’blank.jpg’)">


(The call to blank.jpg adjusts the syntax of the commas between entries.)

For a single record editor or a detail page the code would be:
<body onload="MM_preloadImages(<?php foreach ($your_tableRecord['your_rollover_image_field'] as $upload): ?>’<?php echo
$upload['thumbUrlPath'] ?>’, <?php endforeach; ?>’blank.jpg’)">

(Note: If you’re adding a series of roll over images to some you already have, just add their calls to the end of the existing preload
list)

Then, for the image swap you might try one of my favorites, Thumbnail Viewer II from Dynamic Drive http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

Implementation in CMSB is pretty simple and to make installation super easy there’s a recipe with lots of information in the Cookbook.

Hope that helps,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Image Swaps Using Thumbnails

OK the preloads are working now.
<body onload="MM_preloadImages(<?php foreach ($productsRecord['images'] as $upload): ?>’<?php echo
$upload['thumbUrlPath3'] ?>’,’<?php echo $upload['thumbUrlPath'] ?>’, <?php endforeach; ?>’blank.jpg’)">


But the swaps are not taking place. Any ideas?
Michael Moyers



Owner of Just Rite Design Inc. A growing network of professionals in web design, graphic design, flash development, programming, and audio & video productions.



"Due to budget constraints, the Light at the end of the tunnel will be temporarily out!"

Re: [justritedesign] Image Swaps Using Thumbnails

Hi Michael,

As I suggested, check out the Thumbnail viewer II and see if that works for you.

It allows you to rollover any thumbnails and view an enlarged image. You can also use thumbnails per page code to limit the amount of thumbnails shown at one time.

This is documented in recipes in the CMSB Cookbook as well.

It's a pretty cool app with lots of easy to configure options for titles, links, etc.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php