WP-CopyProtect [Protect your blog posts] - Version 3.0.0

Version Description

Download this release

Release Info

Developer cchetanonline
Plugin Icon wp plugin WP-CopyProtect [Protect your blog posts]
Version 3.0.0
Comparing to
See all releases

Code changes from version 2.0.0 to 3.0.0

Files changed (4) hide show
  1. readme.txt +29 -20
  2. screenshot-1.jpeg +0 -0
  3. screenshot-1.png +0 -0
  4. wp-copyprotect.php +62 -26
readme.txt CHANGED
@@ -3,8 +3,10 @@ Contributors: cchetanonline
3
  Donate link: http://chetangole.com/blog/wp-copyprotect/#donate
4
  Tags: post, posts, copy, protect, right, click, disable, copyprotect, Google, SEO, page, plugin, access, content, javascript, security, wp-copyprotect, RSS, fetcher, duplicate, Bing,
5
  Requires at least: 2
6
- Tested up to: 3.0.1
7
- Stable tag: 2.1.0
 
 
8
 
9
  Protect your blog content from getting copied. A simple plug-in developed to stop the Copy cats
10
 
@@ -12,20 +14,17 @@ Protect your blog content from getting copied. A simple plug-in developed to sto
12
 
13
  Protect your blog content from getting copied. A simple plug-in developed to stop the Copy cats
14
 
15
- = This plug-in will =
16
- * **Disable selection of text**
17
- * **Disable right click** on your blog. (Diable right click with popup message or without popup message.)
18
- * **will not affect SEO**. Search engines can read your content without any problem.
19
-
20
- So that no one can simply copy and paste the content of your blog in there blog or site.
21
 
22
  = Please note =
23
  * Both *disable right click* and *disable selection of text* can be switch ON or OFF through *Settings* menu.
24
  * *You must enable the options* from WP-CopyProtect settings page after installing the plugin, to enable the protection to your blog.
25
-
26
- What's new new version 2.1.0 ? check [release notes](http://chetangole.com/blog/?p=1957).
27
 
28
- Why dont you rate the plugin if you like it !! :) >>
29
 
