WP-Ban - Version 1.11

Version Description

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-Ban
Version 1.11
Comparing to
See all releases

Code changes from version 1.10 to 1.11

Files changed (6) hide show
  1. ban/ban-preview.php +37 -0
  2. ban/ban.php +209 -28
  3. ban/wp-ban.mo +0 -0
  4. ban/wp-ban.pot +109 -39
  5. readme.html +54 -45
  6. readme.txt +4 -4
ban/ban-preview.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.1 Plugin: WP-Ban 1.11 |
6
+ | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
+ | |
8
+ | File Written By: |
9
+ | - Lester "GaMerZ" Chan |
10
+ | - http://www.lesterchan.net |
11
+ | |
12
+ | File Information: |
13
+ | - Banned Message Preview |
14
+ | - wp-content/plugins/ban/ban-preview.php |
15
+ | |
16
+ +----------------------------------------------------------------+
17
+ */
18
+
19
+
20
+ ### Require wp-config.php
21
+ require('../../../wp-config.php');
22
+
23
+
24
+ ### Display Banned Message
25
+ $banned_stats = get_option('banned_stats');
26
+ $banned_stats['count'] = (intval($banned_stats['count']));
27
+ $banned_stats['users'][get_IP()] = intval($banned_stats['users'][get_IP()]);
28
+ $banned_message = stripslashes(get_option('banned_message'));
29
+ $banned_message = str_replace("%SITE_NAME%", get_option('blogname'), $banned_message);
30
+ $banned_message = str_replace("%SITE_URL%", get_option('siteurl'), $banned_message);
31
+ $banned_message = str_replace("%USER_ATTEMPTS_COUNT%", $banned_stats['users'][get_IP()], $banned_message);
32
+ $banned_message = str_replace("%USER_IP%", get_IP(), $banned_message);
33
+ $banned_message = str_replace("%USER_HOSTNAME%", @gethostbyaddr(get_IP()), $banned_message);
34
+ $banned_message = str_replace("%TOTAL_ATTEMPTS_COUNT%", $banned_stats['count'], $banned_message);
35
+ echo $banned_message;
36
+ exit();
37
+ ?>
ban/ban.php CHANGED
@@ -2,9 +2,9 @@
2
  /*
3
  Plugin Name: WP-Ban
4
  Plugin URI: http://www.lesterchan.net/portfolio/programming.php
5
- Description: Ban users by IP or host name from visiting your WordPress's blog. It will display a custom ban message when the banned IP/host name trys to visit you blog. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
6
- Version: 1.10
7
- Author: GaMerZ
8
  Author URI: http://www.lesterchan.net
9
  */
10
 
@@ -58,25 +58,33 @@ if(!function_exists('get_IP')) {
58
  }
