Webmaster Forum

Ezilon Directory   PR6 Link Building Service   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 09-11-2007, 11:28 PM   #1 (permalink)
Inactive
 
Join Date: 07-31-07
Posts: 50
iTrader: 0 / 0%
Latest Blog:
None

sinster is liked by many
replacing broken images with a default image

Hello again,

I need to know if there's a code out there that automaticly takes your set default image and replace any broken images. Instead of people seeing the "red x's" I wanted to have any broken image replaced by one that says "photo not available". Almost like 404 error. I just have no idea what this kind of thing is called.
sinster is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 09-13-2007, 03:43 PM   #2 (permalink)
Empress™
 
chicgeek's Avatar
 
Join Date: 08-19-04
Location: York, UK
Posts: 17,964
iTrader: 0 / 0%
Latest Blog:
My Favourite Poem

chicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest order
Excellent question!

This might be a good place to start. Let us know how it pans out.
__________________
laura / chicgeek
soprano & web designer
laurakishimoto.ca
chıcgeeĸ @ flickr
chicgeek is online now  
Add Post to del.icio.us
Reply With Quote
Old 09-13-2007, 06:14 PM   #3 (permalink)
Contributing Member
 
Join Date: 09-01-07
Location: Gurgaon, India
Posts: 84
iTrader: 0 / 0%
Latest Blog:
PHP Programming

kaykays is on the right pathkaykays is on the right path
In PHP you can use the function file_exists() to check for the existence
of the image, and accordingly change the image name.

PHP Code:
if file_exists($imagefilename)
    echo 
'<IMG SRC="$imagefilename" >';
else
    echo 
'<IMG SRC="$defaultimagefilename" >'
kaykays is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-13-2007, 06:42 PM   #4 (permalink)
Empress™
 
chicgeek's Avatar
 
Join Date: 08-19-04
Location: York, UK
Posts: 17,964
iTrader: 0 / 0%
Latest Blog:
My Favourite Poem

chicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest order
That sounds like a much better answer.
Though you would have to do that for every image...?
__________________
laura / chicgeek
soprano & web designer
laurakishimoto.ca
chıcgeeĸ @ flickr
chicgeek is online now  
Add Post to del.icio.us
Reply With Quote
Old 09-16-2007, 09:42 PM   #5 (permalink)
Inactive
 
Join Date: 07-31-07
Posts: 50
iTrader: 0 / 0%
Latest Blog:
None

sinster is liked by many
ok I will try the same and let you know abt this..thanks for your help Kaykay
sinster is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing colors in this image, tricky yes, possible, i dont know basslion Graphic Design Forum 14 04-13-2008 06:11 PM
Replacing " in ASP Devil's Angel Coding Forum 4 03-26-2004 07:10 AM
Adwords replacing sprinks ppc burgi82 Google Forum 0 10-29-2003 05:56 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:48 AM.
© Copyright 2008 V7 Inc


Search Engine Optimization by vBSEO 3.1.0 ©2007, Crawlability, Inc.