Mortgages - 0 Credit Cards - Car Insurance - Dubai Property - Loans

PDA

View Full Version : no right click script


lilquit
Mar 23rd 2005, 8:24 pm
Would it be hard to add a no right click script for images into my site
www.662mob.com

Thank you

fryman
Mar 23rd 2005, 8:45 pm
I use this and love it


<script language="JavaScript1.2">
var clickmessage="Right click disabled on images!"
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}
function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>

It seems to work only on IE.

Smyrl
Mar 23rd 2005, 8:46 pm
I have been told that only makes people more determined to get. I saw a javascript version. The work around being disable javascript. It seems where there is a will, there is a way. I might considering branding so if stolen it would be obvious.

Shannon

getsum80
Mar 23rd 2005, 8:56 pm
a very nice good code

J.D.
Mar 23rd 2005, 8:57 pm
I use this and love itFF will popup a dialog and then will still show the menu in FF.

Besides, it won't prevent people from downloading your images, if this is what you are trying to prevent, that is. In FF, you just go to Page Info and you will see all images on the page and will be able to save them.

J.D.

lilquit
Mar 23rd 2005, 9:01 pm
I'm not tech enought to put it on . I will have to find someone that is but thanks for the code.
I want it because people are posting my images on other sites using my bandwith

fryman
Mar 23rd 2005, 9:03 pm
That is not a right click problem, it is called hotlinking. Much more complicated, you should get in touch with someone that can play around with your .htaccess file.

lilquit
Mar 23rd 2005, 9:09 pm
well its mostly kids doing it so i think they just right click properties to get the image address

J.D.
Mar 23rd 2005, 9:17 pm
well its mostly kids doing it so i think they just right click properties to get the image addressAs fryman said, it's not the kind of problem you can resolve with client-side scripting. Find out which sites are hotlinking to your images and block offending IP's.

J.D.

lilquit
Mar 23rd 2005, 9:22 pm
well if they cant right click they have to view source to get the code yes??? That is enough for me.. if they go through the trouble of viewing source code i dont mind

NewComputer
Mar 23rd 2005, 9:27 pm
I'm not tech enought to put it on . I will have to find someone that is but thanks for the code.
I want it because people are posting my images on other sites using my bandwith

Do you have Cpanel? You can use what is called a hotlinking block...

lilquit
Mar 23rd 2005, 9:32 pm
No cpanel on this hostng service
Im trying to get my web guy to change this site to my other host which has a cp but he is lagging OC (out of control)

ResaleBroker
Mar 23rd 2005, 9:37 pm
You can prevent hotlinking with .htaccess if you're on an Apache Server with Mod-rewrite. If you need a tutorial I posted some links in my blog [seobulletin].

J.D.
Mar 23rd 2005, 9:53 pm
well if they cant right click they have to view source to get the code yes??? That is enough for me.. if they go through the trouble of viewing source code i dont mindYou are missing the point here (sorry). If you consider clicking Tools > Page Info as going through the trouble, then sure, stick this or similar code to each and every of your pages. What we are trying to say here is that this will be more trouble for *you* to maintain the script than it will ever be for *them*.

J.D.

getsum80
Mar 23rd 2005, 10:09 pm
aahhh ok i get it

NewComputer
Mar 23rd 2005, 10:26 pm
I never really understood the whole javascript thing anyways. Invisibly water mark it (there are tutorials) and then keep an eye on your logs. When you visit their site and drag your mouse over the image you know is yours it will show your watermark. An ISP email later and the image is gone.

Otherwise, you are fighting a losing battle...

getsum80
Mar 23rd 2005, 10:31 pm
whats an isp email?
i email their isp?
how do i know whose hosting them

this is the site where people post my photos the most
www.805bbr.com/forum

redking
Mar 24th 2005, 9:06 am
whats an isp email?
i email their isp?
how do i know whose hosting them

this is the site where people post my photos the most
www.805bbr.com/forum

Damn you're dumb. This is not the industry for you. :p

getsum80
Mar 24th 2005, 10:19 am
F U red king I'm a kid and i am trying to learn

clasione
Mar 24th 2005, 10:40 am
This is the one I use:
<script type="text/JavaScript">
<!--

//Disable

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> </script>

J.D.
Mar 24th 2005, 12:33 pm
I'm a kid and i am trying to learnDon't pay much attention to him. Most people on this forum will answer your questions, even if they are simple. This is why DP is great :)

J.D.

NewComputer
Mar 24th 2005, 1:49 pm
Agreed,

You get the odd 'know it all' but usually everyone is pretty helpful...

PS: J.D. is a great help as well...

totally beginner
Jun 22nd 2005, 11:28 pm
Would it be hard to add a no right click script for images into my site
www.662mob.com

Thank you
i am so familiar with the bull sign in your website....:eek:
i think that sign is belong to "PARTAI DEMOKRASI INDONESIA PERJUANGAN" (PDI-P). this is one of the strongest politic "PARTAI" in Indonesia!:eek:
your logo is totally same man! (A bull with red eyes and white mouth)
it's not a JOKE man!
from your site, i know that your site start to operate at 2003.
you know....this GROUP was born far before that year. it's mean....you have no right with that symbol man....:eek:

NewComputer
Jun 23rd 2005, 8:48 am
I like Mob's better... ;)

clasione
Jun 23rd 2005, 10:06 pm
Do you have ftp access.... It is very simple to put in..... We can even send you the file via email with it in there....