The Nissan Club banner

1 - 14 of 14 Posts

·
I don't care
Joined
·
4,185 Posts
Discussion Starter #1
I want a standard image to show up instead of a red X when somebody tries to post a picture from this website that is no longer in that location (for example I deleted a picture but sombody posted the pic on a forum).
 

·
<----Just say NO to Drugs
Joined
·
1,621 Posts
when you delete the image form your server, rename the image the same thing

for example.

stfu.jpg is what was used. you deleted it. take the pic you want to show up in place of the red x and rename it stfu.jpg


thats all i know of.
 

·
I don't care
Joined
·
4,185 Posts
Discussion Starter #4
system_V said:
why not just use an anti hot linking protection script?
Because I don't want to prevent hotlinking, I just want an image to appear instead of a red X when that pic is no longer there.
phinger23 said:
when you delete the image form your server, rename the image the same thing
I'm dealing with hundreds of pictures. It's just stupid to do it that way.
 

·
Resistance is futile
Joined
·
3,202 Posts
If it is Unix, you could create symbolic links to the default image. Otherwise it sounds like something that should be a feature of the web server, just like it can have a default html page instead of 404.
 

·
:-)
Joined
·
2,051 Posts
How do you remove them from the server? Do you ftp in or what? What kind of access do you have? What I would maybe do, I could probaly jiffy up a script too. Is just make a script that writes the current file tree to a file. Then every so often checks it to see if all those files are still there. If any aren't that are .jpg, .png, etc.. then the script makes an image of the same name using your default image, then rewrite the file tree using whatever is new then. To schedule it just use at or something... Not sure what what kind of scheduling daemon it is running. Have it run once of twice a week (or however often you usually keep a pic up for) and your good to go.

If I am bored I will post a script back up here. If you don't see anything today or tomorrow then I probably forgot.
 

·
I don't care
Joined
·
4,185 Posts
Discussion Starter #8
kierandill said:
Otherwise it sounds like something that should be a feature of the web server, just like it can have a default html page instead of 404.
This sounds closest to what I need.
Thom said:
If I am bored I will post a script back up here. If you don't see anything today or tomorrow then I probably forgot.
That doesn't look like what I need it for. I don't want you to waste your time.
 

·
Resistance is futile
Joined
·
3,202 Posts

·
Registered
Joined
·
1,607 Posts
you could write a simple php script to do that.
just whenever you load a file, check to see if that file exists with some built in functions. Then have a simple if statement that would change the picture if it doesn't exist.
 

·
Banned
Joined
·
45 Posts
i linked the php script then implemented it and it wasn't what he was asking. i'm fairly certian you need to have a custom 404 error that is an image configured in apache or IIS.
 
1 - 14 of 14 Posts
Top