Post by Todge on Nov 30, 2005 7:18:12 GMT -8
This will add security to any images over 50 pixels wide added to posts (so it shouldn't effect your smilies), so even if right clicking is enabled, the URL they will be given is false..
There are still ways of grabbing the image URL, like viewing the source code, but it is more difficult to find the correct URL with this code, but it does add to the security...
Put it in your Global Footer..
You need to have a transparent .gif image with which to hide the pictures under, find or create one, upload it and put the address here...
var grabbedImage = 'http://todge.bishsite.com/Pics/pic76.gif';
You are welcome to use mine, at that address, but I advise you hoste it yourself.
You can still get the image URLs by quoting the post, but guests can't do that anyhow.
There are still ways of grabbing the image URL, like viewing the source code, but it is more difficult to find the correct URL with this code, but it does add to the security...
Put it in your Global Footer..
<script type="text/javascript">
<!--
/*
Hide Images in posts by Todge
Copyright © 2005
Please keep this header intact
*/
function hideImages(thisPost)
{
var grabbedImage = 'http://todge.bishsite.com/Pics/pic76.gif';
var postCode;
var postImages;
var picWidth;
var picHeight;
postImages = thisPost.getElementsByTagName('img');
postPics = thisPost.innerHTML.split(/<img/i);
for(i=0; i<postImages.length; i++)
{
if(postImages[i].alt == '[image] ' && postImages[i].width > 50)
{
postPics[i+1]=postPics[i+1].split('>');
picWidth = postImages[i].width;
picHeight = postImages[i].height;
postPics[i+1][0]='<table width="'+picWidth+'" height="'+picHeight+'" cellpadding="0" border="0"><tr><td style="background-image: url('+postImages[i].src+');" width="100%" heigth="100%"><img src="'+grabbedImage+'" width="'+picWidth+'" height="'+picHeight+'"></td></tr></table';
postPics[i+1]=postPics[i+1].join('>');
}
else
{
postPics[i+1]='<img'+postPics[i+1];
}
}
thisPost.innerHTML=postPics.join('');
}
window.onload=function()
{
var post = document.getElementsByTagName('TD');
for(t=0; t<post.length; t++)
{
if(post[t].align=='right'&&post[t].height=='20'&&post[t].vAlign=='bottom'&&post[t].width=='40%')
{
hideImages(post[t+1]);
}
}
}
// -->
</script>
You need to have a transparent .gif image with which to hide the pictures under, find or create one, upload it and put the address here...
var grabbedImage = 'http://todge.bishsite.com/Pics/pic76.gif';
You are welcome to use mine, at that address, but I advise you hoste it yourself.
You can still get the image URLs by quoting the post, but guests can't do that anyhow.