No Right Click Images Plugin - Version 2.5

Version Description

  • added Cell phone styles to javascript for Cell phones. I hope that his helps with Cell phone images. Tested on an old iPad - it may work. Works mostly in iPad, android phone works on some images.
  • This readme file did not update on the WordPress site so I have reloaded it.

=

Download this release

Release Info

Developer kpgraham
Plugin Icon wp plugin No Right Click Images Plugin
Version 2.5
Comparing to
See all releases

Code changes from version 2.4 to 2.5

no-right-click-images-plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: No Right Click Images Plugin
4
  Plugin URI: http://www.BlogsEye.com/
5
  Description: Uses Javascript to prevent right clicking of images to help keep leaches from copying images
6
- Version: 2.4
7
  Author: Keith P. Graham
8
  Author URI: http://www.BlogsEye.com/
9
 
@@ -12,6 +12,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
  */
14
  if (!defined('ABSPATH')) exit; // just in case
 
 
 
15
  /************************************************************
16
  * kpg_no_rc_img_fixup()
17
  * Shows the javascript in the footer so that the image events can be adjusted
@@ -44,6 +47,7 @@ function kpg_no_rc_img_fixup() {
44
  ?>
45
  <script language="javascript" type="text/javascript">var kpg_cell="<?php echo $cell; ?>";var kpg_nrci_image="<?php echo $img; ?>";var kpg_nrci_extra="<?php echo $replace; ?>";var kpg_nrci_drag="<?php echo $drag; ?>";</script>
46
  <script language="javascript" type="text/javascript" src="<?php echo $js; ?>"></script>
 
47
  <?php
48
  }
49
  function kpg_no_rc_img_control() {
@@ -112,17 +116,7 @@ function kpg_no_rc_img_control() {
112
  <h2>No Right Click Images Plugin</h2>
113
 
114
  <div style="position:relative;float:right;width:35%;background-color:ivory;border:#333333 medium groove;padding:4px;margin-left:4px;">
115
- <p>This plugin is free and I expect nothing in return. If you would like to support my programming, you can buy my book of short stories.</p>
116
- <p>Some plugin authors ask for a donation. I ask you to spend a very small amount for something that you will enjoy. eBook versions for the Kindle and other book readers start at 99&cent;. The book is much better than you might think, and it has some very good science fiction writers saying some very nice things. <br/>
117
- <a target="_blank" href="http://www.blogseye.com/buy-the-book/">Error Message Eyes: A Programmer's Guide to the Digital Soul</a></p>
118
- <p>A link on your blog to one of my personal sites would also be appreciated.</p>
119
- <p><a target="_blank" href="http://www.WestNyackHoney.com">West Nyack Honey</a> (I keep bees and sell the honey)<br />
120
- <a target="_blank" href="http://www.cthreepo.com/blog">Wandering Blog</a> (My personal Blog) <br />
121
- <a target="_blank" href="http://www.cthreepo.com">Resources for Science Fiction</a> (Writing Science Fiction) <br />
122
- <a target="_blank" href="http://www.jt30.com">The JT30 Page</a> (Amplified Blues Harmonica) <br />
123
- <a target="_blank" href="http://www.harpamps.com">Harp Amps</a> (Vacuum Tube Amplifiers for Blues) <br />
124
- <a target="_blank" href="http://www.blogseye.com">Blog&apos;s Eye</a> (PHP coding) <br />
125
- <a target="_blank" href="http://www.cthreepo.com/bees">Bee Progress Beekeeping Blog</a> (My adventures as a new beekeeper) </p>
126
  </div>
127
  <h4>The No Right Click Images Plugin is installed and working correctly.</h4>
128
  <p>This plugin installs some javascript in the footer of every page. When your page finishes loading, the javascript sets properties on the images to stop them from being dragged or right clicked. </p>
3
  Plugin Name: No Right Click Images Plugin
4
  Plugin URI: http://www.BlogsEye.com/
5
  Description: Uses Javascript to prevent right clicking of images to help keep leaches from copying images
6
+ Version: 2.5
7
  Author: Keith P. Graham
8
  Author URI: http://www.BlogsEye.com/
9
 
12
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
  */
