Snoboreders Posted November 4, 2007 Posted November 4, 2007 Hey there I'm trying to install the multiple product image slideshow hack, but have had some problems. I'm getting some errors whenever I click on an image in My Shop I first saw this error: Fatal error: Call to undefined function: flushOldCachedImages(); in /home/content/N/o/x/Noxwear/html/product_info.php on line 160 and then I tried to remove it to see what would happen and got this error: Fatal error: Call to undefined function: resizeimage() in /home/content/N/o/x/Noxwear/html/product_info.php on line 177 Here is the code in my product_info.php that relates to the multiple product image hack: It starts at line 142. <!-- fancy product images slide show hack START --> <?php $slideFiles = explode(';',$product_info['products_slide_images']); $slideFilesCount = count($slideFiles); $sOut = ''; $cleaned = array(); for($sCount=0;$sCount<$slideFilesCount;$sCount++){ if(trim($slideFiles[$sCount] != '')){ $cleaned[] = $slideFiles[$sCount]; // cleaning if there is a name missing } } $cleanedCount = count($cleaned); $sOut .= 'var slideList = new Array('.$cleanedCount.');'."\n"; $sOut .= 'var slideListOriginal = new Array('.$cleanedCount.');'."\n"; for($sCount=0;$sCount<$cleanedCount;$sCount++){ $fileToResize = DIR_FS_CATALOG . DIR_WS_IMAGES . $cleaned[$sCount]; $resizedImageResult = resizeImage($fileToResize,SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); $resizedImage = $resizedImageResult[0]; $resizedImageWidth = $resizedImageResult[1]; $resizedImageHeight = $resizedImageResult[2]; $sOut .= 'slideList['.$sCount.'] = "'.$resizedImage.'";'."\n"; $sOut .= 'slideListOriginal['.$sCount.'] = "'.DIR_WS_IMAGES . $cleaned[$sCount].'";'."\n"; } echo '<script>'.$sOut.'</script>'; $fileToResize = DIR_FS_CATALOG . DIR_WS_IMAGES . $product_info['products_image']; $resizedImageResult = resizeImage($fileToResize,SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); $resizedImage = $resizedImageResult[0]; $resizedImageWidth = $resizedImageResult[1]; $resizedImageHeight = $resizedImageResult[2]; ?> <?php echo '<a href="java script:popupWindow(\''. tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\')"><span id="slidePanel">' . tep_image($resizedImage, addslashes($product_info['products_name']), $resizedImageWidth, $resizedImageHeight, 'hspace="5" vspace="5"') . '</span></a><br />' ?> <script type="text/javascript"> <!-- var slideStation = 0; var headImage = "<?=$resizedImage?>"; var fadeSpeed = 1000; var slideImage = headImage; var slideImageOriginal = "<?=DIR_WS_IMAGES . $product_info['products_image']?>"; setInterval(runSlideShow,3000); function slideFader(){ if(slideStation == slideList.length){ slideStation = -1; slideImage = headImage; slideImageOriginal = "<?=DIR_WS_IMAGES . $product_info['products_image']?>"; }else{ slideImage = slideList[slideStation]; slideImageOriginal = slideListOriginal[slideStation]; } sPanel = document.getElementById("slidePanel"); sPanel.innerHTML = "<img src='"+slideImage+"' hspace='5' vspace='5'/>"; slideStation++; } function runSlideShow(){ setTimeout(slideFader,1000); } function getActiveSlideImage(){ return slideImageOriginal; } --> </script> <?=TEXT_CLICK_TO_ENLARGE;?> <!-- fancy product images slide show hack END --> Thanks for any help, Chris
Snoboreders Posted November 4, 2007 Author Posted November 4, 2007 any idea where this function should have previously been defined, or even how to define it there? Does anybody have a different program I can use to host multiple images?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.