• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

No right click......and spam free

Status
Not open for further replies.

Matt8

All? No, ALL!
NLC
I searched the forums for this, because I thought i read something a while back about this, but after going thru 7 pages, i gave up.

I need to know how to disable right clicking.

Second, I need to know if there is a way to stop 'spam bots' from finding my email on a website. I know there is a way, I just don't know how.

Thanks for your help!
 
This is the code I occasionally use.
<script language="JavaScript">



<!--
// No rightclick script v.2.5
// (c) 1998 barts1000
// barts1000@aol.com
// Don't delete this header!

var message="YOUR MESSAGE HERE.\n\n"; // Message for the alert box
// Don't edit below!

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->



</script>
 
well they can still use view > source

disable java

take a screenshot

click on the picture, and drag it to their address bar

view source and find the picture

open up their cache


sooo many other methods also
 
Yeah yeah, we are (nearly) all aware of that, but he asked for a code and I gave him one. Not our place to question it. :confused2
 
Originally posted by is0lized
not everyone knows baout that, just want him to know that

exactly. it's not something many people would think to do, they'd usually give up after trying to right click a few times.
 
Thanks for the code Jan.

I honestly don't think my layout is worth doing all that is0lized :rolleyes:
 
Honestly I don't think your layout is worth disabling right clicks over, considering, after all, that there is more in the context menu besides "View Page Source".
 
Honestly I don't think your layout is worth disabling right clicks over

I do not think it is your job to judge my layout. For one you do not even know what site I am planning on using this for.

My disabling right clicks is going to do more than keep my layout safe, but I need it to keep people from stealing my pictures by linking directly to my picture. Thats steals my bandwidth, which costs me money, and it has happened way too many times.
 
I don't think you read my post correctly, continue reading after the comma. There is more in the context menu besides view source. Useful things like forward, back, bookmark, save, reload, send page, etc. You're hurting yourself more than you are protecting. Your site's not worth that, regardless of what it is.

Furthermore, it's not even protecting you from anything. If someone wants to steal something from you, they will. Those that are so naive as to not know there's a menubar in the browser are not threats, they're not going to be the ones to fear.

What you need is an antileech script, not some half-assed "no right clicks".


<edit> And now that I think about it, being a visitor to your site it is my job to judge your layout. I, as a visitor, am who the site is for, am I not? </edit>
 
Last edited:
The only possible way I can think of is do what angelfire does... when somebody tries to link images from your site it will come up with a angelfire graphic so they cannot be linked on a different site... but I don't know how you can do that on your own. Maybe you should look for a host that does.
 
Tisk, Tisk.... All of you, I thought you would be experienced. Oh yeah, please stay on the topic, it seems like you are veering off of it for a minute. I would like to help you guys, and this is how i disable rightclick, and how i prevent hotlinking:

RIGHT CLICK: (hehe, lets see what php highlighting does)
PHP:
<body onContextMenu="return false;">

^^^ That is the tag i use

For the hotlinking you have to have a host that supports .htaccess. In you .htaccess file this is what you should add, please delete the text on the line after the //->'s

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://testacct.techbrink.com/.*$ [NC] //-> This is supposed to be your domain, add more lines when needed
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://www.whenhotlinkedwhereistheurlpointingto.com [R,NC] -> The file extensions are seen there and the obvious URL.

If the code doesn't work for the htaccess part, try getting rid of the [NC] and the [R, NC] part. This works fine on the cpanel hosts so maybe it will work for you, i haven't tried, but it should.

Laters.
 
USE EXTERNAL CONTENT!

Style sheets are nice
Then you would have to find the link to the external in the source. which would make it harder
 
Originally posted by is0lized
well they can still use view > source

disable java

take a screenshot

click on the picture, and drag it to their address bar

view source and find the picture

open up their cache


sooo many other methods also
you know, I disabel the contex menu, selecting, draging, copying... etc. the code is:

oncontextmenu="self.focus();return false" ondragstart="self.focus();return false" onselectstart="return false" oncopy="return false"

insert into desired Tag (eg <body> or <img>), works in IE only. You may be wondering about the self.focus, simple it stops any item being selected. I even chuck in onclick="self.focus();"!

But there are something you cannot stop (eg cache, view source although you could encript it in an escape code, but that's easy to get around and makes the page much bigger)...

have fun,
=mek=
 
hmm, may as well give you the solution to your email problem. put this in your site wherever your email is to appear:

<script language=javascript>
<!--
document.write('emailname'+'@host.tld');
//-->
</script>

That way bots (hopefully) won't find it because not only is it in a script tag, but it's broken in to 2 parts. For example take my email address of aractus@msn.com and it's:

<script language=javascript>
<!--
document.write('aractus'+'@msn.com');
//-->
</script>

=mek=
 
Responding to last two posts by Meksilon:

Of course, all that becomes useless when you disable JavaScript (or simply don't use IE), and the page becomes inaccessible if you've got some sort of script encoding the source.
 
Originally posted by Dusty
<edit> And now that I think about it, being a visitor to your site it is my job to judge your layout. I, as a visitor, am who the site is for, am I not? </edit>

Your completly right, but you are not a visitor to my site as it isn't even on the web right now :rolleyes: I relize that I did misunderstand you the first time, and for that I am sorry.

Thank you all for your help with the codes and such :D
 
What's the point of disabling hot-linking anyway when visitors can just save or 'take' an image from your site and put it on yours anyway?:confused:
 
Status
Not open for further replies.
Back
Top