Where do I put code to disable right-click?
I just put some javascript code on my site to disable the right-click, and it works great.
(I know this is not going to stop someone who really wants to steal, but it should
cause those with a conscience to reconsider just copying it)
anyway it works great on my site code, but not when I link to my gallery in Zenphoto.
Does anyone know what module(s) or where I insert the code. (it needs to be between <head> and </head>
Thanks, George
Comments
2) I'm going to provide some help in a minute, but first I'm going to jump on my soap box. What you are trying to do is a complete waste of time. All _anyone_ has to do is use the "View" menu to see the markup or your site. And there are a multitude of tools for completely downloading a website. Including the web browser itself. So when I come across a site that disables functionality of MY software, I leave it and never come back.
3) Okay, here is where I actually provide some help to you. You have probably written some javascript that is incompatible with jQuery. Zen Photo uses the jQuery library and it is included on every page rendered by ZP. Off the top of my head, the following code is how I would (if I ever lost my mind) disable the right click action using jQuery:
`
jQuery(document).ready(function()
{
jQuery(this).click(function() {
if (jQuery(this).event.button == 2) {
event.preventDefault();
return;
}
});
});
`
That is totally untested and is not something I will help with further. Use Google if it doesn't work.
Locking your doors does not keep thieves from breaking in your house...
so why do we lock our doors?
and thanks for the information.
Would you like to know how easy it is to pull down _all_ resources necessary to have a local copy of a website? Using wget, `wget -pkr http://example.com/`. There, I've downloaded all images, HTML, Javascript, etc. to have a local copy of exmaple.com. And I can browse it just like I would by navigating to the real site.
I understand that copyright on the web is difficult to keep track of. It is a valid concern. But breaking _my_ software because you think _I_ am a thief, well, that does not endear me to you or the information you want me to have.
I use the context menu (right click menu) to navigate backward in my browsing history. It is much quicker than mousing to the top left corner of my web browser.
till me please where can i but it ??
and how can i use it??
thank you...