14
  if (!defined('ABSPATH')) exit; // just in case
15
+
16
+ // (second time updating WordPress repository)
17
+
18
  /************************************************************
19
  * kpg_no_rc_img_fixup()
20
  * Shows the javascript in the footer so that the image events can be adjusted
47
  ?>
48
  <script language="javascript" type="text/javascript">var kpg_cell="<?php echo $cell; ?>";var kpg_nrci_image="<?php echo $img; ?>";var kpg_nrci_extra="<?php echo $replace; ?>";var kpg_nrci_drag="<?php echo $drag; ?>";</script>
49
  <script language="javascript" type="text/javascript" src="<?php echo $js; ?>"></script>
50
+
51
  <?php
52
  }
53
  function kpg_no_rc_img_control() {
116
  <h2>No Right Click Images Plugin</h2>
117
 
118
  <div style="position:relative;float:right;width:35%;background-color:ivory;border:#333333 medium groove;padding:4px;margin-left:4px;">
119
+ <p>This plugin is free and I expect nothing in return. If you would like to support my programming effforts, please <a target="_blank" href="http://www.blogseye.com/donate/">donate a small amount</a> to help keep me interested in this project.</p>
 
 
 
 
 
 
 
 
 
 
120
  </div>
121
  <h4>The No Right Click Images Plugin is installed and working correctly.</h4>
122
  <p>This plugin installs some javascript in the footer of every page. When your page finishes loading, the javascript sets properties on the images to stop them from being dragged or right clicked. </p>
no-right-click-images.js CHANGED
@@ -1,6 +1,6 @@
1
  /**************************************************************************
2
  This javascript is used by the no-right-click-images plugin for wordpress.
3
- Version 2.4
4
  Please give credit as no-right-click-images.js by Keith P. Graham
5
  http://www.blogseye.com
6
  **************************************************************************/
@@ -200,6 +200,30 @@ function kpg_nrci_action(event) {
200
  b[i].ontouchmove=function(event) { return kpg_nrci_context(event);}
201
  b[i].ontouchend=function(event) { return kpg_nrci_context(event);}
202
  b[i].ontouchcancel=function(event) { return kpg_nrci_context(event);}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  }
204
  if (kpg_nrci_drag=='Y') b[i].ondragstart=function(event) { return kpg_nrci_dragdrop(event);}
205
  }
1
  /**************************************************************************
2
  This javascript is used by the no-right-click-images plugin for wordpress.
3
+ Version 2.5 (second time updating WordPress repository)
4
  Please give credit as no-right-click-images.js by Keith P. Graham
5
  http://www.blogseye.com
6
  **************************************************************************/
200
  b[i].ontouchmove=function(event) { return kpg_nrci_context(event);}
201
  b[i].ontouchend=function(event) { return kpg_nrci_context(event);}
202
  b[i].ontouchcancel=function(event) { return kpg_nrci_context(event);}
203
+ /* set the styles to prevent actions on cell */
204
+ b[i].style.webkitUserSelect='none';
205
+ b[i].style.MozUserSelect='none';
206
+ b[i].style.khtmlUserSelect='none';
207
+ b[i].style.msUserSelect='none';
208
+ b[i].style.oUserSelect='none';
209
+ b[i].style.userSelect='none';
210
+
211
+ b[i].style.webkitTouchCallout='none';
212
+ b[i].style.MozTouchCallout='none';
213
+ b[i].style.khtmlTouchCallout='none';
214
+ b[i].style.msTouchCallout='none';
215
+ b[i].style.oTouchCallout='none';
216
+ b[i].style.touchCallout='none';
217
+
218
+ b[i].style.webkitUserDrag='none';
219
+ b[i].style.MozUserDrag='none';
220
+ b[i].style.khtmlUserDrag='none';
221
+ b[i].style.msUserDrag='none';
222
+ b[i].style.oUserDrag='none';
223
+ b[i].style.userDrag='none';
224
+
225
+ b[i].setAttribute("unselectable", "on");
226
+
227
  }
