cbnet Ping Optimizer - Version 2.3.1

Version Description

  • Fixes bug in which options page settings do not save
Download this release

Release Info

Developer chipbennett
Plugin Icon wp plugin cbnet Ping Optimizer
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3 to 2.3.1

Files changed (3) hide show
  1. cbnet-ping-optimizer.php +14 -9
  2. include/options-pg.php +18 -18
  3. readme.txt +5 -1
cbnet-ping-optimizer.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  * Plugin Name: cbnet Ping Optimizer
4
- * Plugin URI: http://www.chipbennett.net/wordpress/plugins/cbnet-ping-optimizer/
5
- * Description: Saves your wordpress blog from getting tagged as ping spammer. (Note: this plugin is a fork of the cbnet Favicon plugin, with registration/activiation functionality removed.) Adjust settings <a href="options-general.php?page=cbnet-ping-optimizer/cbnet-ping-optimizer.php">here</a>.
6
- * Version: 2.3
7
  * Author: Chip Bennett
8
  * Author URI: http://www.chipbennett.net//
9
  *
@@ -15,19 +15,24 @@
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
 
 
 
 
 
18
  * This program was modified from MaxBlogPress Favicon plugin, version 2.2.5,
19
  * Copyright (C) 2007 www.maxblogpress.com, released under the GNU General Public License.
20
  */
21
 
22
  define('cbnetpo_NAME', 'cbnet Ping Optimizer'); // Name of the Plugin
23
- define('cbnetpo_VERSION', '2.3'); // Current version of the Plugin
24
  define("cbnetpo_LOG", true); // Set to 'true' to keep log, else 'false'.
25
 
26
  /**
27
- * PingOptimizer - cbnet Ping Optimizer Class
28
  * Holds all the necessary functions and variables
29
  */
