Graveyard666 Posted February 11, 2004 Posted February 11, 2004 I have 4 different "no image available" images I'd like to use for products that don't have images (being alot of stock on the site will be older, images may not be available for these items) is it possible to insert a script someplace that would randomly call these 4 images so at least something would be there, on my old site I had a script in php that said this: $image = $row->image; if ($image == 'noimage.png') { $noimagepictures = array('images/nopreview.jpg', 'images/nopreview2.jpg', 'images/nopreview3.jpg', 'images/nopreview4.jpg', 'images/nopreview4b.jpeg'); $index = rand(0,count($noimagepictures)-1); $image = $noimagepictures[$index]; } and everytime a page loaded without a set image ONE of the 5 images above were called from /images directory noimage.png was set as the default image in the mysql db can i get the same effect using osc ms2? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.