right click block?

Relax and enjoy The Lounge. For all Non-Joomla! topics or ones that don't fit anywhere else. Normal forum rules apply.
Locked
devrikcumle
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Jul 01, 2011 9:09 am
Location: istanbul

right click block?

Post by devrikcumle » Fri Jul 01, 2011 9:25 am

hi
Right-click and copy on my website how do I disable?

thanks.

User avatar
Bub-
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Thu Jul 02, 2009 2:25 am

Re: edit HTML , CSS Joomla 1.6

Post by Bub- » Fri Jul 01, 2011 9:29 am

Hey me too I was interested to know where do I paste my right click disable code? I used to paste it in the header with 1.5 but since loaded the 1.6.4 and I too am waiting for someone to help point out whether I can access html with in the system too or is it only css as I m not too hot with the ftp.

Ramshid
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Jun 29, 2011 7:10 am
Location: India
Contact:

Re: right click block?

Post by Ramshid » Fri Jul 01, 2011 9:37 am

Try this

Code: Select all

var message="Sorry, right-click has been disabled";
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")
or try Anti Right Click module

http://extensions.joomla.org/extensions ... ction/5699
“Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter.”
(Eric Raymond)

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: right click block?

Post by Tonie » Fri Jul 01, 2011 9:45 am

Which is chidishly easy to circumvent. If people want your content, they will know how to get around the right-click disable.

devrikcumle
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Jul 01, 2011 9:09 am
Location: istanbul

Re: right click block?

Post by devrikcumle » Fri Jul 01, 2011 10:04 am

thank you very much.

User avatar
Spheric
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 114
Joined: Thu Nov 24, 2005 3:24 am
Contact:

Re: right click block?

Post by Spheric » Sat Jul 02, 2011 4:03 am

Is it unfashionable to post a more complete reply for a newb?

Hello friend, what you want to do is influence the user-browser behavior. Very few ways to do that without Javascript because that's kinda why the guys at Netscape originally dreamed it up. With Javascript, we can actually modify what user behaviors get what action, in other words we can render their "right click" useless.

That's kind of unethical in high webmaster terms: we never take control of the user machine or experience without the user's consent and understanding. In more modern times, we use Javascript to influence DOM behavior and even get really funky, doing database interface with AJAX and stuff, but that's beyond scope at this moment. Just understand that using Javascript to disable user functionality is frowned upon.

AND as other people have told you, sophisticated users will know exactly how to get around this but here's an example of a Javascript that will screw their right-click:

Actually, screw that, just Google "javascript disable right click" and find it but on to another techniques you can use along with this.

If you only are worried about a few images, make a different id selector in CSS for each image and use the image as the background in CSS for that div. Then in code, insert a transparent gif. When they right-click and save, they will get a transparent gif. That usually confuses people and Google Images too.

If you use the Javascript right-click disable plus the CSS-transparent gif trick you have just frustrated most people, the only people you have to worry about now are those who know to look in your CSS and get your image so at this point, just watermark the image.

I bet 95%+ people will not try to do anything with your images with all that. Make sure your web images are low res too. Never give away your full-res images, always optimize.

Good luck my friend!
The trouble with knowing everything is that you don't.


Locked

Return to “The Lounge”