Forums / General Questions / Suggestions for right click protect and ctrl c ????

Suggestions for right click protect and ctrl c ????

Views: 3,267

Results 1 to 20 of 20
8 May 2012, 3:13 AM
#1
911outfitters avatar

911outfitters

New Zenner

Join Date:
May 2012
Location:
Oklahoma
Posts:
8
Plugin Contributions:
0

Suggestions for right click protect and ctrl c ????

Would like suggestions on what and how to implement a right click protect and ctrl c for images and content on Zen Cart please. The suggestions that Google brings up makes me cross-eyed and dizzy LOL!
I figured the Zen Gurus here would have a solution for our dilemma.

Thanks in advance for your help! :D

Frank Jones
911 Outfitters LLC
https://www.911outfittersllc.com

8 May 2012, 4:57 AM
#2
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

the best thing to do is to watermark your images. Right click prevention is frustrating to those who normally use right click for navigation purposes. Anyone determined to harvest images or content will easily find a way around right click prevention.

8 May 2012, 8:30 AM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

Right-Click protection is pointless on EVERY site that tries to use it. When my 10-year-old daughter wants to copy an image, she knows that all she has to do is press FN+PRT SC - or use the "grab" function. She has also learned to go into the page source and look for the <img src> tag and render the image outside of its called page.

Don't waste your time trying to invoke systems that just do not work. Rather watermark images.

20 years a Zencart User

8 May 2012, 11:57 AM
#4
911outfitters avatar

911outfitters

New Zenner

Join Date:
May 2012
Location:
Oklahoma
Posts:
8
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

Thanks for the feedback. I understand it's easy for a determined person.
Boss want's it.
Any suggestions?
Thanks!

8 May 2012, 12:50 PM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

My suggestion is to tell the boss that it's pointless. The ONLY WAY you can protect images is to watermark them. Image Handler has a mechanism to watermark MEDIUM and LARGE images automatically.

Other image tools (some commercial) have this capability too.

There is no point putting in a feature that essentially has no functional value or purpose.

20 years a Zencart User

8 May 2012, 12:58 PM
#6
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

do a google search for JavaScript no right click and a number of scripts will come up.

8 May 2012, 1:26 PM
#7
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

Put this script right after the <head> tag in your includes/templates/YOUR_TEMPLATE/common/html_header.php file

<script language=JavaScript> var message="Function 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(message);return false") </script>
8 May 2012, 1:57 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Suggestions for right click protect and ctrl c ????

And of course, this "protection" will only work if a user has javascript enabled, so turning js off in the browser defeats the protection.

8 May 2012, 2:12 PM
#9
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

Yes a persistant hacker can get to the source of any image, but this is mainly to stop people harvesting lots of images and product descriptions to fill up their own online stores. Ive had it in the past where Ive had to list say 200 new branded products, and its easy to find a competitors site and rip off their images and text. If I come across a site like that where I couldnt simply right click copy paste, id move on.

So yes this does help.

8 May 2012, 3:48 PM
#10
911outfitters avatar

911outfitters

New Zenner

Join Date:
May 2012
Location:
Oklahoma
Posts:
8
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

dgent:

Put this script right after the <head> tag in your includes/templates/YOUR_TEMPLATE/common/html_header.php file

<script language=JavaScript> var message="Function 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(message);return false") </script>

Works like a charm, thank you so much!

8 May 2012, 4:01 PM
#11
911outfitters avatar

911outfitters

New Zenner

Join Date:
May 2012
Location:
Oklahoma
Posts:
8
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

As long as he is signing my checks, he gets what he wants. Thanks for your help.

schoolboy:

My suggestion is to tell the boss that it's pointless. The ONLY WAY you can protect images is to watermark them. Image Handler has a mechanism to watermark MEDIUM and LARGE images automatically.

Other image tools (some commercial) have this capability too.

There is no point putting in a feature that essentially has no functional value or purpose.

8 May 2012, 4:02 PM
#12
911outfitters avatar

911outfitters

New Zenner

