function get_image_css_tree($id, &$max_drop, &$max_width) { $sub_array = array(); $count = $swidth = 0; $cImage = new image_front(); $entries_array = $cImage->get_entries($id, true, false); if (!count($entries_array)) { return; } foreach ($entries_array as $key => $value) { $value['image_alt_title'] = strtoupper($value['image_alt_title']); $tmp_value = str_replace(' ', '', $value['image_alt_title']); $awidth = tep_string_length($tmp_value) * 9 + 16; $value['image_alt_title'] = htmlspecialchars(stripslashes($value['image_alt_title'])); if ($awidth > $max_width) { $string_length = (int) ($max_width / 9); $value['image_alt_title'] = substr($value['image_alt_title'], 0, $string_length) . '...'; $awidth = $max_width; } if ($awidth > $swidth) { $swidth = $awidth; } $sub_array[] = '<div class="css_sub hideflow"[<<<MAX_WIDTH>>>]><a href="' . tep_href_image_link($value['image_file']) . '" target="_blank">' . $value['image_alt_title'] . '</a></div>' . "\n"; $count++; if ($count > $max_drop) { $max_drop = $count; //$max_width = $swidth; //return $sub_array; } } $max_width = $swidth; return $sub_array; }
<div class="floater"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_ENTRIES); ?> </div> <div class="floatend"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, $split_params); ?> </div> </div> <?php } echo '<div class="collection cleaner">'; foreach ($zones_array as $key => $value) { echo '<div class="floater calign" style="width: ' . (SMALL_IMAGE_WIDTH + 16) . 'px; margin: 0px 4px 22px 4px;">'; echo ' <div class="imagelink"><a href="' . tep_href_image_link($value['image_file']) . '" rel="nofollow" title="' . $value['image_alt_title'] . '" target="_blank" style="height: ' . (SMALL_IMAGE_HEIGHT + 16) . 'px; width:' . (SMALL_IMAGE_WIDTH + 16) . 'px;">' . tep_image(DIR_WS_IMAGES . $value['image_file'], $value['image_alt_title'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'style="padding: 8px;"') . '</a></div>' . "\n"; echo ' <div class="imageline"><a href="' . tep_href_image_link($value['image_file']) . '" title="' . $value['image_alt_title'] . '" target="_blank">' . $value['image_title'] . '</a></div>'; echo '</div>' . "\n"; } echo '</div>'; if ($listing_split->number_of_rows > IMAGE_PAGE_SPLIT && (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3')) { ?> <div class="splitLine"> <div class="floater"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_ENTRIES); ?> </div> <div class="floatend"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, $split_params); ?> </div> </div>