Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: how do i disable right click for 1.4.3  (Read 3828 times)

0 Members and 1 Guest are viewing this topic.

allright

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
how do i disable right click for 1.4.3
« on: January 18, 2006, 08:37:25 am »

i have the codes i think but what file do i put the scripts at? themes.php? index.php? so i just need to be pointed in the rigt direction thank you.
« Last Edit: January 18, 2006, 10:39:57 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how do i disable right click for 1.4.3
« Reply #1 on: January 18, 2006, 08:50:55 am »

depends on how your codes work. I suggest putting it into themes/yourtheme/template.html
Logged

mrand

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: how do i disable right click for 1.4.3
« Reply #2 on: January 18, 2006, 03:22:17 pm »

What is the code? I would love to add this to galleries as well. Thanks.
Logged

allright

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: how do i disable right click for 1.4.3
« Reply #3 on: January 18, 2006, 05:23:35 pm »

i need to find the code as well. i don't know if i should use a javascript or just an html code? i tried putting a couple of codes in the theme.html. thank you
Logged

netfalls

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 58
    • Netfalls
Re: how do i disable right click for 1.4.3
« Reply #4 on: January 18, 2006, 06:08:23 pm »

Hi,

Just add this code in your template.html just before the  </head> tag 
Code: [Select]
<script language=JavaScript>
<!--


var message="copyright protected!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>


Logged
In my view you cannot claim to have seen something until you have photographed it

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how do i disable right click for 1.4.3
« Reply #5 on: January 18, 2006, 10:38:56 pm »

thanks for sharing, but let me say that the coppermine dev team considers no right click scripts silly and useless. Please search the board for detailed explanations why.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.