Right, you are using Image Titles, so the added spans should go in that version.
PHP Code:
if ($new_products->RecordCount() > 0) {
if (isset($new_products_category_id) && $new_products_category_id != 0) {
$category_title = zen_get_categories_name((int)$new_products_category_id); //image titles - box header image if file exists 2007-10-04
$title = '<h2 class="centerBoxHeading"><span class="centerBoxHeadingWrapper">' . (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/centerboxhead-new.gif') ? zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/centerboxhead-new.gif') : sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '' )) . '</span></h2>';
} else {
$title = '<h2 class="centerBoxHeading"><span class="centerBoxHeadingWrapper">' . (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/centerboxhead-new.gif') ? zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/centerboxhead-new.gif') : sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))) . '</span></h2>';
}
Make the title image a gif of the text with transparent background.
Cut your "corn" image in two, say one part with the right end of the ear (cornbg-r.gif) and the other with the rest (cornbg-l.gif). Duplicate the straight part so it is a lot longer - more than any centerbox you expect to see it in.
Now in your stylesheet, add
Code:
h2.centerBoxHeading {
background-image: url(../images/cornbg-l.gif);
background-position: top left;
background-repeat: no-repeat;
}
.centerBoxHeadingWrapper {
background-image: url(../images/cornbg-r.gif);
background-position: top right;
background-repeat: no-repeat;
/*display: block;*/ /*this might be needed to make the span fill the heading*/
}