Patch to display default image
Emmtee <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.features |
|---|---|
| Message-ID | <12e70467acaa27c3013e2f1eebfe835f@osCommerce-Forums> |
This message was sent from: Features
http://forums.oscommerce.com/viewtopic.php?p=165136#165136
----------------------------------------------------------------
working with tep_image (html_output.php) i added a line to auto-replace nonexistant images with a default image (called nopic.png) ...
here the code-snipplet with the additional line
[code]
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
if (!is_file($src)) { $src = DIR_WS_IMAGES . "nopic.png"; } # replace missing images with default
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
return false;
}
....
...
.
[/code]