The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Imagehost image broken? Replace with error image
Hi,
I have seen a few sites using this but no one has made this a mod for vb. I'll explain the idea. Alot of forums have images posted in their posts that are hosted remotley through imagehosts (TinyPic, Photobucket etc). However, if the imagehost is down, then you get alot of broken images that doesn't look too attractive. What this javascript code does is replace that broken image with an image of your choice (maybe an image saying 'This image is currently unavailable' or something like that) Code:
<html> <head> <script language="JavaScript" type="text/javascript"> function ImgError(source){ source.src = "http://yourdomain.com/images/no_image.gif"; source.onerror = ""; return true; } </script> </head> <body> <div><img src="http://jquery.com/images/bibeault_cover150A.jpg" border="1" height="100" alt="image" onerror="ImgError(this)" /></div> </body> </html> I think it maybe possible just to add this in the HTML code that displays the images in the posts; Code:
onerror="this.src='img/img_error.jpg';" I have no idea about programming so im hoping this might be an idea that a coder wants to make a reality. Regards, John |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|