Join Date:
May 2012
Location:
Oklahoma
Posts:
8
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

I understand a determined person can get whatever they want, I appreciate the point.
Thanks to those of you who answered my question without a big debate on the subject LOL

8 May 2012, 4:05 PM
#13
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Suggestions for right click protect and ctrl c ????

You might ask your boss if he really wants to protect his images (in which case a watermark is necessary), or if he just wants to protect them from casual copying.

8 May 2012, 4:09 PM
#14
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

911Outfitters:

I understand a determined person can get whatever they want, I appreciate the point.
Thanks to those of you who answered my question without a big debate on the subject LOL

It's not so much a "debate" as to what is actually a BETTER OPTION for your boss.

Of course you have to be "tactful" when dealing with the boss, but you could gain a lot of credibility if you show him/her WHY the right-click option is pointless, AND THEN offer a solution that WILL actually address his principle concern (protecting the images).

You see... down the line ( 6 months to a year perhaps) he might visit a competitor's site and see his images being displayed.

Guess who will take the rap for that?

Sometimes, even bosses need to be "educated" and offered a technically superior option.

And you can "cover your own back" by doing what is technically best...

Still... if you see this perspective as argumentative, so be it. Frankly I have no real concern if your boss's pics get copied or not :D

20 years a Zencart User

8 May 2012, 4:11 PM
#15
911outfitters avatar

911outfitters

New Zenner

Join Date:
May 2012
Location:
Oklahoma
Posts:
8
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

As I said before, I understand the point. If we really wanted to protect them 100% we wouldn't post them!
Nothing is fool proof, even water marks.
This works fine for all but the determined.

8 May 2012, 4:12 PM
#16
911outfitters avatar

911outfitters

New Zenner

Join Date:
May 2012
Location:
Oklahoma
Posts:
8
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

Understood thanks amigo.

schoolboy:

It's not so much a "debate" as to what is actually a BETTER OPTION for your boss.

Of course you have to be "tactful" when dealing with the boss, but you could gain a lot of credibility if you show him/her WHY the right-click option is pointless, AND THEN offer a solution that WILL actually address his principle concern (protecting the images).

You see... down the line ( 6 months to a year perhaps) he might visit a competitor's site and see his images being displayed.

Guess who will take the rap for that?

Sometimes, even bosses need to be "educated" and offered a technically superior option.

And you can "cover your own back" by doing what is technically best...

Still... if you see this perspective as argumentative, so be it. Frankly I have no real concern if your boss's pics get copied or not :D

8 May 2012, 4:28 PM
#17
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

911Outfitters:

As I said before, I understand the point. If we really wanted to protect them 100% we wouldn't post them!
Nothing is fool proof, even water marks.
This works fine for all but the determined.

Very true, and the last time I looked, watermarking doesnt stop someone right clicking/copying/hyperlinking your image.

All it means is the image they use has your watermark on...

8 May 2012, 5:02 PM
#18
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

This is also quite a neat trick that we have used when sites use direct hyperlinking to images on our servers/sites:

This goes into a .htaccess file...

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.com/.*$ [NC]
RewriteRule .(gif|jpg)$ http://www.mydomain.com/shopatourplace.jpg [R,L]

The FOURTH line shows a JPG image called "shopatourplace.jpg (Shop at OUR place). The image is a plain jpg showing the URL to OUR SITE.

When an image thief deep-links to any images on our site, every image so linked shows the "shopatourplace.jpg" image instead of the intended image...

Their site carries scores of adverts for our site!

20 years a Zencart User

8 May 2012, 6:43 PM
#19
911outfitters avatar

911outfitters

New Zenner

Join Date:
May 2012
Location:
Oklahoma
Posts:
8
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

Nice!
Alas we are on a windows server :(

28 Nov 2012, 11:04 PM
#20
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: Suggestions for right click protect and ctrl c ????

Thanks for the code works a treat on both my sites .. I have alternative needs for no right click ... They can copy the image if they want .I just don't want them to be able to access right click list :)