HTML Help Forum HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

How do I do this??
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum -> General HTML
View previous topic :: View next topic  
Author Message
DumbledoreDD



Joined: 01 Jul 2004
Posts: 1

Posted: Thu Jul 01, 2004 6:49 pm     How do I do this??  

How do I make it where my members can't right click on my website to still my graphics? Please help thank you.
mjpliv



Joined: 11 May 2004
Posts: 402
Location: Nova Scotia

Posted: Fri Jul 02, 2004 2:58 am      

You can place this java script between the head tags of your HTML -

Code: <SCRIPT LANGUAGE="JavaScript" type="text/javascript" >
<!--

document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
//-->
</SCRIPT>

But keep in mind it is fairly simple to circumvent any of these "security" scripts (I did, afterall, take this from the source code of a site that was "protected" by it). It like the old saying - "Locks are for honest pleople!". If someone decides they really want your graphics, they will get them.
pesty



Joined: 22 Jul 2004
Posts: 28

Posted: Thu Jul 22, 2004 9:01 pm      

HI Dumble,

There is no sure fire way to stop people from stealing your grahics. But, you can stop the average. Someone that knows their way around, knows how to shut the javascript off or go into their cache and retrieve get the path name. So, nothing out there is fool proof.

On your mouse you have a left and right button, some has a center wheel. The buttons are numbered. If you left clicking your mouse is =1, rigt clicking is =2 and the wheel is number 3.

IE/Win users clicks the right button(2) to copy and NS/Win uses the wheel(3) to copy.

Beware though any function that restricts button use, can also keep some of your clickable links from working.

Here are 2 scripts. You would place them in the <head> section if you decide to use them.




Script1

<script>
//this script form www.dynamicdrive.com. Author Andy Scott
Will not allow user to hightliaght and copy your text. Displays diaplog box warning of theft.//
function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>




Script 2

<script langage-"javascript">
// does not prevent text highlighting to copy text. Displays warning dialog box//
//stop image theft
function click(){
if(event.button==2)
{
alert('You are about to commit a crime. These images are protected by Copyright Law.')
}
}document.onmousedown=click
</script>
T1



Joined: 27 May 2004
Posts: 18
Location: Belgium

Posted: Sun Jul 25, 2004 3:07 pm      

Hi,

There's another way to 'protect' images. It's not full proof either but its really hard to get the picture.

You chop up your image into a grid say 4x4. Then you create a table 4x4. You put the parts off your image not as images but as backgrounds off the cell. And you put in each cell a dummy image that you size up to the exact same size as the cel. This dummy image is a gif of 1x1 with one color that you make the transparant color.

If the visitor right clicks to save the image all he does is save a transparent gif with nothing in it.

I used 4x4 as an example but if you go higher it gets really hard to reassemble the image because with 20x20 you need to download 400 backgrounds and put them back together.

There's a program around that does this for you: Image Splitter http://www.imagecure.com
Strange_Will



Joined: 01 Jan 2005
Posts: 4

Posted: Thu Jan 06, 2005 5:46 pm      

T1 wrote: Hi,

There's another way to 'protect' images. It's not full proof either but its really hard to get the picture.

You chop up your image into a grid say 4x4. Then you create a table 4x4. You put the parts off your image not as images but as backgrounds off the cell. And you put in each cell a dummy image that you size up to the exact same size as the cel. This dummy image is a gif of 1x1 with one color that you make the transparant color.

If the visitor right clicks to save the image all he does is save a transparent gif with nothing in it.

I used 4x4 as an example but if you go higher it gets really hard to reassemble the image because with 20x20 you need to download 400 backgrounds and put them back together.

There's a program around that does this for you: Image Splitter http://www.imagecure.com

Uh printscreen?
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum -> General HTML
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group