Ad Injection - Version 0.9.7.4

Version Description

  • UI fixes.
Download this release

Release Info

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

Code changes from version 0.9.7.3 to 0.9.7.4

Files changed (3) hide show
  1. ad-injection-admin.php +16 -5
  2. ad-injection.php +1 -1
  3. readme.txt +6 -3
ad-injection-admin.php CHANGED
@@ -493,12 +493,11 @@ function adinj_get_status($name){
493
  $status[1] = 'test mode';
494
  }
495
  } else if ($name == 'mode'){
 
 
496
  $status[1] = $ops['ad_insertion_mode'];
497
  } else if ($name == 'restrictions'){
498
- if ($ops['ad_insertion_mode'] == 'direct_static'){
499
- $status[1] = 'n/a for direct static';
500
- return $status;
501
- }
502
  $status[1] = "";
503
  if ($ops['sevisitors_only'] == 'on'){
504
  $status[1] .= 'referrer';
@@ -506,6 +505,14 @@ function adinj_get_status($name){
506
  if ($ops['block_ips'] == 'on' && !empty($ops['blocked_ips'])){
507
  $status[1] .= ' ip';
508
  }
 
 
 
 
 
 
 
 
509
  } else if ($name == 'debugging'){
510
  $val = $ops['debug_mode'];
511
  if ($val == 'on'){
@@ -663,8 +670,11 @@ function adinj_condition_tables($prefix, $show_setting){
663
  }
664
 
665
  function adinj_condition_table($name, $description, $type, $ops, $dropdown_fieldname=NULL, $textarea_fieldname=NULL){
 
666
  if ($dropdown_fieldname == NULL){
667
  $dropdown_fieldname = $name."_condition_mode";
 
 
668
  }
669
  if ($textarea_fieldname == NULL){
670
  $textarea_fieldname = $name."_condition_entries";
@@ -683,7 +693,7 @@ function adinj_condition_table($name, $description, $type, $ops, $dropdown_field
683
  ?>
684
 
685
  <br />
686
- <select name="<?php echo $name; ?>_dropdown" onchange='adinj_addtext(getElementsByName("<?php echo $textarea_fieldname; ?>")[0], this.options[this.selectedIndex].value);'>
687
  <option value=""><?php echo 'Add ' . $type; ?></option>
688
 
689
  <?php
@@ -796,6 +806,7 @@ function adinj_get_version(){
796
  }
797
 
798
  function adinj_problem_with_wpminify_check(){
 
799
  $wpm_options = get_option('wp_minify');
800
  $ops = adinj_options();
801
  if ($wpm_options['enable_html'] == true && $ops['ad_insertion_mode'] == 'mfunc'){
493
  $status[1] = 'test mode';
494
  }
495
  } else if ($name == 'mode'){
496
+ $status[0] = 'green';
497
+ if ($ops['ad_insertion_mode'] == 'direct_static') $status[0] = 'orange';
498
  $status[1] = $ops['ad_insertion_mode'];
499
  } else if ($name == 'restrictions'){
500
+ $status[0] = 'green';
 
 
 
501
  $status[1] = "";
502
  if ($ops['sevisitors_only'] == 'on'){
503
  $status[1] .= 'referrer';
505
  if ($ops['block_ips'] == 'on' && !empty($ops['blocked_ips'])){
506
  $status[1] .= ' ip';
507
  }
508
+ } else if ($name == 'adsettings'){
509
+ $status[0] = 'green';
510
+ } else if ($name == 'adverts'){
511
+ if (adinj_count_live_ads('top', $ops) > 0 || adinj_count_live_ads('random', $ops) || adinj_count_live_ads('bottom', $ops)){
512
+ $status[0] = 'green';
513
+ } else {
514
+ $status[0] = 'red';
515
+ }
516
  } else if ($name == 'debugging'){
517
  $val = $ops['debug_mode'];
518
  if ($val == 'on'){
670
  }
671
 
672
  function adinj_condition_table($name, $description, $type, $ops, $dropdown_fieldname=NULL, $textarea_fieldname=NULL){
673
+ $style = "";
674
  if ($dropdown_fieldname == NULL){
675
  $dropdown_fieldname = $name."_condition_mode";
676
+ // Only for the main screen - now for widgets screen.
677
+ $style = "style='width:280px'";
678
  }
679
  if ($textarea_fieldname == NULL){
680
  $textarea_fieldname = $name."_condition_entries";
693
  ?>
694
 
695
  <br />
696
+ <select name="<?php echo $name; ?>_dropdown" <?php echo $style; ?> onchange='adinj_addtext(getElementsByName("<?php echo $textarea_fieldname; ?>")[0], this.options[this.selectedIndex].value);'>
697
  <option value=""><?php echo 'Add ' . $type; ?></option>
698
 
699
  <?php
806
  }
807
 
808
  function adinj_problem_with_wpminify_check(){
809
+ if (!is_plugin_active('wp-minify/wp-minify.php')) return false;
810
  $wpm_options = get_option('wp_minify');
811
  $ops = adinj_options();
812
  if ($wpm_options['enable_html'] == true && $ops['ad_insertion_mode'] == 'mfunc'){
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: Injects any advert (e.g. AdSense) into your WordPress posts or widget area. Restrict who sees the ads by post length, age, referrer or IP. Cache compatible.
6
- Version: 0.9.7.3
7
  Author: reviewmylife
8
  Author URI: http://www.reviewmylife.co.uk/
9
  License: GPLv2
3
  Plugin Name: Ad Injection
4
  Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
5
  Description: Injects any advert (e.g. AdSense) into your WordPress posts or widget area. Restrict who sees the ads by post length, age, referrer or IP. Cache compatible.
6
+ Version: 0.9.7.4
7
  Author: reviewmylife
8
  Author URI: http://www.reviewmylife.co.uk/
9
  License: GPLv2
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, adsense, advert injection, advert, ad, injection, advertising, affiliate, inject, injection, insert, widget, widgets, sidebar, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, Adsense Injection, free, blog, ad rotation, A:B testing, split testing, WP Super Cache, W3 Total Cache, WP Cache
5
  Requires at least: 2.8.6
6
  Tested up to: 3.1
7
- Stable tag: 0.9.7.3
8
 
9
  Injects any adverts (e.g. AdSense) into the WordPress posts or widget area. Restrict who sees ads by post length/age/referrer or IP. Cache compatible.
10
 
@@ -372,6 +372,9 @@ If you do get any errors please use the 'Report a bug or give feedback' link on
372
 
373
  == Changelog ==
374
 
 
 
 
375
  = 0.9.7.3 =
376
  * Fix (hopefully) for the disappearing top/bottom adverts that affected some users. Special thanks to numaga.com for the debug access.
377
 
@@ -510,8 +513,8 @@ Fix 'Something badly wrong in num_rand_ads_to_insert' message that occurs on pag
510
 
511
  == Upgrade Notice ==
512
 
513
- = 0.9.7.3 =
514
- * Fix (hopefully) for the disappearing top/bottom adverts that affected some users.
515
 
516
  = 0.8.3 =
517
  First public release.
4
  Tags: ad injection, adsense, advert injection, advert, ad, injection, advertising, affiliate, inject, injection, insert, widget, widgets, sidebar, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, Adsense Injection, free, blog, ad rotation, A:B testing, split testing, WP Super Cache, W3 Total Cache, WP Cache
5
  Requires at least: 2.8.6
6
  Tested up to: 3.1
7
+ Stable tag: 0.9.7.4
8
 
9
  Injects any adverts (e.g. AdSense) into the WordPress posts or widget area. Restrict who sees ads by post length/age/referrer or IP. Cache compatible.
10
 
372
 
373
  == Changelog ==
374
 
375
+ = 0.9.7.4 =
376
+ * UI fixes.
377
+
378
  = 0.9.7.3 =
379
  * Fix (hopefully) for the disappearing top/bottom adverts that affected some users. Special thanks to numaga.com for the debug access.
380
 
513
 
514
  == Upgrade Notice ==
515
 
516
+ = 0.9.7.4 =
517
+ * Fix (hopefully) for the disappearing top/bottom adverts that affected some users of v0.9.7 - v0.9.7.2.
518
 
519
  = 0.8.3 =
520
  First public release.