30
  By [Chetan Gole](http://chetangole.com/).
31
 
@@ -33,7 +32,7 @@ By [Chetan Gole](http://chetangole.com/).
33
 
34
  1. Upload `wp-copyprotect.php` to the `/wp-content/plugins/` directory
35
  2. Activate the plugin through the 'Plugins' menu in WordPress
36
- 3. Go to **Settings** and then **WP-CopyProtect** to configure and enable.
37
 
38
  == Frequently Asked Questions ==
39
 
@@ -45,8 +44,8 @@ If possible add this code near to Wordpress link.
45
  The "disable Content selection" will start working.
46
 
47
  = WP Copyprotect is bad for the SEO? =
48
-
49
- This plug-in is developed in PHP and javascript, for this reason the plug-in does not affect search engines, it only affects the user's browser that tries to copy your content.
50
 
51
  = I have problems and questions =
52
 
@@ -55,9 +54,19 @@ Catch me on [Wp-CopyProtect Homepage](http://chetangole.com/blog/wp-copyprotect/
55
  == Screenshots ==
56
  1. Configuration page
57
 
58
- == Changelog ==
59
- * ver : 2.1.0 : Footer link is now optional.
60
- * ver : 2.0.0 : New option added for disabling right click without popup message, UI changes.
61
- * ver : 1.9.1 : Compatiblility tag added for Wp 2.9 .
62
- * ver : 1.9.0 : VALID XHTML (Validation errors removed).
63
- * ver : 1.8.0 : Update for Wordpress 2.8 with change in settings panel.
 
 
 
 
 
 
 
 
 
 
3
  Donate link: http://chetangole.com/blog/wp-copyprotect/#donate
4
  Tags: post, posts, copy, protect, right, click, disable, copyprotect, Google, SEO, page, plugin, access, content, javascript, security, wp-copyprotect, RSS, fetcher, duplicate, Bing,
5
  Requires at least: 2
6
+ Tested up to: 4.2
7
+ Stable tag: 3.0.0
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Protect your blog content from getting copied. A simple plug-in developed to stop the Copy cats
12
 
14
 
15
  Protect your blog content from getting copied. A simple plug-in developed to stop the Copy cats
16
 
17
+ = Features =
18
+ * **Disable selection of text** - Now those n00bs can not copy your content easily.
19
+ * **Disable right click on your blog** - Disable right click with popup message or without popup message.
20
+ * **No side-effect on SEO** - Search engines can read your content without any problem.
21
+ * **User specific setting** - Apply above settings to all users or specific category of users like Admin.
 
22
 
23
  = Please note =
24
  * Both *disable right click* and *disable selection of text* can be switch ON or OFF through *Settings* menu.
25
  * *You must enable the options* from WP-CopyProtect settings page after installing the plugin, to enable the protection to your blog.
 
 
26
 
27
+ Why don't you rate the plugin if you like it !! :) >>
28
 
29
  By [Chetan Gole](http://chetangole.com/).
30
 
32
 
33
  1. Upload `wp-copyprotect.php` to the `/wp-content/plugins/` directory
34
  2. Activate the plugin through the 'Plugins' menu in WordPress
35
+ 3. Go to **Dashboard** and then **WP Copy Protect** to configure and enable.
36
 
37
  == Frequently Asked Questions ==
38
 
44
  The "disable Content selection" will start working.
45
 
46
  = WP Copyprotect is bad for the SEO? =
47
+
48
+ No, This plug-in is developed in PHP and javascript, for this reason the plug-in does not affect search engines, it only affects the user's browser that tries to copy your content. Search engines can read the content of your blog.
49
 
50
  = I have problems and questions =
51
 
54
  == Screenshots ==
55
  1. Configuration page
56
 
57
+ == Changelog ==
58
+ = ver : 3.0.0 =
59
+ 1. Added user specific setting, now you can disable WP Copy Protect for admin/logged-in users.
60
+ 2. Moved menu to top level.
61
+ = ver : 2.2.0 =
62
+ 1. Compatibility tag added for WP 3+
63
+ = ver : 2.1.0 =
64
+ 1. Footer link is now optional.
65
+ = ver : 2.0.0 =
66
+ 1. New option added for disabling right click without popup message, UI changes.
67
+ = ver : 1.9.1 =
68
+ .1 Compatibility tag added for Wp 2.9 .
69
+ = ver : 1.9.0 =
70
+ 1. VALID XHTML (Validation errors removed).
71
+ = ver : 1.8.0 =
72
+ 1. Update for Wordpress 2.8 with change in settings panel.
screenshot-1.jpeg DELETED
Binary file
screenshot-1.png ADDED
Binary file
wp-copyprotect.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: WP-CopyProtect [Protect your blog posts]
4
  Plugin URI: http://chetangole.com/blog/wp-copyprotect/
5
  Description: This plug-in will protect your blog content [posts] from being copied. A simple plug-in developed to stop the Copy cats.
6
- Version: 2.1.0
7
  Author: Chetan Gole
8
  Author URI: http://chetangole.com/
9
  */
10
 
11
  /*
12
- Copyright (C) 2010 Chetan Gole - chetangole.com
13
 
14
  This program is free software; you can redistribute it and/or
15
  modify it under the terms of the GNU General Public License
@@ -32,9 +32,9 @@ function CopyProtect_no_right_click($CopyProtect_click_message)
32
  ?>
33
  <script type="text/javascript">
34
  <!--
35
- /*****************************************************************
36
- *** COPY PROTECTED BY CHETANGOLE.COM/BLOG/WP-COPYPROTECT ****
37
- ******************************************************************/
38
  var message="<?php echo $CopyProtect_click_message; ?>";
39
  function clickIE4(){
40
  if (event.button==2){
@@ -71,9 +71,9 @@ function CopyProtect_no_right_click_without_message()
71
  ?>
72
  <script type="text/javascript">
73
  <!--
74
- /*****************************************************************
75
- *** COPY PROTECTED BY CHETANGOLE.COM/BLOG/WP-COPYPROTECT ****
76
- ******************************************************************/
77
  function clickIE4(){
78
  if (event.button==2){
79
  return false;
@@ -106,7 +106,9 @@ function CopyProtect_no_select()
106
  {
107
  ?>
108
  <script type="text/javascript">
109
-
 
 
110
  function disableSelection(target){
111
  if (typeof target.onselectstart!="undefined") //For IE
112
  target.onselectstart=function(){return false}
@@ -134,26 +136,27 @@ function CopyProtectCredit()
134
  <small>Copy Protected by <a href="http://chetangole.com/" target="_blank">Chetan</a>s <a href="http://chetangole.com/blog/wp-copyprotect/" target="_blank">WP-Copyprotect</a>.</small>
135
  <?php
136
  }
137
- // Tuning your WP-CopyProtect
138
  function CopyProtect_options_page()
139
  {
140
  ?>
141
- <div class="wrap">
142
- <h1>WP-CopyProtect <font size="2">ver 2.0.0</font></h1>
143
- | <a href="http://chetangole.com/blog/wp-copyprotect/" target="_blank" title="Visit homepage of wordpress plugin WP-CopyProtect">Visit Plugin page</a> | <a href="http://chetangole.com/blog/wp-copyprotect/#donate" target="_blank" title="Donate some amount to WP-CopyProtect plugin developer to help him to develope more such plugins">Donate</a> | <a href="http://chetangole.com/blog/wp-copyprotect/#donors" target="_blank" title="Few power donors,special thanks to them">Power Donors</a> |
144
- <h3>- settings page -</h3>
145
  <?php
146
  if($_POST['CopyProtect_save']){
147
  update_option('CopyProtect_nrc',$_POST['CopyProtect_nrc']);
148
  update_option('CopyProtect_nts',$_POST['CopyProtect_nts']);
149
  update_option('CopyProtect_nrc_text',$_POST['CopyProtect_nrc_text']);
150
  update_option('CopyProtect_credit',$_POST['CopyProtect_credit']);
 
151
 
152
  echo '<div class="updated"><p>Settings saved</p></div>';
153
  }
154
  $wp_CopyProtect_nrc = get_option('CopyProtect_nrc');
155
  $wp_CopyProtect_nts = get_option('CopyProtect_nts');
156
  $wp_CopyProtect_credit = get_option('CopyProtect_credit');
 
157
  ?>
158
  <form method="post" id="CopyProtect_options">
159
  <fieldset class="options">
@@ -164,7 +167,7 @@ function CopyProtect_options_page()
164
  <input type="radio" name="CopyProtect_nrc" value="0" <?php if($wp_CopyProtect_nrc == 0) echo('checked'); ?> />
165
  Do not disable right click.<br />
166
  <input type="radio" name="CopyProtect_nrc" value="1" <?php if($wp_CopyProtect_nrc == 1) echo('checked'); ?> />
167
- Disable right click, no message.<br />
168
  <input type="radio" name="CopyProtect_nrc" value="2" <?php if($wp_CopyProtect_nrc == 2) echo('checked'); ?> />
169
  Disable right click and show message :
170
  <input name="CopyProtect_nrc_text" type="text" id="CopyProtect_nrc_text" value="<?php echo get_option('CopyProtect_nrc_text') ;?>" size="30"/>
@@ -174,7 +177,7 @@ function CopyProtect_options_page()
174
  <th width="33%" scope="row">Disable text selection:</th>
175
  <td>
176
  <input type="checkbox" id="CopyProtect_nts" name="CopyProtect_nts" value="CopyProtect_nts" <?php if($wp_CopyProtect_nts == true) { echo('checked="checked"'); } ?> />
177
- Activate. <a href="http://www.thechetan.com/wp-copyprotect/#kp" target="_blank">Not working ?</a>
178
  </td>
179
  </tr>
180
  <tr valign="top">
@@ -183,7 +186,18 @@ function CopyProtect_options_page()
183
  <input type="checkbox" id="CopyProtect_credit" name="CopyProtect_credit" value="CopyProtect_credit" <?php if($wp_CopyProtect_credit == true) { echo('checked="checked"'); } ?> />
184
  Activate.
185
  </td>
186
- </tr>
 
 
 
 
 
 
 
 
 
 
 
187
  <tr>
188
  <th width="33%" scope="row">Save settings :</th>
189
  <td>
@@ -194,15 +208,14 @@ function CopyProtect_options_page()
194
  <th scope="row" style="text-align:right; vertical-align:top;">
195
  <td>
196
  <h3>Whats next ?</h3>
197
- <p>Why don't you <a href="/wp-admin/post-new.php">write a post</a> about <a href="http://chetangole.com/blog/wp-copyprotect/" target="_blank">WP-CopyProtect</a> ?</p>
198
  <h3>Problems, Questions, Suggestions ?</h3>
199
- <p>Send me mail via: <a href="http://chetangole.com/blog/wp-copyprotect/" target="_blank">WP-CopyProtect Homepage</a></p>
 
 
200
  </td>
201
  </tr>
202
  </table>
203
- <h3>Thank you</h3>
204
- Plug in developed by <a href="http://chetangole.com/blog/" target="_blank">Chetan Gole</a>. <br />
205
- <small>Follow me on Twitter <a href="http://twitter.com/_techie" target="_blank">@_techie</a></small>
206
  </fieldset>
207
  </form>
208
  </table>
@@ -219,20 +232,37 @@ function CopyProtect()
219
  $wp_CopyProtect_credit = get_option('CopyProtect_credit');
220
  $pos = strpos(strtolower(getenv("REQUEST_URI")), '?preview=true');
221
 
222
- if ($pos === false) {
223
  if($wp_CopyProtect_nrc == 1) { CopyProtect_no_right_click_without_message(); }
224
  if($wp_CopyProtect_nrc == 2) { CopyProtect_no_right_click($wp_CopyProtect_nrc_text); }
225
  if($wp_CopyProtect_nts == true) { CopyProtect_no_select(); }
226
  }
227
  }
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  function CopyProtect_footer()
230
  {
231
  $wp_CopyProtect_nts = get_option('CopyProtect_nts');
232
  $wp_CopyProtect_credit = get_option('CopyProtect_credit');
233
 
234
- if($wp_CopyProtect_nts == true) { CopyProtect_no_select_footer(); }
235
- if($wp_CopyProtect_credit == true) { CopyProtectCredit(); }
 
 
236
  }
237
 
238
  function CopyProtect_adminmenu()
@@ -245,5 +275,11 @@ function CopyProtect_adminmenu()
245
  //Commanding the Wordpress
246
  add_action('wp_head','CopyProtect');
247
  add_action('wp_footer','CopyProtect_footer');
248
- add_action('admin_menu','CopyProtect_adminmenu',1);
 
 
 
 
 
 
249
  ?>
3
  Plugin Name: WP-CopyProtect [Protect your blog posts]
4
  Plugin URI: http://chetangole.com/blog/wp-copyprotect/
5
  Description: This plug-in will protect your blog content [posts] from being copied. A simple plug-in developed to stop the Copy cats.
6
+ Version: 3.0.0
7
  Author: Chetan Gole
8
  Author URI: http://chetangole.com/
9
  */
10
 
11
  /*
12
+ Copyright (C) 2012 Chetan Gole - chetangole.com
13
 
14
  This program is free software; you can redistribute it and/or
15
  modify it under the terms of the GNU General Public License
32
  ?>
33
  <script type="text/javascript">
34
  <!--
35
+ /******************************************************************************
36
+ *** COPY PROTECTED BY CHETANGOLE.COM/BLOG/WP-COPYPROTECT version 3.0.0 ****
37
+ ******************************************************************************/
38
  var message="<?php echo $CopyProtect_click_message; ?>";
39
  function clickIE4(){
40
  if (event.button==2){
71
  ?>
72
  <script type="text/javascript">
73
  <!--
74
+ /******************************************************************************
75
+ *** COPY PROTECTED BY CHETANGOLE.COM/BLOG/WP-COPYPROTECT version 3.0.0 ****
76
+ ******************************************************************************/
77
  function clickIE4(){
78
  if (event.button==2){
79
  return false;
106
  {
107
  ?>
108
  <script type="text/javascript">
109
+ /******************************************************************************
110
+ *** COPY PROTECTED BY CHETANGOLE.COM/BLOG/WP-COPYPROTECT version 3.0.0 ****
111
+ ******************************************************************************/
112
  function disableSelection(target){
113
  if (typeof target.onselectstart!="undefined") //For IE
114
  target.onselectstart=function(){return false}
136
  <small>Copy Protected by <a href="http://chetangole.com/" target="_blank">Chetan</a>s <a href="http://chetangole.com/blog/wp-copyprotect/" target="_blank">WP-Copyprotect</a>.</small>
137
  <?php
138
  }
139
+ // Tuning your WP-CopyProtect - The settings page
140
  function CopyProtect_options_page()
141
  {
142
  ?>
143
+ <div class="wrap"><br/>
144
+ <h1>WP Copy Protect <font size="2">v3.0.0</font></h1>
145
+ | <a href="http://chetangole.com/blog/wp-copyprotect/" target="_blank" title="Visit homepage of wordpress plugin WP-CopyProtect"> Visit Plugin page </a> | <a href="http://chetangole.com/blog/wp-copyprotect/#donate" target="_blank" title="Donate some amount to WP-CopyProtect plugin developer to help him to develop more such plugins"> Donate </a> | <a href="http://chetangole.com/blog/wp-copyprotect/#donors" target="_blank" title="Few power donors,special thanks to them"> Power Donors </a> | <br/><br/>
 
146
  <?php
147
  if($_POST['CopyProtect_save']){
148
  update_option('CopyProtect_nrc',$_POST['CopyProtect_nrc']);
149
  update_option('CopyProtect_nts',$_POST['CopyProtect_nts']);
150
  update_option('CopyProtect_nrc_text',$_POST['CopyProtect_nrc_text']);
151
  update_option('CopyProtect_credit',$_POST['CopyProtect_credit']);
152
+ update_option('CopyProtect_user_setting',$_POST['CopyProtect_user_setting']);
153
 
154
  echo '<div class="updated"><p>Settings saved</p></div>';
155
  }
156
  $wp_CopyProtect_nrc = get_option('CopyProtect_nrc');
157
  $wp_CopyProtect_nts = get_option('CopyProtect_nts');
158
  $wp_CopyProtect_credit = get_option('CopyProtect_credit');
159
+ $wp_CopyProtect_user_setting = get_option('CopyProtect_user_setting');
160
  ?>
161
  <form method="post" id="CopyProtect_options">
162
  <fieldset class="options">
167
  <input type="radio" name="CopyProtect_nrc" value="0" <?php if($wp_CopyProtect_nrc == 0) echo('checked'); ?> />
168
  Do not disable right click.<br />
169
  <input type="radio" name="CopyProtect_nrc" value="1" <?php if($wp_CopyProtect_nrc == 1) echo('checked'); ?> />
170
+ Disable right click and do no show any message.<br />
171
  <input type="radio" name="CopyProtect_nrc" value="2" <?php if($wp_CopyProtect_nrc == 2) echo('checked'); ?> />
172
  Disable right click and show message :
173
  <input name="CopyProtect_nrc_text" type="text" id="CopyProtect_nrc_text" value="<?php echo get_option('CopyProtect_nrc_text') ;?>" size="30"/>
177
  <th width="33%" scope="row">Disable text selection:</th>
178
  <td>
179
  <input type="checkbox" id="CopyProtect_nts" name="CopyProtect_nts" value="CopyProtect_nts" <?php if($wp_CopyProtect_nts == true) { echo('checked="checked"'); } ?> />
180
+ Activate. <a href="http://chetangole.com/blog/wp-copyprotect/#kp" target="_blank">Not working ?</a>
181
  </td>
182
  </tr>
183
  <tr valign="top">
186
  <input type="checkbox" id="CopyProtect_credit" name="CopyProtect_credit" value="CopyProtect_credit" <?php if($wp_CopyProtect_credit == true) { echo('checked="checked"'); } ?> />
187
  Activate.
188
  </td>
189
+ </tr>
190
+ <tr valign="top">
191
+ <th width="33%" scope="row">User Setting:</th>
192
+ <td>
193
+ <input type="radio" name="CopyProtect_user_setting" value="0" <?php if($wp_CopyProtect_user_setting == 0) echo('checked'); ?> />
194
+ Exclude admin users.<br />
195
+ <input type="radio" name="CopyProtect_user_setting" value="1" <?php if($wp_CopyProtect_user_setting == 1) echo('checked'); ?> />
196
+ Exclude all logged-in users.<br />
197
+ <input type="radio" name="CopyProtect_user_setting" value="2" <?php if($wp_CopyProtect_user_setting == 2) echo('checked'); ?> />
198
+ Apply settings to all users.
199
+ </td>
200
+ </tr>
201
  <tr>
202
  <th width="33%" scope="row">Save settings :</th>
203
  <td>
208
  <th scope="row" style="text-align:right; vertical-align:top;">
209
  <td>
210
  <h3>Whats next ?</h3>
211
+ <p>Why dont you <a href="/wp-admin/post-new.php">write a post</a> about <a href="http://chetangole.com/blog/wp-copyprotect/" target="_blank">WP-CopyProtect</a> ?</p>
212
  <h3>Problems, Questions, Suggestions ?</h3>
213
+ <p>Send me an e-mail via: <a href="http://chetangole.com/blog/contact/" target="_blank">contact page</a></p>
214
+ <h3>Thank you</h3>
215
+ <p>Plug-in developed by <a href="http://chetangole.com/" target="_blank">Chetan Gole</a>.</p>
216
  </td>
217
  </tr>
218
  </table>
 
 
 
219
  </fieldset>
220
  </form>
221
  </table>
232
  $wp_CopyProtect_credit = get_option('CopyProtect_credit');
233
  $pos = strpos(strtolower(getenv("REQUEST_URI")), '?preview=true');
234
 
235
+ if ($pos === false && ToApplySettings()) {
236
  if($wp_CopyProtect_nrc == 1) { CopyProtect_no_right_click_without_message(); }
237
  if($wp_CopyProtect_nrc == 2) { CopyProtect_no_right_click($wp_CopyProtect_nrc_text); }
238
  if($wp_CopyProtect_nts == true) { CopyProtect_no_select(); }
239
  }
240
  }
241
 
242
+ function ToApplySettings(){
243
+ $wp_CopyProtect_user_setting = get_option('CopyProtect_user_setting');
244
+
245
+ if($wp_CopyProtect_user_setting == 0 && current_user_can('level_10'))
246
+ {
247
+ return false;
248
+ }else if ($wp_CopyProtect_user_setting == 1 && is_user_logged_in()) {
249
+ return false;
250
+ }else if ($wp_CopyProtect_user_setting == 2) {
251
+ return true;
252
+ }else{
253
+ return true;
254
+ }
255
+ }
256
+
257
  function CopyProtect_footer()
258
  {
259
  $wp_CopyProtect_nts = get_option('CopyProtect_nts');
260
  $wp_CopyProtect_credit = get_option('CopyProtect_credit');
261
 
262
+ if(ToApplySettings()){
263
+ if($wp_CopyProtect_nts == true) { CopyProtect_no_select_footer(); }
264
+ if($wp_CopyProtect_credit == true) { CopyProtectCredit(); }
265
+ }
266
  }
267
 
268
  function CopyProtect_adminmenu()
275
  //Commanding the Wordpress
276
  add_action('wp_head','CopyProtect');
277
  add_action('wp_footer','CopyProtect_footer');
278
+
279
+ add_action( 'admin_menu', 'register_wp_copyprotect_menu' );
280
+
281
+ function register_wp_copyprotect_menu(){
282
+ add_menu_page( 'WP Copy Protect', 'WP Copy Protect', 'manage_options', 'wpcopyprotect', 'CopyProtect_options_page', '', '2.5467' );
283
+ }
284
+
285
  ?>