coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: football-pics.com on September 25, 2004, 12:45:06 PM

Title: Disable right mouse click
Post by: football-pics.com on September 25, 2004, 12:45:06 PM
How can I disable this to prevent people from randomly downloading my pics? Is there any tool or code I can use or where do I have to install it?
On my old page a friend installed this

<!-- Begin
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
if (ns4up) {document.captureEvents(Event.MOUSEDOWN)}
document.onmousedown=taste
function taste(e) {
if (ns4up) {z=e.which}
if (ie4up) {z=event.button}
if (z>1) {
alert ("(c) Marc Schüler (GAMEDAY MEDIA SERVICES).Bei Interesse an einem Bild: foto@football-pics.com")
return false
}
}
// end -->

to prevent Downloads. But if I add it in displayimage.php it won´t work. HELP!!!
Thanks,
Marc
Title: Re: Disable right mouse click
Post by: poubao on September 25, 2004, 12:56:09 PM
put it in your    ../theme/template.htm   ;)
Title: Re: Disable right mouse click
Post by: football-pics.com on September 25, 2004, 01:04:47 PM
Got it... Thank you very much...
Marc
Title: Re: Disable right mouse click
Post by: kiig on September 25, 2004, 02:00:32 PM
Where exactly in the template.html should  it go ??

I can see from your site, Marc, - that's it's working :-) did you do exactly this ??
Title: Re: Disable right mouse click
Post by: kiig on September 25, 2004, 02:17:32 PM
Got it, - think you code is missing a semicolon after : document.onmousedown=taste

It's working now, - thanx.

EDIT : removed the semicolon again, just to check it, - and it still works... must have made something else right :-) Your code contribution is right. Thanx.
Title: Re: Disable right mouse click
Post by: Casper on September 25, 2004, 04:45:02 PM
@ football-pics.com

this is a very often asked, and answered question.  Please use the search facility before starting a new thread.
Title: Re: Disable right mouse click
Post by: PCGUY112887 on October 04, 2004, 06:11:31 AM
Althougt this is sort of useless to disable right clicks now... in IE you just hovor over the image and usually a toolbar pops up allowing you to hit save.  And other browsers (like Firefox) just ignore it and let you right click anyways.
Title: Re: Disable right mouse click
Post by: Tranz on October 04, 2004, 07:06:34 AM
People like to use right-click for myriads of other things, too, and it would be irritating to cripple such a functionality.