30
- class PingOptimizer
31
  {
32
  var $cbnetpo_ping_option = 0; // cbnet Ping Optimizer option
33
  var $cbnetpo_ping_sites = ''; // cbnet Ping Optimizer pinging URLs
@@ -39,7 +44,7 @@ class PingOptimizer
39
  var $cbnetpo_pvt_to_pub = ""; // Set if post status changes from private to published
40
  var $cbnetpo_max_log = 1000; // Maximum lines of log data to be stored
41
  var $cbnetpo_rows_to_show = 35; // Number of log rows to be displayed in options page
42
- var $cbnetpo_pinglog_tbl = 'mbp_ping_optimizer'; // Ping log table
43
  // Pinging action/type
44
  var $cbnetpo_type = array(1 => 'none', 2 => 'new', 3 => 'future', 4 => 'forced', 5 => 'edited', 6 => 'disabled', 7 => 'noservices', 8 => 'excessive');
45
 
@@ -47,7 +52,7 @@ class PingOptimizer
47
  * Constructor. Add cbnet Ping Optimizer plugin actions/filters and gets the user defined options.
48
  * Also removes the default WordPress pinging services.
49
  */
50
- function PingOptimizer() {
51
  global $wp_version, $table_prefix;
52
  $this->cbnetpo_pinglog_tbl = $table_prefix.$this->cbnetpo_pinglog_tbl;
53
  $this->cbnetpo_siteurl = get_bloginfo('wpurl');
@@ -600,5 +605,5 @@ class PingOptimizer
600
 
601
  } // Eof Class
602
 
603
- $PingOptimizer = new PingOptimizer();
604
  ?>
1
  <?php
2
  /*
3
  * Plugin Name: cbnet Ping Optimizer
4
+ * Plugin URI: http://www.chipbennett.net/wordpress/plugins/cbnetpo-ping-optimizer/
5
+ * Description: Saves your wordpress blog from getting tagged as ping spammer. (Note: this plugin is a fork of the cbnetpo Favicon plugin, with registration/activiation functionality removed.) Adjust settings <a href="options-general.php?page=cbnetpo-ping-optimizer/cbnetpo-ping-optimizer.php">here</a>.
6
+ * Version: 2.3.1
7
  * Author: Chip Bennett
8
  * Author URI: http://www.chipbennett.net//
9
  *
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
+ * This program is distributed in the hope that it will be useful,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ * GNU General Public License for more details.
22
+ *
23
  * This program was modified from MaxBlogPress Favicon plugin, version 2.2.5,
24
  * Copyright (C) 2007 www.maxblogpress.com, released under the GNU General Public License.
25
  */
26
 
27
  define('cbnetpo_NAME', 'cbnet Ping Optimizer'); // Name of the Plugin
28
+ define('cbnetpo_VERSION', '2.3.1'); // Current version of the Plugin
29
  define("cbnetpo_LOG", true); // Set to 'true' to keep log, else 'false'.
30
 
31
  /**
32
+ * cbnetPingOptimizer - cbnet Ping Optimizer Class
33
  * Holds all the necessary functions and variables
34
  */
35
+ class cbnetPingOptimizer
36
  {
37
  var $cbnetpo_ping_option = 0; // cbnet Ping Optimizer option
38
  var $cbnetpo_ping_sites = ''; // cbnet Ping Optimizer pinging URLs
44
  var $cbnetpo_pvt_to_pub = ""; // Set if post status changes from private to published
45
  var $cbnetpo_max_log = 1000; // Maximum lines of log data to be stored
46
  var $cbnetpo_rows_to_show = 35; // Number of log rows to be displayed in options page
47
+ var $cbnetpo_pinglog_tbl = 'cbnetpo_ping_optimizer'; // Ping log table
48
  // Pinging action/type
49
  var $cbnetpo_type = array(1 => 'none', 2 => 'new', 3 => 'future', 4 => 'forced', 5 => 'edited', 6 => 'disabled', 7 => 'noservices', 8 => 'excessive');
50
 
52
  * Constructor. Add cbnet Ping Optimizer plugin actions/filters and gets the user defined options.
53
  * Also removes the default WordPress pinging services.
54
  */
55
+ function cbnetPingOptimizer() {
56
  global $wp_version, $table_prefix;
57
  $this->cbnetpo_pinglog_tbl = $table_prefix.$this->cbnetpo_pinglog_tbl;
58
  $this->cbnetpo_siteurl = get_bloginfo('wpurl');
605
 
606
  } // Eof Class
607
 
608
+ $cbnetPingOptimizer = new cbnetPingOptimizer();
609
  ?>
include/options-pg.php CHANGED
@@ -1,46 +1,46 @@
1
- <script type="text/javascript" src="<?php echo $this->cbnet_incpath;?>tooltip.js"></script>
2
- <link href="<?php echo $this->cbnet_incpath;?>tooltip.css" rel="stylesheet" type="text/css">
3
  <script><!--//
4
- function cbnetShowHide(Div,Img) {
5
  var divCtrl = document.getElementById(Div);
6
  if ( Img != '' ) var theImg = document.getElementById(Img);
7
  if ( divCtrl.style == "" || divCtrl.style.display == "none" ) {
8
  divCtrl.style.display = "block";
9
- if ( Img != '' ) theImg.src = '<?php echo $this->cbnet_incpath;?>images/arr_green2.gif';
10
  } else if ( divCtrl.style != "" || divCtrl.style.display == "block" ) {
11
  divCtrl.style.display = "none";
12
- if ( Img != '' ) theImg.src = '<?php echo $this->cbnet_incpath;?>images/arr_green1.gif';
13
  }
14
  }//--></script>
15
  <div class="wrap">
16
  <?php $this->cbnetpoHeader(); ?>
17
- <h3><?php _e('URIs to Ping', 'cbnet'); ?></h3>
18
  <p>The following services will automatically be pinged when you publish new posts or drafts.
19
  <strong>Not</strong> when you publish future posts or edit previously published posts, as WordPress does by default.</p>
20
  <p><strong>NB:</strong> This list is synchronized with the <a href="options-writing.php" target="_blank">original update services list</a>.</p>
21
  <form method="post">
22
- <p><?php _e('Separate multiple service URIs with line breaks:', 'cbnet'); ?><br />
23
- <textarea name="cbnet[uris]" cols="60" rows="10"><?php echo $this->cbnet_ping_sites;?></textarea></p>
24
- <p><input type="checkbox" name="cbnet[ping]" id="ping_checkbox" value="1" <?php echo $ping_enable_chk;?> /> Enable pinging</p>
25
  <p>
26
- <input type="checkbox" name="cbnet[limit_ping]" id="limit_ping" value="1" <?php echo $limit_ping_chk;?> onclick="cbnetShowHide('limit_ping_dv','')" /> Limit excessive pinging in short time
27
- <span id="limit_ping_dv" style="display:<?php echo $limit_ping_display;?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ping at most <input type="text" name="cbnet[limit_number]" value="<?php echo $this->mpo_options['limit_number'];?>" style="width:25px" maxlength="5" /> time(s) within
28
- <input type="text" name="cbnet[limit_time]" value="<?php echo $this->mpo_options['limit_time'];?>" style="width:25px" maxlength="5" /> minute(s)</span>
29
  </p>
30
  <p>
31
- <input type="submit" name="cbnet[save]" value="<?php _e('Save Settings', 'cbnet'); ?>" class="button" />
32
- <input type="submit" name="cbnet[pingnow]" value="<?php _e('Ping Now', 'cbnet'); ?>" class="button" onclick="return confirm('Are you sure you want to ping these services now? Pinging too often could get you banned for spamming.');" />
33
  </p>
34
  </form><br />
35
- <?php if ( cbnet_LOG == true ) { ?>
36
- <h3><?php _e('Ping Log', 'cbnet'); ?></h3>
37
- <p><strong><?php _e('Following are the lastest actions performed by the plugin:', 'cbnet'); ?></strong>
38
  <?php
39
  list($pinglog,$exists) = $this->cbnetpoGetLogData();
40
  echo $pinglog;
41
  ?>
42
  </p>
43
- <?php if($exists){?><p><a href="?page=<?php echo $this->cbnet_path;?>&d=yes" onclick="return confirm('All ping log data will be deleted. Are you sure?')" style="color:#FF0000;font-weight:bold"><img src="<?php echo $this->cbnet_incpath;?>images/delete.gif" border="0" align="absmiddle"> Clear Log</a></p><?php }?>
44
  <?php } ?>
45
  <?php $this->cbnetpoFooter(); ?>
46
  </div>
1
+ <script type="text/javascript" src="<?php echo $this->cbnetpo_incpath;?>tooltip.js"></script>
2
+ <link href="<?php echo $this->cbnetpo_incpath;?>tooltip.css" rel="stylesheet" type="text/css">
3
  <script><!--//
4
+ function cbnetpoShowHide(Div,Img) {
5
  var divCtrl = document.getElementById(Div);
6
  if ( Img != '' ) var theImg = document.getElementById(Img);
7
  if ( divCtrl.style == "" || divCtrl.style.display == "none" ) {
8
  divCtrl.style.display = "block";
9
+ if ( Img != '' ) theImg.src = '<?php echo $this->cbnetpo_incpath;?>images/arr_green2.gif';
10
  } else if ( divCtrl.style != "" || divCtrl.style.display == "block" ) {
11
  divCtrl.style.display = "none";
12
+ if ( Img != '' ) theImg.src = '<?php echo $this->cbnetpo_incpath;?>images/arr_green1.gif';
13
  }
14
  }//--></script>
15
  <div class="wrap">
16
  <?php $this->cbnetpoHeader(); ?>
17
+ <h3><?php _e('URIs to Ping', 'cbnetpo'); ?></h3>
18
  <p>The following services will automatically be pinged when you publish new posts or drafts.
19
  <strong>Not</strong> when you publish future posts or edit previously published posts, as WordPress does by default.</p>
20
  <p><strong>NB:</strong> This list is synchronized with the <a href="options-writing.php" target="_blank">original update services list</a>.</p>
21
  <form method="post">
22
+ <p><?php _e('Separate multiple service URIs with line breaks:', 'cbnetpo'); ?><br />
23
+ <textarea name="cbnetpo[uris]" cols="60" rows="10"><?php echo $this->cbnetpo_ping_sites;?></textarea></p>
24
+ <p><input type="checkbox" name="cbnetpo[ping]" id="ping_checkbox" value="1" <?php echo $ping_enable_chk;?> /> Enable pinging</p>
25
  <p>
26
+ <input type="checkbox" name="cbnetpo[limit_ping]" id="limit_ping" value="1" <?php echo $limit_ping_chk;?> onclick="cbnetpoShowHide('limit_ping_dv','')" /> Limit excessive pinging in short time
27
+ <span id="limit_ping_dv" style="display:<?php echo $limit_ping_display;?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ping at most <input type="text" name="cbnetpo[limit_number]" value="<?php echo $this->cbnetpo_options['limit_number'];?>" style="width:25px" maxlength="5" /> time(s) within
28
+ <input type="text" name="cbnetpo[limit_time]" value="<?php echo $this->cbnetpo_options['limit_time'];?>" style="width:25px" maxlength="5" /> minute(s)</span>
29
  </p>
30
  <p>
31
+ <input type="submit" name="cbnetpo[save]" value="<?php _e('Save Settings', 'cbnetpo'); ?>" class="button" />
32
+ <input type="submit" name="cbnetpo[pingnow]" value="<?php _e('Ping Now', 'cbnetpo'); ?>" class="button" onclick="return confirm('Are you sure you want to ping these services now? Pinging too often could get you banned for spamming.');" />
33
  </p>
34
  </form><br />
35
+ <?php if ( cbnetpo_LOG == true ) { ?>
36
+ <h3><?php _e('Ping Log', 'cbnetpo'); ?></h3>
37
+ <p><strong><?php _e('Following are the lastest actions performed by the plugin:', 'cbnetpo'); ?></strong>
38
  <?php
39
  list($pinglog,$exists) = $this->cbnetpoGetLogData();
40
  echo $pinglog;
41
  ?>
42
  </p>
43
+ <?php if($exists){?><p><a href="?page=<?php echo $this->cbnetpo_path;?>&d=yes" onclick="return confirm('All ping log data will be deleted. Are you sure?')" style="color:#FF0000;font-weight:bold"><img src="<?php echo $this->cbnetpo_incpath;?>images/delete.gif" border="0" align="absmiddle"> Clear Log</a></p><?php }?>
44
  <?php } ?>
45
  <?php $this->cbnetpoFooter(); ?>
46
  </div>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.chipbennett.net/
4
  Tags: cbnet, Ping Optimizer, images, plugin, generator, picture, icon, admin, maxblogpress
5
  Requires at least: 2.9
6
  Tested up to: 2.9.1
7
- Stable tag: 2.3
8
 
9
  Save your wordpress blog from getting tagged as ping spammer. Activation/subscription-free fork of MaxBlogPress Ping Optimizer plugin
10
 
@@ -56,6 +56,8 @@ Screenshots coming soon.
56
 
57
  == Changelog ==
58
 
 
 
59
  = 2.3 =
60
  * Initial Release
61
  * Forked from cbnet Ping Optimizer plugin version 2.2.5
@@ -63,5 +65,7 @@ Screenshots coming soon.
63
 
64
  == Upgrade Notice ==
65
 
 
 
66
  = 2.3 =
67
  Initial Release. Forked from cbnet Ping Optimizer plugin version 2.2.5.
4
  Tags: cbnet, Ping Optimizer, images, plugin, generator, picture, icon, admin, maxblogpress
5
  Requires at least: 2.9
6
  Tested up to: 2.9.1
7
+ Stable tag: 2.3.1
8
 
9
  Save your wordpress blog from getting tagged as ping spammer. Activation/subscription-free fork of MaxBlogPress Ping Optimizer plugin
10
 
56
 
57
  == Changelog ==
58
 
59
+ = 2.3.1 =
60
+ * Fixes bug in which options page settings do not save
61
  = 2.3 =
62
  * Initial Release
63
  * Forked from cbnet Ping Optimizer plugin version 2.2.5
65
 
66
  == Upgrade Notice ==
67
 
68
+ = 2.3.1 =
69
+ Bugfix release. Fixes bug in which options page settings do not save.
70
  = 2.3 =
71
  Initial Release. Forked from cbnet Ping Optimizer plugin version 2.2.5.