59
 
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  ### Function: Process Banning
62
  function process_ban($banarray, $against) {
63
- if(!empty($banarray)) {
64
  foreach($banarray as $cban) {
65
  $regexp = str_replace ('.', '\\.', $cban);
66
  $regexp = str_replace ('*', '.+', $regexp);
67
  if(ereg("^$regexp$", $against)) {
68
- $banned_message = stripslashes(get_option('banned_message'));
69
- $banned_message = str_replace("%SITE_NAME%", get_option('blogname'), $banned_message);
70
- $banned_message = str_replace("%SITE_URL%", get_option('siteurl'), $banned_message);
71
- $banned_message = str_replace("%USER_IP%", get_IP(), $banned_message);
72
- $banned_message = str_replace("%USER_HOSTNAME%", gethostbyaddr(get_IP()), $banned_message);
73
- echo $banned_message;
74
- // Credits To Joe (Ttech) - http://blog.fileville.net/
75
- $banned_stats = get_option('banned_stats');
76
- $banned_stats['count'] = (intval($banned_stats['count'])+1);
77
- $banned_stats['users'][get_IP()] = intval($banned_stats['users'][get_IP()]+1);
78
- update_option('banned_stats', $banned_stats);
79
- exit();
80
  }
81
  }
82
  }
@@ -84,13 +92,45 @@ function process_ban($banarray, $against) {
84
  }
85
 
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  ### Function: Banned
88
  add_action('init', 'banned');
89
  function banned() {
90
  $banned_ips = get_option('banned_ips');
 
91
  $banned_hosts = get_option('banned_hosts');
92
- process_ban($banned_ips, get_IP());
93
- process_ban($banned_hosts, gethostbyaddr(get_IP()));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
 
96
 
@@ -124,7 +164,10 @@ function ban_options() {
124
  $update_ban_queries = array();
125
  $update_ban_text = array();
126
  $banned_ips_post = explode("\n", trim($_POST['banned_ips']));
 
127
  $banned_hosts_post = explode("\n", trim($_POST['banned_hosts']));
 
 
128
  $banned_message = trim($_POST['banned_template_message']);
129
  if(!empty($banned_ips_post)) {
130
  $banned_ips = array();
@@ -136,21 +179,56 @@ function ban_options() {
136
  }
137
  }
138
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  if(!empty($banned_hosts_post)) {
140
  $banned_hosts = array();
141
  foreach($banned_hosts_post as $banned_host) {
142
- if($admin_login == 'admin' && ($banned_host == gethostbyaddr(get_IP()) || is_admin_hostname($banned_host))) {
143
- $text .= '<font color="blue">'.sprintf(__('This Hostname \'%s\' Belongs To The Admin Will Not Be Added To Ban List', 'wp-ban'), $banned_host).'</font><br />';
144
  } else {
145
  $banned_hosts[] = trim($banned_host);
146
  }
147
  }
148
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  $update_ban_queries[] = update_option('banned_ips', $banned_ips);
 
150
  $update_ban_queries[] = update_option('banned_hosts', $banned_hosts);
 
 
151
  $update_ban_queries[] = update_option('banned_message', $banned_message);
152
  $update_ban_text[] = __('Banned IPs', 'wp-ban');
 
153
  $update_ban_text[] = __('Banned Host Names', 'wp-ban');
 
 
154
  $update_ban_text[] = __('Banned Message', 'wp-ban');
155
  $i=0;
156
  foreach($update_ban_queries as $update_ban_query) {
@@ -165,21 +243,45 @@ function ban_options() {
165
  }
166
  // Get Banned IPs/Hosts
167
  $banned_ips = get_option('banned_ips');
 
168
  $banned_hosts = get_option('banned_hosts');
 
 
169
  $banned_ips_display = '';
 
170
  $banned_hosts_display = '';
 
 
171
  if(!empty($banned_ips)) {
172
  foreach($banned_ips as $banned_ip) {
173
  $banned_ips_display .= $banned_ip."\n";
174
  }
175
  }
 
 
 
 
 
176
  if(!empty($banned_hosts)) {
177
  foreach($banned_hosts as $banned_host) {
178
  $banned_hosts_display .= $banned_host."\n";
179
  }
180
  }
 
 
 
 
 
 
 
 
 
 
181
  $banned_ips_display = trim($banned_ips_display);
 
182
  $banned_hosts_display = trim($banned_hosts_display);
 
 
183
  // Get Banned Stats
184
  $banned_stats = get_option('banned_stats');
185
  ?>
@@ -210,6 +312,9 @@ function ban_options() {
210
  checked--;
211
  }
212
  }
 
 
 
213
  /* ]]> */
214
  </script>
215
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
@@ -220,7 +325,7 @@ function ban_options() {
220
  <table width="100%" cellspacing="3" cellpadding="3" border="0">
221
  <tr>
222
  <td valign="top" colspan="2" align="center">
223
- <?php printf(__('Your IP is: <strong>%s</strong><br />Your Host Name is: <strong>%s</strong>', 'wp-ban'), get_IP(), gethostbyaddr(get_IP())); ?><br />
224
  <?php _e('Please <strong>DO NOT</strong> ban yourself.', 'wp-ban'); ?>
225
  </td>
226
  </tr>
@@ -238,6 +343,19 @@ function ban_options() {
238
  <textarea cols="40" rows="10" name="banned_ips"><?php echo $banned_ips_display; ?></textarea>
239
  </td>
240
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  <tr>
242
  <td valign="top">
243
  <strong><?php _e('Banned Host Names', 'wp-ban'); ?>:</strong><br />
@@ -252,15 +370,46 @@ function ban_options() {
252
  <textarea cols="40" rows="10" name="banned_hosts"><?php echo $banned_hosts_display; ?></textarea>
253
  </td>
254
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  <tr>
256
  <td valign="top">
257
  <strong><?php _e('Banned Message', 'wp-ban'); ?>:</strong><br /><br /><br />
258
  <?php _e('Allowed Variables:', 'wp-ban'); ?><br />
259
  - %SITE_NAME%<br />
260
  - %SITE_URL%<br />
 
261
  - %USER_IP%<br />
262
- - %USER_HOSTNAME%<br /><br />
263
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-ban'); ?>" onclick="javascript: banned_default_templates('message');" class="button" />
 
 
264
  </td>
265
  <td>
266
  <textarea cols="60" rows="20" id="banned_template_message" name="banned_template_message"><?php echo stripslashes(get_option('banned_message')); ?></textarea>
@@ -277,9 +426,9 @@ function ban_options() {
277
  <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
278
  <table width="100%" cellspacing="3" cellpadding="3" border="0">
279
  <tr class="thead">
280
- <th width="40%">IPs</th>
281
- <th width="30%">Attempts</th>
282
- <th width="30%"><input type="checkbox" name="toogle_checkbox" value="1" onclick="toggle_checkbox();" />&nbsp; Action</th>
283
  </tr>
284
  <?php
285
  // Credits To Joe (Ttech) - http://blog.fileville.net/
@@ -329,9 +478,21 @@ function is_admin_ip($check) {
329
  }
330
 
331
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  ### Function: Check Whether Or Not The Hostname Belongs To Admin
333
  function is_admin_hostname($check) {
334
- $admin_hostname = gethostbyaddr(get_IP());
335
  $regexp = str_replace ('.', '\\.', $check);
336
  $regexp = str_replace ('*', '.+', $regexp);
337
  if(ereg("^$regexp$", $admin_hostname)) {
@@ -340,13 +501,29 @@ function is_admin_hostname($check) {
340
  return false;
341
  }
342
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
 
344
  ### Function: Create Ban Options
345
  add_action('activate_ban/ban.php', 'ban_init');
346
  function ban_init() {
347
  global $wpdb;
348
  $banned_ips = array();
 
349
  $banned_hosts = array();
 
 
350
  $banned_stats = array('users' => array(), 'count' => 0);
351
  add_option('banned_ips', $banned_ips, 'Banned IPs');
352
  add_option('banned_hosts', $banned_hosts, 'Banned Hosts');
@@ -360,6 +537,10 @@ function ban_init() {
360
  '<body>'."\n".
361
  '<p style="text-align: center; font-weight: bold;">'.__('You Are Banned.', 'wp-ban').'</p>'."\n".
362
  '</body>'."\n".
363
- '</html>', 'Banned Message');
 
 
 
 
364
  }
365
  ?>
2
  /*
3
  Plugin Name: WP-Ban
4
  Plugin URI: http://www.lesterchan.net/portfolio/programming.php
5
+ Description: Ban users by IP, IP Range, host name and referer url from visiting your WordPress's blog. It will display a custom ban message when the banned IP, IP range, host name or referer url trys to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
6
+ Version: 1.11
7
+ Author: Lester 'GaMerZ' Chan
8
  Author URI: http://www.lesterchan.net
9
  */
10
 
58
  }
59
 
60
 
61
+ ### Function: Print Out Banned Message
62
+ function print_banned_message() {
63
+ // Credits To Joe (Ttech) - http://blog.fileville.net/
64
+ $banned_stats = get_option('banned_stats');
65
+ $banned_stats['count'] = (intval($banned_stats['count'])+1);
66
+ $banned_stats['users'][get_IP()] = intval($banned_stats['users'][get_IP()]+1);
67
+ update_option('banned_stats', $banned_stats);
68
+ $banned_message = stripslashes(get_option('banned_message'));
69
+ $banned_message = str_replace("%SITE_NAME%", get_option('blogname'), $banned_message);
70
+ $banned_message = str_replace("%SITE_URL%", get_option('siteurl'), $banned_message);
71
+ $banned_message = str_replace("%USER_ATTEMPTS_COUNT%", $banned_stats['users'][get_IP()], $banned_message);
72
+ $banned_message = str_replace("%USER_IP%", get_IP(), $banned_message);
73
+ $banned_message = str_replace("%USER_HOSTNAME%", @gethostbyaddr(get_IP()), $banned_message);
74
+ $banned_message = str_replace("%TOTAL_ATTEMPTS_COUNT%", $banned_stats['count'], $banned_message);
75
+ echo $banned_message;
76
+ exit();
77
+ }
78
+
79
+
80
  ### Function: Process Banning
81
  function process_ban($banarray, $against) {
82
+ if(!empty($banarray) && !empty($against)) {
83
  foreach($banarray as $cban) {
84
  $regexp = str_replace ('.', '\\.', $cban);
85
  $regexp = str_replace ('*', '.+', $regexp);
86
  if(ereg("^$regexp$", $against)) {
87
+ print_banned_message();
 
 
 
 
 
 
 
 
 
 
 
88
  }
89
  }
90
  }
92
  }
93
 
94
 
95
+ ### Function: Process Banned IP Range
96
+ function process_ban_ip_range($banned_ips_range) {
97
+ if(!empty($banned_ips_range)) {
98
+ foreach($banned_ips_range as $banned_ip_range) {
99
+ $range = explode('-', $banned_ip_range);
100
+ $range_start = trim($range[0]);
101
+ $range_end = trim($range[1]);
102
+ if(check_ip_within_range(get_IP(), $range_start, $range_end)) {
103
+ print_banned_message();
104
+ break;
105
+ }
106
+ }
107
+ }
108
+ }
109
+
110
+
111
  ### Function: Banned
112
  add_action('init', 'banned');
113
  function banned() {
114
  $banned_ips = get_option('banned_ips');
115
+ $banned_ips_range = get_option('banned_ips_range');
116
  $banned_hosts = get_option('banned_hosts');
117
+ $banned_referers = get_option('banned_referers');
118
+ $banned_exclude_ips = get_option('banned_exclude_ips');
119
+ $is_excluded = false;
120
+ if(!empty($banned_exclude_ips)) {
121
+ foreach($banned_exclude_ips as $banned_exclude_ip) {
122
+ if(get_IP() == $banned_exclude_ip) {
123
+ $is_excluded = true;
124
+ break;
125
+ }
126
+ }
127
+ }
128
+ if(!$is_excluded) {
129
+ process_ban($banned_ips, get_IP());
130
+ process_ban_ip_range($banned_ips_range);
131
+ process_ban($banned_hosts, @gethostbyaddr(get_IP()));
132
+ process_ban($banned_referers, $_SERVER['HTTP_REFERER']);
133
+ }
134
  }
135
 
136
 
164
  $update_ban_queries = array();
165
  $update_ban_text = array();
166
  $banned_ips_post = explode("\n", trim($_POST['banned_ips']));
167
+ $banned_ips_range_post = explode("\n", trim($_POST['banned_ips_range']));
168
  $banned_hosts_post = explode("\n", trim($_POST['banned_hosts']));
169
+ $banned_referers_post = explode("\n", trim($_POST['banned_referers']));
170
+ $banned_exclude_ips_post = explode("\n", trim($_POST['banned_exclude_ips']));
171
  $banned_message = trim($_POST['banned_template_message']);
172
  if(!empty($banned_ips_post)) {
173
  $banned_ips = array();
179
  }
180
  }
181
  }
182
+ if(!empty($banned_ips_range_post)) {
183
+ $banned_ips_range = array();
184
+ foreach($banned_ips_range_post as $banned_ip_range) {
185
+ $range = explode('-', $banned_ip_range);
186
+ $range_start = trim($range[0]);
187
+ $range_end = trim($range[1]);
188
+ if($admin_login == 'admin' && (check_ip_within_range(get_IP(), $range_start, $range_end))) {
189
+ $text .= '<font color="blue">'.sprintf(__('The Admin\'s IP \'%s\' Fall Within This Range (%s - %s) And Will Not Be Added To Ban List', 'wp-ban'), get_IP(), $range_start, $range_end).'</font><br />';
190
+ } else {
191
+ $banned_ips_range[] = trim($banned_ip_range);
192
+ }
193
+ }
194
+ }
195
  if(!empty($banned_hosts_post)) {
196
  $banned_hosts = array();
197
  foreach($banned_hosts_post as $banned_host) {
198
+ if($admin_login == 'admin' && ($banned_host == @gethostbyaddr(get_IP()) || is_admin_hostname($banned_host))) {
199
+ $text .= '<font color="blue">'.sprintf(__('This Hostname \'%s\' Belongs To The Admin And Will Not Be Added To Ban List', 'wp-ban'), $banned_host).'</font><br />';
200
  } else {
201
  $banned_hosts[] = trim($banned_host);
202
  }
203
  }
204
  }
205
+ if(!empty($banned_referers_post)) {
206
+ $banned_referers = array();
207
+ foreach($banned_referers_post as $banned_referer) {
208
+ if(is_admin_referer($banned_referer)) {
209
+ $text .= '<font color="blue">'.sprintf(__('This Referer \'%s\' Belongs To This Site And Will Not Be Added To Ban List', 'wp-ban'), $banned_referer).'</font><br />';
210
+ } else {
211
+ $banned_referers[] = trim($banned_referer);
212
+ }
213
+ }
214
+ }
215
+ if(!empty($banned_exclude_ips_post)) {
216
+ $banned_exclude_ips = array();
217
+ foreach($banned_exclude_ips_post as $banned_exclude_ip) {
218
+ $banned_exclude_ips[] = trim($banned_exclude_ip);
219
+ }
220
+ }
221
  $update_ban_queries[] = update_option('banned_ips', $banned_ips);
222
+ $update_ban_queries[] = update_option('banned_ips_range', $banned_ips_range);
223
  $update_ban_queries[] = update_option('banned_hosts', $banned_hosts);
224
+ $update_ban_queries[] = update_option('banned_referers', $banned_referers);
225
+ $update_ban_queries[] = update_option('banned_exclude_ips', $banned_exclude_ips);
226
  $update_ban_queries[] = update_option('banned_message', $banned_message);
227
  $update_ban_text[] = __('Banned IPs', 'wp-ban');
228
+ $update_ban_text[] = __('Banned IP Range', 'wp-ban');
229
  $update_ban_text[] = __('Banned Host Names', 'wp-ban');
230
+ $update_ban_text[] = __('Banned Referers', 'wp-ban');
231
+ $update_ban_text[] = __('Banned Excluded IPs', 'wp-ban');
232
  $update_ban_text[] = __('Banned Message', 'wp-ban');
233
  $i=0;
234
  foreach($update_ban_queries as $update_ban_query) {
243
  }
244
  // Get Banned IPs/Hosts
245
  $banned_ips = get_option('banned_ips');
246
+ $banned_ips_range = get_option('banned_ips_range');
247
  $banned_hosts = get_option('banned_hosts');
248
+ $banned_referers = get_option('banned_referers');
249
+ $banned_exclude_ips = get_option('banned_exclude_ips');
250
  $banned_ips_display = '';
251
+ $banned_ips_range_display = '';
252
  $banned_hosts_display = '';
253
+ $banned_referers_display = '';
254
+ $banned_exclude_ips_display = '';
255
  if(!empty($banned_ips)) {
256
  foreach($banned_ips as $banned_ip) {
257
  $banned_ips_display .= $banned_ip."\n";
258
  }
259
  }
260
+ if(!empty($banned_ips_range)) {
261
+ foreach($banned_ips_range as $banned_ip_range) {
262
+ $banned_ips_range_display .= $banned_ip_range."\n";
263
+ }
264
+ }
265
  if(!empty($banned_hosts)) {
266
  foreach($banned_hosts as $banned_host) {
267
  $banned_hosts_display .= $banned_host."\n";
268
  }
269
  }
270
+ if(!empty($banned_referers)) {
271
+ foreach($banned_referers as $banned_referer) {
272
+ $banned_referers_display .= $banned_referer."\n";
273
+ }
274
+ }
275
+ if(!empty($banned_exclude_ips)) {
276
+ foreach($banned_exclude_ips as $banned_exclude_ip) {
277
+ $banned_exclude_ips_display .= $banned_exclude_ip."\n";
278
+ }
279
+ }
280
  $banned_ips_display = trim($banned_ips_display);
281
+ $banned_ips_range_display = trim($banned_ips_range_display);
282
  $banned_hosts_display = trim($banned_hosts_display);
283
+ $banned_referers_display = trim($banned_referers_display);
284
+ $banned_exclude_ips_display = trim($banned_exclude_ips_display);
285
  // Get Banned Stats
286
  $banned_stats = get_option('banned_stats');
287
  ?>
312
  checked--;
313
  }
314
  }
315
+ function preview_bannedmessage() {
316
+ window.open('<?php echo get_option('siteurl').'/wp-content/plugins/ban/ban-preview.php'; ?>');
317
+ }
318
  /* ]]> */
319
  </script>
320
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
325
  <table width="100%" cellspacing="3" cellpadding="3" border="0">
326
  <tr>
327
  <td valign="top" colspan="2" align="center">
328
+ <?php printf(__('Your IP is: <strong>%s</strong><br />Your Host Name is: <strong>%s</strong><br />Your Site URL is: <strong>%s</strong>', 'wp-ban'), get_IP(), @gethostbyaddr(get_IP()), get_option('siteurl')); ?><br />
329
  <?php _e('Please <strong>DO NOT</strong> ban yourself.', 'wp-ban'); ?>
330
  </td>
331
  </tr>
343
  <textarea cols="40" rows="10" name="banned_ips"><?php echo $banned_ips_display; ?></textarea>
344
  </td>
345
  </tr>
346
+ <tr>
347
+ <td valign="top">
348
+ <strong><?php _e('Banned IP Range', 'wp-ban'); ?>:</strong><br />
349
+ <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
350
+ <?php _e('Examples:', 'wp-ban'); ?><br />
351
+ <strong>&raquo;</strong> 192.168.1.1-192.168.1.255<br /><br />
352
+ <?php _e('Notes:', 'wp-ban'); ?><br />
353
+ <strong>&raquo;</strong> <?php _e('No Wildcards Allowed.', 'wp-ban'); ?><br />
354
+ </td>
355
+ <td>
356
+ <textarea cols="40" rows="10" name="banned_ips_range"><?php echo $banned_ips_range_display; ?></textarea>
357
+ </td>
358
+ </tr>
359
  <tr>
360
  <td valign="top">
361
  <strong><?php _e('Banned Host Names', 'wp-ban'); ?>:</strong><br />
370
  <textarea cols="40" rows="10" name="banned_hosts"><?php echo $banned_hosts_display; ?></textarea>
371
  </td>
372
  </tr>
373
+ <tr>
374
+ <td valign="top">
375
+ <strong><?php _e('Banned Referers', 'wp-ban'); ?>:</strong><br />
376
+ <?php _e('Use <strong>*</strong> for wildcards', 'wp-ban'); ?>.<br />
377
+ <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
378
+ <?php _e('Examples:', 'wp-ban'); ?><br />
379
+ <strong>&raquo;</strong> http://*.blogspot.com<br /><br />
380
+ <?php _e('Notes:', 'wp-ban'); ?><br />
381
+ <strong>&raquo;</strong> <?php _e('There are ways to bypass this method of banning.', 'wp-ban'); ?>
382
+ </td>
383
+ <td>
384
+ <textarea cols="40" rows="10" name="banned_referers"><?php echo $banned_referers_display; ?></textarea>
385
+ </td>
386
+ </tr>
387
+ <tr>
388
+ <td valign="top">
389
+ <strong><?php _e('Banned Exclude IPs', 'wp-ban'); ?>:</strong><br />
390
+ <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
391
+ <?php _e('Examples:', 'wp-ban'); ?><br />
392
+ <strong>&raquo;</strong> 192.168.1.100<br /><br />
393
+ <?php _e('Notes:', 'wp-ban'); ?><br />
394
+ <strong>&raquo;</strong> <?php _e('No Wildcards Allowed.', 'wp-ban'); ?><br />
395
+ <strong>&raquo;</strong> <?php _e('These Users Will Not Get Banned.', 'wp-ban'); ?>
396
+ </td>
397
+ <td>
398
+ <textarea cols="40" rows="10" name="banned_exclude_ips"><?php echo $banned_exclude_ips_display; ?></textarea>
399
+ </td>
400
+ </tr>
401
  <tr>
402
  <td valign="top">
403
  <strong><?php _e('Banned Message', 'wp-ban'); ?>:</strong><br /><br /><br />
404
  <?php _e('Allowed Variables:', 'wp-ban'); ?><br />
405
  - %SITE_NAME%<br />
406
  - %SITE_URL%<br />
407
+ - %USER_ATTEMPTS_COUNT%<br />
408
  - %USER_IP%<br />
409
+ - %USER_HOSTNAME%<br />
410
+ - %TOTAL_ATTEMPTS_COUNT%<br /><br />
411
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-ban'); ?>" onclick="javascript: banned_default_templates('message');" class="button" /><br /><br />
412
+ <input type="button" name="RestoreDefault" value="<?php _e('Preview Banned Message', 'wp-ban'); ?>" onclick="javascript: preview_bannedmessage();" class="button" /><br />
413
  </td>
414
  <td>
415
  <textarea cols="60" rows="20" id="banned_template_message" name="banned_template_message"><?php echo stripslashes(get_option('banned_message')); ?></textarea>
426
  <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
427
  <table width="100%" cellspacing="3" cellpadding="3" border="0">
428
  <tr class="thead">
429
+ <th width="40%"><?php _e('IPs', 'wp-ban'); ?></th>
430
+ <th width="30%"><?php _e('Attempts', 'wp-ban'); ?></th>
431
+ <th width="30%"><input type="checkbox" name="toogle_checkbox" value="1" onclick="toggle_checkbox();" />&nbsp; <?php _e('Action', 'wp-ban'); ?></th>
432
  </tr>
433
  <?php
434
  // Credits To Joe (Ttech) - http://blog.fileville.net/
478
  }
479
 
480
 
481
+ ### Function: Check Whether IP Within A Given IP Range
482
+ function check_ip_within_range($ip, $range_start, $range_end) {
483
+ $range_start = ip2long($range_start);
484
+ $range_end = ip2long($range_end);
485
+ $ip = ip2long($ip);
486
+ if($ip >= $range_start && $ip <= $range_end) {
487
+ return true;
488
+ }
489
+ return false;
490
+ }
491
+
492
+
493
  ### Function: Check Whether Or Not The Hostname Belongs To Admin
494
  function is_admin_hostname($check) {
495
+ $admin_hostname = @gethostbyaddr(get_IP());
496
  $regexp = str_replace ('.', '\\.', $check);
497
  $regexp = str_replace ('*', '.+', $regexp);
498
  if(ereg("^$regexp$", $admin_hostname)) {
501
  return false;
502
  }
503
 
504
+ ### Function: Check Whether Or Not The Referer Belongs To This Site
505
+ function is_admin_referer($check) {
506
+ $regexp = str_replace ('.', '\\.', $check);
507
+ $regexp = str_replace ('*', '.+', $regexp);
508
+ $url_patterns = array(get_option('siteurl'), get_option('home'), get_option('siteurl').'/', get_option('home').'/', get_option('siteurl').'/ ', get_option('home').'/ ', $_SERVER['HTTP_REFERER']);
509
+ foreach($url_patterns as $url) {
510
+ if(ereg("^$regexp$", $url)) {
511
+ return true;
512
+ }
513
+ }
514
+ return false;
515
+ }
516
+
517
 
518
  ### Function: Create Ban Options
519
  add_action('activate_ban/ban.php', 'ban_init');
520
  function ban_init() {
521
  global $wpdb;
522
  $banned_ips = array();
523
+ $banned_ips_range = array();
524
  $banned_hosts = array();
525
+ $banned_referers = array();
526
+ $banned_exclude_ips = array();
527
  $banned_stats = array('users' => array(), 'count' => 0);
528
  add_option('banned_ips', $banned_ips, 'Banned IPs');
529
  add_option('banned_hosts', $banned_hosts, 'Banned Hosts');
537
  '<body>'."\n".
538
  '<p style="text-align: center; font-weight: bold;">'.__('You Are Banned.', 'wp-ban').'</p>'."\n".
539
  '</body>'."\n".
540
+ '</html>', 'Banned Message');
541
+ // Database Upgrade For WP-Ban 1.11
542
+ add_option('banned_referers', $banned_referers, 'Banned Referers');
543
+ add_option('banned_exclude_ips', $banned_exclude_ips, 'Banned Exclude IP');
544
+ add_option('banned_ips_range', $banned_ips_range, 'Banned IP Range');
545
  }
546
  ?>
ban/wp-ban.mo ADDED
Binary file
ban/wp-ban.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WP-Ban 1.10\n"
4
  "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2007-01-27 14:55+0800\n"
6
  "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n"
7
  "Language-Team: Lester Chan <gamerz84@hotmail.com>\n"
8
  "MIME-Version: 1.0\n"
@@ -18,125 +18,195 @@ msgstr ""
18
  msgid "Ban"
19
  msgstr ""
20
 
21
- #: ban.php:105
22
- #: ban.php:313
23
  msgid "Reset Ban Stats"
24
  msgstr ""
25
 
26
- #: ban.php:109
27
  msgid "All IP Ban Stats And Total Ban Stat Reseted"
28
  msgstr ""
29
 
30
- #: ban.php:117
31
  msgid "Selected IP Ban Stats Reseted"
32
  msgstr ""
33
 
34
- #: ban.php:133
35
  #, php-format
36
  msgid "This IP '%s' Belongs To The Admin And Will Not Be Added To Ban List"
37
  msgstr ""
38
 
39
- #: ban.php:143
40
  #, php-format
41
- msgid "This Hostname '%s' Belongs To The Admin Will Not Be Added To Ban List"
42
  msgstr ""
43
 
44
- #: ban.php:152
45
- #: ban.php:229
 
 
 
 
 
 
 
 
 
 
46
  msgid "Banned IPs"
47
  msgstr ""
48
 
49
- #: ban.php:153
50
- #: ban.php:243
 
 
 
 
 
51
  msgid "Banned Host Names"
52
  msgstr ""
53
 
54
- #: ban.php:154
55
- #: ban.php:257
 
 
 
 
 
 
 
 
 
56
  msgid "Banned Message"
57
  msgstr ""
58
 
59
- #: ban.php:158
60
  msgid "Updated"
61
  msgstr ""
62
 
63
- #: ban.php:163
64
  msgid "No Ban Option Updated"
65
  msgstr ""
66
 
67
- #: ban.php:193
68
- #: ban.php:361
69
  msgid "You Are Banned."
70
  msgstr ""
71
 
72
- #: ban.php:218
73
  msgid "Ban Options"
74
  msgstr ""
75
 
76
- #: ban.php:223
77
  #, php-format
78
- msgid "Your IP is: <strong>%s</strong><br />Your Host Name is: <strong>%s</strong>"
79
  msgstr ""
80
 
81
- #: ban.php:224
82
  msgid "Please <strong>DO NOT</strong> ban yourself."
83
  msgstr ""
84
 
85
- #: ban.php:230
86
  msgid "Use <strong>*</strong> for wildcards."
87
  msgstr ""
88
 
89
- #: ban.php:231
90
- #: ban.php:245
 
 
 
91
  msgid "Start each entry on a new line."
92
  msgstr ""
93
 
94
- #: ban.php:232
95
- #: ban.php:246
 
 
 
96
  msgid "Examples:"
97
  msgstr ""
98
 
99
- #: ban.php:244
 
 
 
 
 
 
 
 
 
 
 
 
100
  msgid "Use <strong>*</strong> for wildcards"
101
  msgstr ""
102
 
103
- #: ban.php:258
 
 
 
 
 
 
 
 
 
 
 
 
104
  msgid "Allowed Variables:"
105
  msgstr ""
106
 
107
- #: ban.php:263
108
  msgid "Restore Default Template"
109
  msgstr ""
110
 
111
- #: ban.php:270
 
 
 
 
112
  msgid "Update Options"
113
  msgstr ""
114
 
115
- #: ban.php:270
116
  msgid "Cancel"
117
  msgstr ""
118
 
119
- #: ban.php:276
120
  msgid "Ban Stats"
121
  msgstr ""
122
 
123
- #: ban.php:303
 
 
 
 
 
 
 
 
 
 
 
 
124
  msgid "No Attempts"
125
  msgstr ""
126
 
127
- #: ban.php:308
128
  msgid "Total Attempts:"
129
  msgstr ""
130
 
131
- #: ban.php:310
132
  msgid "Reset all IP ban stats and total ban stat?"
133
  msgstr ""
134
 
135
- #: ban.php:313
136
  msgid "You Are About To Reset Ban Stats."
137
  msgstr ""
138
 
139
- #: ban.php:313
140
  msgid "This Action Is Not Reversible. Are you sure?"
141
  msgstr ""
142
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WP-Ban 1.11\n"
4
  "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2007-06-12 01:40+0800\n"
6
  "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n"
7
  "Language-Team: Lester Chan <gamerz84@hotmail.com>\n"
8
  "MIME-Version: 1.0\n"
18
  msgid "Ban"
19
  msgstr ""
20
 
21
+ #: ban.php:145
22
+ #: ban.php:462
23
  msgid "Reset Ban Stats"
24
  msgstr ""
25
 
26
+ #: ban.php:149
27
  msgid "All IP Ban Stats And Total Ban Stat Reseted"
28
  msgstr ""
29
 
30
+ #: ban.php:157
31
  msgid "Selected IP Ban Stats Reseted"
32
  msgstr ""
33
 
34
+ #: ban.php:176
35
  #, php-format
36
  msgid "This IP '%s' Belongs To The Admin And Will Not Be Added To Ban List"
37
  msgstr ""
38
 
39
+ #: ban.php:189
40
  #, php-format
41
+ msgid "The Admin's IP '%s' Fall Within This Range (%s - %s) And Will Not Be Added To Ban List"
42
  msgstr ""
43
 
44
+ #: ban.php:199
45
+ #, php-format
46
+ msgid "This Hostname '%s' Belongs To The Admin And Will Not Be Added To Ban List"
47
+ msgstr ""
48
+
49
+ #: ban.php:209
50
+ #, php-format
51
+ msgid "This Referer '%s' Belongs To This Site And Will Not Be Added To Ban List"
52
+ msgstr ""
53
+
54
+ #: ban.php:227
55
+ #: ban.php:334
56
  msgid "Banned IPs"
57
  msgstr ""
58
 
59
+ #: ban.php:228
60
+ #: ban.php:348
61
+ msgid "Banned IP Range"
62
+ msgstr ""
63
+
64
+ #: ban.php:229
65
+ #: ban.php:361
66
  msgid "Banned Host Names"
67
  msgstr ""
68
 
69
+ #: ban.php:230
70
+ #: ban.php:375
71
+ msgid "Banned Referers"
72
+ msgstr ""
73
+
74
+ #: ban.php:231
75
+ msgid "Banned Excluded IPs"
76
+ msgstr ""
77
+
78
+ #: ban.php:232
79
+ #: ban.php:403
80
  msgid "Banned Message"
81
  msgstr ""
82
 
83
+ #: ban.php:236
84
  msgid "Updated"
85
  msgstr ""
86
 
87
+ #: ban.php:241
88
  msgid "No Ban Option Updated"
89
  msgstr ""
90
 
91
+ #: ban.php:295
92
+ #: ban.php:538
93
  msgid "You Are Banned."
94
  msgstr ""
95
 
96
+ #: ban.php:323
97
  msgid "Ban Options"
98
  msgstr ""
99
 
100
+ #: ban.php:328
101
  #, php-format
102
+ msgid "Your IP is: <strong>%s</strong><br />Your Host Name is: <strong>%s</strong><br />Your Site URL is: <strong>%s</strong>"
103
  msgstr ""
104
 
105
+ #: ban.php:329
106
  msgid "Please <strong>DO NOT</strong> ban yourself."
107
  msgstr ""
108
 
109
+ #: ban.php:335
110
  msgid "Use <strong>*</strong> for wildcards."
111
  msgstr ""
112
 
113
+ #: ban.php:336
114
+ #: ban.php:349
115
+ #: ban.php:363
116
+ #: ban.php:377
117
+ #: ban.php:390
118
  msgid "Start each entry on a new line."
119
  msgstr ""
120
 
121
+ #: ban.php:337
122
+ #: ban.php:350
123
+ #: ban.php:364
124
+ #: ban.php:378
125
+ #: ban.php:391
126
  msgid "Examples:"
127
  msgstr ""
128
 
129
+ #: ban.php:352
130
+ #: ban.php:380
131
+ #: ban.php:393
132
+ msgid "Notes:"
133
+ msgstr ""
134
+
135
+ #: ban.php:353
136
+ #: ban.php:394
137
+ msgid "No Wildcards Allowed."
138
+ msgstr ""
139
+
140
+ #: ban.php:362
141
+ #: ban.php:376
142
  msgid "Use <strong>*</strong> for wildcards"
143
  msgstr ""
144
 
145
+ #: ban.php:381
146
+ msgid "There are ways to bypass this method of banning."
147
+ msgstr ""
148
+
149
+ #: ban.php:389
150
+ msgid "Banned Exclude IPs"
151
+ msgstr ""
152
+
153
+ #: ban.php:395
154
+ msgid "These Users Will Not Get Banned."
155
+ msgstr ""
156
+
157
+ #: ban.php:404
158
  msgid "Allowed Variables:"
159
  msgstr ""
160
 
161
+ #: ban.php:411
162
  msgid "Restore Default Template"
163
  msgstr ""
164
 
165
+ #: ban.php:412
166
+ msgid "Preview Banned Message"
167
+ msgstr ""
168
+
169
+ #: ban.php:419
170
  msgid "Update Options"
171
  msgstr ""
172
 
173
+ #: ban.php:419
174
  msgid "Cancel"
175
  msgstr ""
176
 
177
+ #: ban.php:425
178
  msgid "Ban Stats"
179
  msgstr ""
180
 
181
+ #: ban.php:429
182
+ msgid "IPs"
183
+ msgstr ""
184
+
185
+ #: ban.php:430
186
+ msgid "Attempts"
187
+ msgstr ""
188
+
189
+ #: ban.php:431
190
+ msgid "Action"
191
+ msgstr ""
192
+
193
+ #: ban.php:452
194
  msgid "No Attempts"
195
  msgstr ""
196
 
197
+ #: ban.php:457
198
  msgid "Total Attempts:"
199
  msgstr ""
200
 
201
+ #: ban.php:459
202
  msgid "Reset all IP ban stats and total ban stat?"
203
  msgstr ""
204
 
205
+ #: ban.php:462
206
  msgid "You Are About To Reset Ban Stats."
207
  msgstr ""
208
 
209
+ #: ban.php:462
210
  msgid "This Action Is Not Reversible. Are you sure?"
211
  msgstr ""
212
 
readme.html CHANGED
@@ -2,7 +2,7 @@
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
- <title>WP-Ban 1.10 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
@@ -203,7 +203,7 @@
203
  <body>
204
  <div id="Container">
205
  <!-- Title -->
206
- <div id="Title">WP-Ban 1.10&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
207
 
208
  <!-- Tabs -->
209
  <ul id="Tabs">
@@ -221,66 +221,66 @@
221
  <div class="SubTitle">&raquo; Index</div>
222
  <div class="SubSubTitle">Plugin Information</div>
223
  <p>
224
- <b>Author:</b><br />
225
- <b>&raquo;</b> Lester 'GaMerZ' Chan
226
  </p>
227
  <p>
228
- <b>EMail:</b><br />
229
- <b>&raquo;</b>
230
  <script type="text/javascript">
231
  /* <![CDATA[*/
232
- document.write(' <a href="mailto:gamerz84@hotmail.com?Subject=WP-Ban%201.10%20Support" title="EMail To gamerz84@hotmail.com">gamerz84@hotmail.com</a>');
233
  /* ]]> */
234
  </script>
235
  </p>
236
  <p>
237
- <b>Website:</b><br />
238
- <b>&raquo;</b> <a href="http://www.lesterchan.net/" title="http://www.lesterchan.net/">http://www.lesterchan.net/</a>
239
  </p>
240
  <p>
241
- <b>Features:</b><br />
242
- <b>&raquo;</b> Ban users by IP or host name from visiting your WordPress's blog. It will display a custom ban message when the banned IP/host name trys to visit you blog. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
243
  </p>
244
  <p>
245
- <b>Download:</b><br />
246
- <b>&raquo;</b> <a href="http://www.lesterchan.net/others/downloads.php?id=26" title="http://www.lesterchan.net/others/downloads.php?id=26">WP-Ban 1.10 For WordPress 2.1.x</a><br />
247
- <b>&raquo;</b> <a href="http://www.lesterchan.net/others/downloads/wp-ban100.zip" title="http://www.lesterchan.net/others/downloads/wp-ban100.zip">WP-Ban 1.00 For WordPress 2.0.x</a><br />
248
  </p>
249
  <p>
250
- <b>Demo:</b><br />
251
- <b>&raquo;</b> N/A</a>
252
  </p>
253
  <p>
254
- <b>Development:</b><br />
255
- <b>&raquo;</b> <a href="http://dev.wp-plugins.org/browser/wp-ban/" title="http://dev.wp-plugins.org/browser/wp-ban/">http://dev.wp-plugins.org/browser/wp-ban/</a>
256
  </p>
257
  <p>
258
- <b>Translations:</b><br />
259
- <b>&raquo;</b> <a href="http://dev.wp-plugins.org/browser/wp-ban/i18n/" title="http://dev.wp-plugins.org/browser/wp-ban/i18n/">http://dev.wp-plugins.org/browser/wp-ban/i18n/</a>
260
  </p>
261
  <p>
262
- <b>Support Forums:</b><br />
263
- <b>&raquo;</b> <a href="http://forums.lesterchan.net/index.php?board=10.0" title="http://forums.lesterchan.net/index.php?board=10.0">http://forums.lesterchan.net/index.php?board=10.0</a>
264
  </p>
265
  <p>
266
- <b>Credits:</b><br />
267
- <b>&raquo;</b> Ban Stats By <a href="http://blog.fileville.net/">Joe (Ttech)</a>
268
  </p>
269
  <p>
270
- <b>Updated:</b><br />
271
- <b>&raquo;</b> 1st February 2007
272
  </p>
273
  <p>
274
- <b>Note:</b><br />
275
- <b>&raquo;</b> The <b>Changelog</b>, <b>Installation</b>, <b>Upgrade</b>, <b>Usage</b> Tab at the top of the page.<br />
276
- <b>&raquo;</b> The ban tab has been moved to 'WP-Admin -> Manage'
277
  </p>
278
  <p>
279
- <b>Donations:</b><br />
280
- <b>&raquo;</b> I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is
281
  <script type="text/javascript">
282
  /* <![CDATA[*/
283
- document.write(' <b>gamerz84@hotmail.com</b>.');
284
  /* ]]> */
285
  </script>
286
  </p>
@@ -290,8 +290,17 @@
290
  <div id="Changelog" style="display: none;">
291
  <div class="SubTitle">&raquo; Changelog</div>
292
  <ul>
293
- <li>
294
- <b>Version 1.10 (01-02-2007)</b>
 
 
 
 
 
 
 
 
 
295
  <ul>
296
  <li>NEW: Works For WordPress 2.1 Only</li>
297
  <li>NEW: Move ban.php To ban Folder</li>
@@ -303,7 +312,7 @@
303
  </ul>
304
  </li>
305
  <li>
306
- <b>Version 1.00 (02-01-2007)</b>
307
  <ul>
308
  <li>NEW: Initial Release</li>
309
  </ul>
@@ -316,17 +325,17 @@
316
  <div class="SubTitle">&raquo; Installation Instructions</div>
317
  <ol>
318
  <li>
319
- Open <b>wp-content/plugins</b> Folder
320
  </li>
321
  <li>
322
  Put:
323
  <blockquote>Folder: ban</blockquote>
324
  </li>
325
  <li>
326
- <b>Activate</b> WP-Ban Plugin
327
  </li>
328
  <li>
329
- Refer To <b>Usage</b> For Further Instructions
330
  </li>
331
  </ol>
332
  </div>
@@ -334,13 +343,13 @@
334
  <!-- Upgrade Instructions -->
335
  <div id="Upgrade" style="display: none;">
336
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
337
- <div class="SubSubTitle">From v1.0x To v1.10</div>
338
  <ol>
339
  <li>
340
- <b>Deactivate</b> WP-Ban Plugin
341
  </li>
342
  <li>
343
- Open <b>wp-content/plugins</b> Folder
344
  </li>
345
  <li>
346
  Put/Overwrite:
@@ -351,10 +360,10 @@
351
  <blockquote>File: ban.php</blockquote>
352
  </li>
353
  <li>
354
- <b>Activate</b> WP-Ban Plugin
355
  </li>
356
  <li>
357
- Refer To <b>Usage</b> For Further Instructions
358
  </li>
359
  </ol>
360
  </div>
@@ -365,7 +374,7 @@
365
  <div class="SubSubTitle">General Usage</div>
366
  <ol>
367
  <li>
368
- Go to '<b>WP-Admin -> Manage -> Ban</b>'
369
  </li>
370
  <li>
371
  Configure your ban options
@@ -374,6 +383,6 @@
374
  </div>
375
  </div>
376
  </div>
377
- <p id="Copyright">WP-Ban 1.10<br />Copyright &copy; 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
378
  </body>
379
  </html>
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>WP-Ban 1.11 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
203
  <body>
204
  <div id="Container">
205
  <!-- Title -->
206
+ <div id="Title">WP-Ban 1.11&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
207
 
208
  <!-- Tabs -->
209
  <ul id="Tabs">
221
  <div class="SubTitle">&raquo; Index</div>
222
  <div class="SubSubTitle">Plugin Information</div>
223
  <p>
224
+ <strong>Author:</strong><br />
225
+ <strong>&raquo;</strong> Lester 'GaMerZ' Chan
226
  </p>
227
  <p>
228
+ <strong>EMail:</strong><br />
229
+ <strong>&raquo;</strong>
230
  <script type="text/javascript">
231
  /* <![CDATA[*/
232
+ document.write(' <a href="mailto:gamerz84@hotmail.com?Subject=WP-Ban%201.11%20Support" title="EMail To gamerz84@hotmail.com">gamerz84@hotmail.com</a>');
233
  /* ]]> */
234
  </script>
235
  </p>
236
  <p>
237
+ <strong>Website:</strong><br />
238
+ <strong>&raquo;</strong> <a href="http://www.lesterchan.net/" title="http://www.lesterchan.net/">http://www.lesterchan.net/</a>
239
  </p>
240
  <p>
241
+ <strong>Features:</strong><br />
242
+ <strong>&raquo;</strong> Ban users by IP, IP Range, host name and referer url from visiting your WordPress's blog. It will display a custom ban message when the banned IP, IP range, host name or referer url trys to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
243
  </p>
244
  <p>
245
+ <strong>Download:</strong><br />
246
+ <strong>&raquo;</strong> <a href="http://www.lesterchan.net/others/downloads.php?id=26" title="http://www.lesterchan.net/others/downloads.php?id=26">WP-Ban 1.11 For WordPress 2.1.x And Above</a><br />
247
+ <strong>&raquo;</strong> <a href="http://www.lesterchan.net/others/downloads/wp-ban100.zip" title="http://www.lesterchan.net/others/downloads/wp-ban100.zip">WP-Ban 1.00 For WordPress 2.0.x</a><br />
248
  </p>
249
  <p>
250
+ <strong>Demo:</strong><br />
251
+ <strong>&raquo;</strong> N/A
252
  </p>
253
  <p>
254
+ <strong>Development:</strong><br />
255
+ <strong>&raquo;</strong> <a href="http://dev.wp-plugins.org/browser/wp-ban/" title="http://dev.wp-plugins.org/browser/wp-ban/">http://dev.wp-plugins.org/browser/wp-ban/</a>
256
  </p>
257
  <p>
258
+ <strong>Translations:</strong><br />
259
+ <strong>&raquo;</strong> <a href="http://dev.wp-plugins.org/browser/wp-ban/i18n/" title="http://dev.wp-plugins.org/browser/wp-ban/i18n/">http://dev.wp-plugins.org/browser/wp-ban/i18n/</a>
260
  </p>
261
  <p>
262
+ <strong>Support Forums:</strong><br />
263
+ <strong>&raquo;</strong> <a href="http://forums.lesterchan.net/index.php?board=10.0" title="http://forums.lesterchan.net/index.php?board=10.0">http://forums.lesterchan.net/index.php?board=10.0</a>
264
  </p>
265
  <p>
266
+ <strong>Credits:</strong><br />
267
+ <strong>&raquo;</strong> Ban Stats By <a href="http://blog.fileville.net/">Joe (Ttech)</a>
268
  </p>
269
  <p>
270
+ <strong>Updated:</strong><br />
271
+ <strong>&raquo;</strong> 1st June 2007
272
  </p>
273
  <p>
274
+ <strong>Note:</strong><br />
275
+ <strong>&raquo;</strong> The <strong>Changelog</strong>, <strong>Installation</strong>, <strong>Upgrade</strong>, <strong>Usage</strong> Tab at the top of the page.<br />
276
+ <strong>&raquo;</strong> The ban tab has been moved to '<strong>WP-Admin -> Manage -> Ban</strong>'
277
  </p>
278
  <p>
279
+ <strong>Donations:</strong><br />
280
+ <strong>&raquo;</strong> I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is
281
  <script type="text/javascript">
282
  /* <![CDATA[*/
283
+ document.write(' <strong>gamerz84@hotmail.com</strong>.');
284
  /* ]]> */
285
  </script>
286
  </p>
290
  <div id="Changelog" style="display: none;">
291
  <div class="SubTitle">&raquo; Changelog</div>
292
  <ul>
293
+ <li>
294
+ <strong>Version 1.11 (01-06-2007)</strong>
295
+ <ul>
296
+ <li>NEW: Banned By Referer URL</li>
297
+ <li>NEW: Ability To Exclude Specific IPs From Being Banned</li>
298
+ <li>NEW: Added Template Variables For User Attempts Count And Total Attempts Count</li>
299
+ <li>FIXED: Suppress gethostbyaddr() Error</li>
300
+ </ul>
301
+ </li>
302
+ <li>
303
+ <strong>Version 1.10 (01-02-2007)</strong>
304
  <ul>
305
  <li>NEW: Works For WordPress 2.1 Only</li>
306
  <li>NEW: Move ban.php To ban Folder</li>
312
  </ul>
313
  </li>
314
  <li>
315
+ <strong>Version 1.00 (02-01-2007)</strong>
316
  <ul>
317
  <li>NEW: Initial Release</li>
318
  </ul>
325
  <div class="SubTitle">&raquo; Installation Instructions</div>
326
  <ol>
327
  <li>
328
+ Open <strong>wp-content/plugins</strong> Folder
329
  </li>
330
  <li>
331
  Put:
332
  <blockquote>Folder: ban</blockquote>
333
  </li>
334
  <li>
335
+ <strong>Activate</strong> WP-Ban Plugin
336
  </li>
337
  <li>
338
+ Refer To <strong>Usage</strong> For Further Instructions
339
  </li>
340
  </ol>
341
  </div>
343
  <!-- Upgrade Instructions -->
344
  <div id="Upgrade" style="display: none;">
345
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
346
+ <div class="SubSubTitle">From v1.0x To v1.11</div>
347
  <ol>
348
  <li>
349
+ <strong>Deactivate</strong> WP-Ban Plugin
350
  </li>
351
  <li>
352
+ Open <strong>wp-content/plugins</strong> Folder
353
  </li>
354
  <li>
355
  Put/Overwrite:
360
  <blockquote>File: ban.php</blockquote>
361
  </li>
362
  <li>
363
+ <strong>Activate</strong> WP-Ban Plugin
364
  </li>
365
  <li>
366
+ Refer To <strong>Usage</strong> For Further Instructions
367
  </li>
368
  </ol>
369
  </div>
374
  <div class="SubSubTitle">General Usage</div>
375
  <ol>
376
  <li>
377
+ Go to '<strong>WP-Admin -> Manage -> Ban</strong>'
378
  </li>
379
  <li>
380
  Configure your ban options
383
  </div>
384
  </div>
385
  </div>
386
+ <p id="Copyright">WP-Ban 1.11<br />Copyright &copy; 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
387
  </body>
388
  </html>
readme.txt CHANGED
@@ -1,15 +1,15 @@
1
  === WP-Ban ===
2
  Contributors: GamerZ
3
  Donate link: http://www.lesterchan.net/wordpress
4
- Tags: ban, deny, denied, permission, ip, hostname, host, spam, bots, bot
5
  Requires at least: 2.1.0
6
- Stable tag: 1.10
7
 
8
- Ban users by IP or host name from visiting your WordPress's blog.
9
 
10
  == Description ==
11
 
12
- It will display a custom ban message when the banned IP/host name trys to visit you blog. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
13
 
14
  All the information (general, changelog, installation, upgrade, usage) you need about this plugin can be found here: [WP-Ban Readme](http://www.lesterchan.net/wordpress/readme/wp-ban.html "WP-Ban Readme").
15
  It is the exact same readme.html is included in the zip package.
1
  === WP-Ban ===
2
  Contributors: GamerZ
3
  Donate link: http://www.lesterchan.net/wordpress
4
+ Tags: banned, ban, deny, denied, permission, ip, hostname, host, spam, bots, bot, exclude, referer, url, referral, range
5
  Requires at least: 2.1.0
6
+ Stable tag: 1.11
7
 
8
+ Ban users by IP, IP Range, host name and referer url from visiting your WordPress's blog.
9
 
10
  == Description ==
11
 
12
+ It will display a custom ban message when the banned IP, IP range, host name or referer url trys to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
13
 
14
  All the information (general, changelog, installation, upgrade, usage) you need about this plugin can be found here: [WP-Ban Readme](http://www.lesterchan.net/wordpress/readme/wp-ban.html "WP-Ban Readme").
15
  It is the exact same readme.html is included in the zip package.