228
  if (kpg_nrci_drag=='Y') b[i].ondragstart=function(event) { return kpg_nrci_dragdrop(event);}
229
  }
readme.txt CHANGED
@@ -4,18 +4,24 @@ Donate link: http://www.blogseye.com/buy-the-book/
4
  Requires at least: 3.0
5
  Tested up to: 3.5
6
  Contributors: Keith Graham
7
- Stable tag: 2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Disables right click context menu on images to help deter leeches from glomming images.
12
 
13
  == Description ==
14
- The No Right Click Images Plugin Plugin uses JavaScript to change the right click action on IMG tags to disable context menu. It disables the context menu on images only so other right click actions, such as links, should work normally.
15
 
16
- Since it uses JavaScript, it targets more images than using a plugin that filter pages and rewrite the tag. The plugin will find many images generated in scripts or pasted into posts and comments, that similar plugins will not find.
17
 
18
  It is impossible to keep people from stealing images that appear in web pages, but this plugin will deter casual theft from surfers who do not want to interpret HTML or dig into the browser cache.
 
 
 
 
 
 
19
 
20
  == Installation ==
21
  1. Download the plugin.
@@ -56,6 +62,10 @@ It is impossible to keep people from stealing images that appear in web pages, b
56
  * Added an option to turn off IOS Android events that screwed up some web sites.
57
  * Added an extra Security check on plugin load.
58
 
 
 
 
 
59
  == Frequently Asked Questions ==
60
  = I click on an image to open it and then I can save it =
61
  When you added the image to WordPress you specified this behavior. When you insert an image you have to specify that you don't want to have a click on the image open the image. It is up to you to protect your images by not opening the image on a click.
4
  Requires at least: 3.0
5
  Tested up to: 3.5
6
  Contributors: Keith Graham
7
+ Stable tag: 2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Disables right click context menu on images to help deter leeches from glomming images.
12
 
13
  == Description ==
14
+ The No Right Click Images Plugin Plugin uses JavaScript to change the right click action on IMG tags to disable the context menu. It disables the context menu on images only so other right click actions, such as links, should work normally.
15
 
16
+ Since it uses JavaScript, it targets more images than using plugins that filter pages and rewrite the tag. The plugin will find many images generated in scripts or pasted into posts and comments, that similar plugins will not find.
17
 
18
  It is impossible to keep people from stealing images that appear in web pages, but this plugin will deter casual theft from surfers who do not want to interpret HTML or dig into the browser cache.
19
+
20
+ Smart Phone support is hit or miss. Some web pages rely very much on clickable images and this suppresses some actions, so if an image is large enough to fill a screen, the page may not be able to scroll. It depends very much on your WordPress theme and how it displays images.
21
+
22
+ Images uploaded via the Wordpress Media uploader will open in a window if clicked. The image will not be protected, so be sure to indicate that there should be no action if the image is clicked at the time you upload the image.
23
+
24
+ Some browsers prevent javascript from altering the context menu behaviour. The plugin tries to get around this by using a replacement image that briefly replaces the clicked image.
25
 
26
  == Installation ==
27
  1. Download the plugin.
62
  * Added an option to turn off IOS Android events that screwed up some web sites.
63
  * Added an extra Security check on plugin load.
64
 
65
+ = 2.5 =
66
+ * added Cell phone styles to javascript for Cell phones. I hope that his helps with Cell phone images. Tested on an old iPad - it may work. Works mostly in iPad, android phone works on some images.
67
+ * This readme file did not update on the WordPress site so I have reloaded it.
68
+
69
  == Frequently Asked Questions ==
70
  = I click on an image to open it and then I can save it =
71
  When you added the image to WordPress you specified this behavior. When you insert an image you have to specify that you don't want to have a click on the image open the image. It is up to you to protect your images by not opening the image on a click.