Version: 1.00, by Shadow
Developer Last Online: Nov 2023
Category: Miscellaneous Hacks -
Version: 5.0.0 Beta 11
Rating:
Released: 10-12-2012
Last Update: 10-15-2012
Installs: 13
Template Edits
Re-useable Code Translations
No support by the author.
This script will act as a sort of barrier to prevent people from right clicking on your forum thus offering some sort of protection. There are ways to get round this but think of it as a hurdle which may put some people off.
Add the following code to the header template:
Code:
<script type="text/javascript">
<!--
var error="Right click functionality is disabled";
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(error);return false")
// -->
</script>
While this blocks the ability to Right Click, it also blocks the ability to copy and paste through the context menu that appears when Right Clicking. Copy and paste functionality is still available through the Ctrl+C and Ctrl+V shortcuts respectively.
Editing the Error Message:
Changing the message shown is a piece of cake. This can be done by finding this line near the top of the script:
Code:
var error="Right click functionality is disabled";
Great little fix for anyone with their own photo's on a site, and the fact the message is customisable is great too.
Read my post above.
The problem is that this mod gives a very very very false sense of security.
And this comment brought to you by a photography who runs a photography forum - go figure!
The problem is that this mod gives a very very very false sense of security.
And this comment brought to you by a photography who runs a photography forum - go figure!
I did read your comment above, and yes I do know there are ways around it, but stopping a copy/paste will put off the casual plagiarism, they probably wont have the means to prnt scrn, import it into photoshop, just for a picture.
The hardened user will of course be able to.
The safest way is watermark all pictures before publishing them, which is what all the stock photo sites do. even then if you know your way around PS you can remove a watermark with a few clicks.
I did read your comment above, and yes I do know there are ways around it, but stopping a copy/paste will put off the casual plagiarism, they probably wont have the means to prnt scrn, import it into photoshop, just for a picture.
The hardened user will of course be able to.
The safest way is watermark all pictures before publishing them, which is what all the stock photo sites do. even then if you know your way around PS you can remove a watermark with a few clicks.
a) You don't have to be hard core to do this; just disable JS in your browser while on the page and get the image direct via right click -- hence my false sense of security comment
Quote:
Firefox: (it's this easy)
In the address bar, type "about:config" (with no quotes), and press Enter.
Click "I'll be careful, I promise"
In the search bar, search for "javascript.enabled" (with no quotes).
Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.
b) I 100% agree that watermarking is your best defence other than not publishing