Ad Injection - Version 0.8.5

Version Description

Fix 'Something badly wrong in num_rand_ads_to_insert' message that occurs on page types that I haven't taken account of.

Download this release

Release Info

Developer reviewmylife
Plugin Icon wp plugin Ad Injection
Version 0.8.5
Comparing to
See all releases

Code changes from version 0.8.4 to 0.8.5

Files changed (3) hide show
  1. ad-injection-admin.php +4 -0
  2. ad-injection.php +3 -2
  3. readme.txt +7 -1
ad-injection-admin.php CHANGED
@@ -162,6 +162,10 @@ function adinj_options_page(){
162
 
163
  <h4><font color="red">Be careful!</font></h4>
164
  <p>Make sure that the ad settings and positioning you define are in compliance with your ad provider's terms of service!</p>
 
 
 
 
165
  </div>
166
  </div>
167
  </div>
162
 
163
  <h4><font color="red">Be careful!</font></h4>
164
  <p>Make sure that the ad settings and positioning you define are in compliance with your ad provider's terms of service!</p>
165
+
166
+ <h4><font color="red">Beta version!</font></h4>
167
+ <p>This plugin has only just been released - please bare with me if there are any bugs. I'm actively listening to your feedback and fixing them.</p>
168
+ <p>Appologies to any 0.8.3 users whose ad code was deleted during the upgrade to 0.8.4. I think I have fixed this problem now.</p>
169
  </div>
170
  </div>
171
  </div>
ad-injection.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Ad Injection
4
  Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
5
  Description: Inserts any advert into your blog. Options to exclude by post age, visitor IP, and visitor referrer. Works with WP Super Cache.
6
- Version: 0.8.4
7
  Author: reviewmylife
8
  Author URI: http://www.reviewmylife.co.uk/blog/
9
  License: GPLv2
@@ -516,7 +516,8 @@ function adinj_num_rand_ads_to_insert($content_length){
516
  } else if (is_home()){
517
  $max_num_rand_ads_to_insert = $options['max_num_of_ads_home_page'] - $adinj_total_rand_ads_used;
518
  } else {
519
- die('Something badly wrong in num_rand_ads_to_insert');
 
520
  }
521
  if ($max_num_rand_ads_to_insert <= 0) {
522
  return 0;
3
  Plugin Name: Ad Injection
4
  Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
5
  Description: Inserts any advert into your blog. Options to exclude by post age, visitor IP, and visitor referrer. Works with WP Super Cache.
6
+ Version: 0.8.5
7
  Author: reviewmylife
8
  Author URI: http://www.reviewmylife.co.uk/blog/
9
  License: GPLv2
516
  } else if (is_home()){
517
  $max_num_rand_ads_to_insert = $options['max_num_of_ads_home_page'] - $adinj_total_rand_ads_used;
518
  } else {
519
+ return 0;
520
+ //TODO Bug reported: 'Something badly wrong in num_rand_ads_to_insert');
521
  }
522
  if ($max_num_rand_ads_to_insert <= 0) {
523
  return 0;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-w
4
  Tags: ad injection, advert injection, advert, ad, injection, adsense, advertising, affiliate, inject, injection, insert, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, free
5
  Requires at least: 3.0.0
6
  Tested up to: 3.0.2
7
- Stable tag: 0.8.4
8
 
9
  Injects any kind of advert into existing WordPress posts. Can restrict who sees the ads by post age, visitor referrer, IP address. Cache compatible.
10
 
@@ -157,6 +157,9 @@ For more information visit [reviewmylife](http://www.reviewmylife.co.uk/blog/201
157
 
158
  == Changelog ==
159
 
 
 
 
160
  = 0.8.4 =
161
  * Fix deletion of ad code and config file that happens during automatic update.
162
 
@@ -165,6 +168,9 @@ For more information visit [reviewmylife](http://www.reviewmylife.co.uk/blog/201
165
 
166
  == Upgrade Notice ==
167
 
 
 
 
168
  = 0.8.4 =
169
  If you have already configured your ad code then this update will delete the ads. Sorry - this update fixes that bug. Before upgrading please save your ads. All other settings will be carried over.
170
 
4
  Tags: ad injection, advert injection, advert, ad, injection, adsense, advertising, affiliate, inject, injection, insert, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, free
5
  Requires at least: 3.0.0
6
  Tested up to: 3.0.2
7
+ Stable tag: 0.8.5
8
 
9
  Injects any kind of advert into existing WordPress posts. Can restrict who sees the ads by post age, visitor referrer, IP address. Cache compatible.
10
 
157
 
158
  == Changelog ==
159
 
160
+ = 0.8.5 =
161
+ Fix 'Something badly wrong in num_rand_ads_to_insert' message that occurs on page types that I haven't taken account of.
162
+
163
  = 0.8.4 =
164
  * Fix deletion of ad code and config file that happens during automatic update.
165
 
168
 
169
  == Upgrade Notice ==
170
 
171
+ = 0.8.5 =
172
+ If you get a 'Something badly wrong in num_rand_ads_to_insert' message install this update.
173
+
174
  = 0.8.4 =
175
  If you have already configured your ad code then this update will delete the ads. Sorry - this update fixes that bug. Before upgrading please save your ads. All other settings will be carried over.
176