Ad Inserter – WordPress Ads Management with AdSense Header Integration - Version 1.6.3

Version Description

  • Removed deprecated code (fixes PHP 7 deprecated warnings)
  • Added support for paragraphs with div and other HTML tags (h1, h2, h3,...)
Download this release

Release Info

Developer spacetime
Plugin Icon 128x128 Ad Inserter – WordPress Ads Management with AdSense Header Integration
Version 1.6.3
Comparing to
See all releases

Code changes from version 1.6.2 to 1.6.3

Files changed (5) hide show
  1. ad-inserter.php +7 -3
  2. class.php +77 -28
  3. constants.php +3 -1
  4. readme.txt +15 -3
  5. settings.php +4 -2
ad-inserter.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Ad Inserter
4
- Version: 1.6.2
5
  Description: A simple solution to insert any code into Wordpress. Simply enter any HTML, Javascript or PHP code and select where and how you want to display it.
6
  Author: Spacetime
7
  Author URI: http://igorfuna.com/
@@ -11,6 +11,10 @@ Plugin URI: http://igorfuna.com/software/web/ad-inserter-wordpress-plugin
11
  /*
12
  Change Log
13
 
 
 
 
 
14
  Ad Inserter 1.6.2 - 2 April 2016
15
  - Removed deprecated code (fixes PHP Fatal error Call to a member function get_display_type)
16
  - Added support to change plugin processing priority
@@ -1003,7 +1007,7 @@ function ai_content_hook ($content = ''){
1003
  } else continue;
1004
 
1005
  // Deprecated
1006
- // if ($obj->display_disabled ($content)) continue;
1007
 
1008
  if (!$obj->check_category ()) continue;
1009
 
@@ -1093,7 +1097,7 @@ function ai_excerpt_hook ($content = ''){
1093
  }
1094
 
1095
  // Deprecated
1096
- // if ($obj->display_disabled ($content)) continue;
1097
 
1098
  if (!$obj->check_category ()) continue;
1099
 
1
  <?php
2
  /*
3
  Plugin Name: Ad Inserter
4
+ Version: 1.6.3
5
  Description: A simple solution to insert any code into Wordpress. Simply enter any HTML, Javascript or PHP code and select where and how you want to display it.
6
  Author: Spacetime
7
  Author URI: http://igorfuna.com/
11
  /*
12
  Change Log
13
 
14
+ Ad Inserter 1.6.3 - 6 April 2016
15
+ - Removed deprecated code (fixes PHP 7 deprecated warnings)
16
+ - Added support for paragraphs with div and other HTML tags (h1, h2, h3,...)
17
+
18
  Ad Inserter 1.6.2 - 2 April 2016
19
  - Removed deprecated code (fixes PHP Fatal error Call to a member function get_display_type)
20
  - Added support to change plugin processing priority
1007
  } else continue;
1008
 
1009
  // Deprecated
1010
+ if ($obj->display_disabled ($content)) continue;
1011
 
1012
  if (!$obj->check_category ()) continue;
1013
 
1097
  }
1098
 
1099
  // Deprecated
1100
+ if ($obj->display_disabled ($content)) continue;
1101
 
1102
  if (!$obj->check_category ()) continue;
1103
 
class.php CHANGED
@@ -5,7 +5,9 @@ require_once AD_INSERTER_PLUGIN_DIR.'constants.php';
5
  abstract class ai_BaseCodeBlock {
6
  var $wp_options;
7
 
8
- function ai_BaseCodeBlock() {
 
 
9
  $this->wp_options = array ();
10
 
11
  $this->wp_options [AI_OPTION_CODE] = AD_EMPTY_DATA;
@@ -248,11 +250,13 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
248
 
249
  var $number;
250
 
251
- function ai_CodeBlock() {
 
252
 
253
  $this->number = 0;
254
 
255
- parent::ai_BaseCodeBlock();
 
256
 
257
  $this->wp_options [AI_OPTION_NAME] = AD_NAME;
258
  $this->wp_options [AI_OPTION_DISPLAY_TYPE] = AD_SELECT_NONE;
@@ -260,6 +264,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
260
  $this->wp_options [AI_OPTION_MIN_PARAGRAPHS] = AD_ZERO;
261
  $this->wp_options [AI_OPTION_MIN_WORDS] = AD_ZERO;
262
  $this->wp_options [AI_OPTION_MIN_PARAGRAPH_WORDS] = AD_ZERO;
 
263
  $this->wp_options [AI_OPTION_EXCERPT_NUMBER] = AD_ZERO;
264
  $this->wp_options [AI_OPTION_DIRECTION_TYPE] = AD_DIRECTION_FROM_TOP;
265
  $this->wp_options [AI_OPTION_ALIGNMENT_TYPE] = AD_ALIGNMENT_NONE;
@@ -317,6 +322,11 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
317
  return $option;
318
  }
319
 
 
 
 
 
 
320
  public function get_minimum_paragraph_words(){
321
  $option = isset ($this->wp_options [AI_OPTION_MIN_PARAGRAPH_WORDS]) ? $this->wp_options [AI_OPTION_MIN_PARAGRAPH_WORDS] : "";
322
  if ($option == '') $option = AD_ZERO;
@@ -733,16 +743,33 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
733
  public function before_paragraph ($content) {
734
 
735
  $paragraph_positions = array ();
736
- $last_position = - 1;
737
 
738
- $paragraph_start = "<p";
 
739
 
740
- while (stripos ($content, $paragraph_start, $last_position + 1) !== false) {
741
- $last_position = stripos ($content, $paragraph_start, $last_position + 1);
742
- if ($content [$last_position + 2] == ">" || $content [$last_position + 2] == " ")
743
- $paragraph_positions [] = $last_position;
 
 
 
 
 
 
 
 
 
 
 
 
744
  }
745
 
 
 
 
 
 
746
  $paragraph_min_words = $this->get_minimum_paragraph_words();
747
  if ($paragraph_min_words != 0) {
748
  $filtered_paragraph_positions = array ();
@@ -834,15 +861,31 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
834
  public function after_paragraph ($content) {
835
 
836
  $paragraph_positions = array ();
837
- $last_position = - 1;
838
 
839
- $paragraph_end = "</p>";
 
 
 
 
 
840
 
841
- while (stripos ($content, $paragraph_end, $last_position + 1) !== false){
842
- $last_position = stripos ($content, $paragraph_end, $last_position + 1) + 3;
843
- $paragraph_positions [] = $last_position;
 
 
 
 
 
 
 
844
  }
845
 
 
 
 
 
 
846
  $paragraph_min_words = $this->get_minimum_paragraph_words();
847
  if ($paragraph_min_words != 0) {
848
  $filtered_paragraph_positions = array ();
@@ -1020,20 +1063,20 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
1020
  }
1021
 
1022
  // Deprecated
1023
- // function display_disabled ($content){
1024
 
1025
- // $ad_name = $this->get_ad_name();
1026
 
1027
- // if (preg_match ("/<!-- +Ad +Inserter +Ad +".($this->number)." +Disabled +-->/i", $content)) return true;
1028
 
1029
- // if (preg_match ("/<!-- +disable +adinserter +\* +-->/i", $content)) return true;
1030
 
1031
- // if (preg_match ("/<!-- +disable +adinserter +".($this->number)." +-->/i", $content)) return true;
1032
 
1033
- // if (strpos ($content, "<!-- disable adinserter " . $ad_name . " -->") != false) return true;
1034
 
1035
- // return false;
1036
- // }
1037
 
1038
  function check_category () {
1039
 
@@ -1243,8 +1286,10 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
1243
 
1244
  class ai_Block extends ai_CodeBlock {
1245
 
1246
- public function ai_Block ($number) {
1247
- parent::ai_CodeBlock();
 
 
1248
 
1249
  $this->number = $number;
1250
  $this->wp_options [AI_OPTION_NAME] = AD_NAME." ".$number;
@@ -1253,14 +1298,18 @@ class ai_Block extends ai_CodeBlock {
1253
 
1254
  class ai_AdH extends ai_BaseCodeBlock {
1255
 
1256
- public function ai_AdH() {
1257
- parent::ai_BaseCodeBlock();
 
 
1258
  }
1259
  }
1260
 
1261
  class ai_AdF extends ai_BaseCodeBlock {
1262
 
1263
- public function ai_AdF() {
1264
- parent::ai_BaseCodeBlock();
 
 
1265
  }
1266
  }
5
  abstract class ai_BaseCodeBlock {
6
  var $wp_options;
7
 
8
+ // function ai_BaseCodeBlock() {
9
+ function __construct () {
10
+
11
  $this->wp_options = array ();
12
 
13
  $this->wp_options [AI_OPTION_CODE] = AD_EMPTY_DATA;
250
 
251
  var $number;
252
 
253
+ // function ai_CodeBlock() {
254
+ function __construct () {
255
 
256
  $this->number = 0;
257
 
258
+ // parent::ai_BaseCodeBlock();
259
+ parent::__construct();
260
 
261
  $this->wp_options [AI_OPTION_NAME] = AD_NAME;
262
  $this->wp_options [AI_OPTION_DISPLAY_TYPE] = AD_SELECT_NONE;
264
  $this->wp_options [AI_OPTION_MIN_PARAGRAPHS] = AD_ZERO;
265
  $this->wp_options [AI_OPTION_MIN_WORDS] = AD_ZERO;
266
  $this->wp_options [AI_OPTION_MIN_PARAGRAPH_WORDS] = AD_ZERO;
267
+ $this->wp_options [AI_OPTION_PARAGRAPH_TAGS] = DEFAULT_PARAGRAPH_TAGS;
268
  $this->wp_options [AI_OPTION_EXCERPT_NUMBER] = AD_ZERO;
269
  $this->wp_options [AI_OPTION_DIRECTION_TYPE] = AD_DIRECTION_FROM_TOP;
270
  $this->wp_options [AI_OPTION_ALIGNMENT_TYPE] = AD_ALIGNMENT_NONE;
322
  return $option;
323
  }
324
 
325
+ public function get_paragraph_tags(){
326
+ $option = isset ($this->wp_options [AI_OPTION_PARAGRAPH_TAGS]) ? $this->wp_options [AI_OPTION_PARAGRAPH_TAGS] : DEFAULT_PARAGRAPH_TAGS;
327
+ return $option;
328
+ }
329
+
330
  public function get_minimum_paragraph_words(){
331
  $option = isset ($this->wp_options [AI_OPTION_MIN_PARAGRAPH_WORDS]) ? $this->wp_options [AI_OPTION_MIN_PARAGRAPH_WORDS] : "";
332
  if ($option == '') $option = AD_ZERO;
743
  public function before_paragraph ($content) {
744
 
745
  $paragraph_positions = array ();
 
746
 
747
+ $paragraph_tags = trim ($this->get_paragraph_tags());
748
+ if ($paragraph_tags == '') return $content;
749
 
750
+ $paragraph_start_strings = explode (",", $paragraph_tags);
751
+
752
+ if (count ($paragraph_start_strings) == 0) return $content;
753
+
754
+ foreach ($paragraph_start_strings as $paragraph_start_string) {
755
+ if (trim ($paragraph_start_string) == '') continue;
756
+
757
+ $last_position = - 1;
758
+ $paragraph_start = '<' . trim ($paragraph_start_string);
759
+ $paragraph_start_len = strlen ($paragraph_start);
760
+
761
+ while (stripos ($content, $paragraph_start, $last_position + 1) !== false) {
762
+ $last_position = stripos ($content, $paragraph_start, $last_position + 1);
763
+ if ($content [$last_position + $paragraph_start_len] == ">" || $content [$last_position + $paragraph_start_len] == " ")
764
+ $paragraph_positions [] = $last_position;
765
+ }
766
  }
767
 
768
+ // Nothing to do
769
+ if (sizeof ($paragraph_positions) == 0) return $content;
770
+
771
+ sort ($paragraph_positions);
772
+
773
  $paragraph_min_words = $this->get_minimum_paragraph_words();
774
  if ($paragraph_min_words != 0) {
775
  $filtered_paragraph_positions = array ();
861
  public function after_paragraph ($content) {
862
 
863
  $paragraph_positions = array ();
 
864
 
865
+ $paragraph_tags = trim ($this->get_paragraph_tags());
866
+ if ($paragraph_tags == '') return $content;
867
+
868
+ $paragraph_end_strings = explode (",", $paragraph_tags);
869
+
870
+ if (count ($paragraph_end_strings) == 0) return $content;
871
 
872
+ foreach ($paragraph_end_strings as $paragraph_end_string) {
873
+ if (trim ($paragraph_end_string) == '') continue;
874
+
875
+ $last_position = - 1;
876
+ $paragraph_end = '</' . trim ($paragraph_end_string) . '>';
877
+
878
+ while (stripos ($content, $paragraph_end, $last_position + 1) !== false) {
879
+ $last_position = stripos ($content, $paragraph_end, $last_position + 1) + strlen ($paragraph_end) - 1;
880
+ $paragraph_positions [] = $last_position;
881
+ }
882
  }
883
 
884
+ // Nothing to do
885
+ if (sizeof ($paragraph_positions) == 0) return $content;
886
+
887
+ sort ($paragraph_positions);
888
+
889
  $paragraph_min_words = $this->get_minimum_paragraph_words();
890
  if ($paragraph_min_words != 0) {
891
  $filtered_paragraph_positions = array ();
1063
  }
1064
 
1065
  // Deprecated
1066
+ function display_disabled ($content){
1067
 
1068
+ $ad_name = $this->get_ad_name();
1069
 
1070
+ if (preg_match ("/<!-- +Ad +Inserter +Ad +".($this->number)." +Disabled +-->/i", $content)) return true;
1071
 
1072
+ if (preg_match ("/<!-- +disable +adinserter +\* +-->/i", $content)) return true;
1073
 
1074
+ if (preg_match ("/<!-- +disable +adinserter +".($this->number)." +-->/i", $content)) return true;
1075
 
1076
+ if (strpos ($content, "<!-- disable adinserter " . $ad_name . " -->") != false) return true;
1077
 
1078
+ return false;
1079
+ }
1080
 
1081
  function check_category () {
1082
 
1286
 
1287
  class ai_Block extends ai_CodeBlock {
1288
 
1289
+ // public function ai_Block ($number) {
1290
+ public function __construct ($number) {
1291
+ // parent::ai_CodeBlock();
1292
+ parent::__construct();
1293
 
1294
  $this->number = $number;
1295
  $this->wp_options [AI_OPTION_NAME] = AD_NAME." ".$number;
1298
 
1299
  class ai_AdH extends ai_BaseCodeBlock {
1300
 
1301
+ // public function ai_AdH() {
1302
+ public function __construct () {
1303
+ // parent::ai_BaseCodeBlock();
1304
+ parent::__construct();
1305
  }
1306
  }
1307
 
1308
  class ai_AdF extends ai_BaseCodeBlock {
1309
 
1310
+ // public function ai_AdF() {
1311
+ public function __construct () {
1312
+ // parent::ai_BaseCodeBlock();
1313
+ parent::__construct();
1314
  }
1315
  }
constants.php CHANGED
@@ -11,7 +11,7 @@ if (!defined( 'AD_INSERTER_TITLE'))
11
  define ('AD_INSERTER_TITLE', 'Ad Inserter');
12
 
13
  if (!defined( 'AD_INSERTER_VERSION'))
14
- define ('AD_INSERTER_VERSION', '1.6.2');
15
 
16
  if (!defined ('AD_INSERTER_BLOCKS'))
17
  define ('AD_INSERTER_BLOCKS', 16);
@@ -47,6 +47,7 @@ define ('DEFAULT_SYNTAX_HIGHLIGHTER_THEME', 'ad_inserter');
47
  define ('DEFAULT_BLOCK_CLASS_NAME', 'code-block');
48
  define ('DEFAULT_MINIMUM_USER_ROLE', 'administrator');
49
  define ('DEFAULT_PLUGIN_PRIORITY', 99999);
 
50
 
51
  define ('AD_EMPTY_DATA', '');
52
  define ('AD_ZERO', '0');
@@ -75,6 +76,7 @@ define ('AI_OPTION_PARAGRAPH_NUMBER', 'paragraph_number');
75
  define ('AI_OPTION_MIN_PARAGRAPHS', 'min_paragraphs');
76
  define ('AI_OPTION_MIN_WORDS', 'min_words');
77
  define ('AI_OPTION_MIN_PARAGRAPH_WORDS', 'min_paragraph_words');
 
78
  define ('AI_OPTION_EXCERPT_NUMBER', 'excerpt_number');
79
  define ('AI_OPTION_DIRECTION_TYPE', 'direction_type');
80
  define ('AI_OPTION_ALIGNMENT_TYPE', 'alignment_type');
11
  define ('AD_INSERTER_TITLE', 'Ad Inserter');
12
 
13
  if (!defined( 'AD_INSERTER_VERSION'))
14
+ define ('AD_INSERTER_VERSION', '1.6.3');
15
 
16
  if (!defined ('AD_INSERTER_BLOCKS'))
17
  define ('AD_INSERTER_BLOCKS', 16);
47
  define ('DEFAULT_BLOCK_CLASS_NAME', 'code-block');
48
  define ('DEFAULT_MINIMUM_USER_ROLE', 'administrator');
49
  define ('DEFAULT_PLUGIN_PRIORITY', 99999);
50
+ define ('DEFAULT_PARAGRAPH_TAGS', 'p');
51
 
52
  define ('AD_EMPTY_DATA', '');
53
  define ('AD_ZERO', '0');
76
  define ('AI_OPTION_MIN_PARAGRAPHS', 'min_paragraphs');
77
  define ('AI_OPTION_MIN_WORDS', 'min_words');
78
  define ('AI_OPTION_MIN_PARAGRAPH_WORDS', 'min_paragraph_words');
79
+ define ('AI_OPTION_PARAGRAPH_TAGS', 'paragraph_tags');
80
  define ('AI_OPTION_EXCERPT_NUMBER', 'excerpt_number');
81
  define ('AI_OPTION_DIRECTION_TYPE', 'direction_type');
82
  define ('AI_OPTION_ALIGNMENT_TYPE', 'alignment_type');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: adsense, amazon, clickbank, ad, ads, html, javascript, php, code, widget, sidebar, responsive, rotating, banner, banner rotation, contextual, shortcodes, widgets, header, footer, users, logged in, not logged in, mobile, desktop, phone, tablet, custom css, category, tag, filter, url, skip
5
  Requires at least: 3.0
6
  Tested up to: 4.4.2
7
- Stable tag: 1.6.1
8
  License: GPLv3
9
 
10
  Insert any HTML/Javascript/PHP code into Wordpress. Perfect for AdSense or contextual Amazon ads. 16 code blocks, many display options.
@@ -33,6 +33,10 @@ Paragraph number for Automatic Display Options Before and After Paragraph:
33
 
34
  Paragraphs can be counted from top or from bottom. It is also possible to count only paragraphs that contain/do not contain certain text or count only paragraphs that have some minimum number of words. If more than one text is defined (comma separated) and "contain" is selected then the paragraph must contain ALL texts.
35
 
 
 
 
 
36
  Additional Display Options:
37
 
38
  * As a Widget - Simply drag **Ad Inserter** widget to any postition, select code block and you're done
@@ -423,9 +427,13 @@ AD CODE RIGHT
423
 
424
  == Changelog ==
425
 
 
 
 
 
426
  = 1.6.2 =
427
- * Removed deprecated code (fixes PHP Fatal error Call to a member function get_display_type)
428
- * Added support to change plugin processing priority
429
 
430
  = 1.6.1 =
431
  * Fixed bug: For shortcodes in posts the date was not checked
@@ -588,6 +596,10 @@ AD CODE RIGHT
588
 
589
  == Upgrade Notice ==
590
 
 
 
 
 
591
  = 1.6.2 =
592
  Removed deprecated code (fixes PHP Fatal error Call to a member function get_display_type);
593
  Added support to change plugin processing priority
4
  Tags: adsense, amazon, clickbank, ad, ads, html, javascript, php, code, widget, sidebar, responsive, rotating, banner, banner rotation, contextual, shortcodes, widgets, header, footer, users, logged in, not logged in, mobile, desktop, phone, tablet, custom css, category, tag, filter, url, skip
5
  Requires at least: 3.0
6
  Tested up to: 4.4.2
7
+ Stable tag: 1.6.2
8
  License: GPLv3
9
 
10
  Insert any HTML/Javascript/PHP code into Wordpress. Perfect for AdSense or contextual Amazon ads. 16 code blocks, many display options.
33
 
34
  Paragraphs can be counted from top or from bottom. It is also possible to count only paragraphs that contain/do not contain certain text or count only paragraphs that have some minimum number of words. If more than one text is defined (comma separated) and "contain" is selected then the paragraph must contain ALL texts.
35
 
36
+ You can also define paragraph tags. Normally only `<p>` tags are used. If you post contains also `<div>` or header tags you can define comma separated list of tags used to count paragraphs (e.g. **p, div, h2, h3**).
37
+ **WARNING:** Each code block you insert on post adds one `<div>` block unelss you use **No wrapping** style. **Before Paragraph** will insert code before `<tag>`, **After Paragraph** will insert code after closing `</tag>`.
38
+ **After Paragraph** display will not work if you specify tag names that have no closing tags!
39
+
40
  Additional Display Options:
41
 
42
  * As a Widget - Simply drag **Ad Inserter** widget to any postition, select code block and you're done
427
 
428
  == Changelog ==
429
 
430
+ = 1.6.3 =
431
+ - Removed deprecated code (fixes PHP 7 deprecated warnings)
432
+ - Added support for paragraphs with div and other HTML tags (h1, h2, h3,...)
433
+
434
  = 1.6.2 =
435
+ - Removed deprecated code (fixes PHP Fatal error Call to a member function get_display_type)
436
+ - Added support to change plugin processing priority
437
 
438
  = 1.6.1 =
439
  * Fixed bug: For shortcodes in posts the date was not checked
596
 
597
  == Upgrade Notice ==
598
 
599
+ = 1.6.3 =
600
+ Removed deprecated code (fixes PHP Fatal error Call to a member function get_display_type);
601
+ Added support to change plugin processing priority
602
+
603
  = 1.6.2 =
604
  Removed deprecated code (fixes PHP Fatal error Call to a member function get_display_type);
605
  Added support to change plugin processing priority
settings.php CHANGED
@@ -395,11 +395,13 @@ function print_settings_form (){
395
  Paragraph number <input style="border-radius: 5px;" type="text" name="<?php echo AI_OPTION_PARAGRAPH_NUMBER, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="<?php echo $obj->get_paragraph_number() ?>" size="2" maxlength="4" /> &nbsp; 0 means random paragraph, <span title="0.2 means paragraph at 20% of page height, 0.5 means paragraph halfway down the page, 0.9 means paragraph at 90% of page height, etc.">value between 0 and 1 means relative position on page.</span>
396
  </div>
397
  <div style="margin: 4px 0 4px 0; ">
398
- Counting
399
  <select style="border-radius: 5px;" name="<?php echo AI_OPTION_DIRECTION_TYPE, WP_FORM_FIELD_POSTFIX, $ad_number; ?>">
400
  <option value="<?php echo AD_DIRECTION_FROM_TOP; ?>" <?php echo ($obj->get_direction_type()==AD_DIRECTION_FROM_TOP) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AD_DIRECTION_FROM_TOP; ?></option>
401
  <option value="<?php echo AD_DIRECTION_FROM_BOTTOM; ?>" <?php echo ($obj->get_direction_type()==AD_DIRECTION_FROM_BOTTOM) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AD_DIRECTION_FROM_BOTTOM; ?></option>
402
- </select>&nbsp;&nbsp;&nbsp;
 
 
403
  Minimum number of paragraphs <input style="border-radius: 5px;" type="text" name="<?php echo AI_OPTION_MIN_PARAGRAPHS, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="<?php echo $obj->get_paragraph_number_minimum() ?>" size="2" maxlength="3" />&nbsp;&nbsp;&nbsp;
404
  </div>
405
  <div style="margin: 4px 0 4px 0; ">
395
  Paragraph number <input style="border-radius: 5px;" type="text" name="<?php echo AI_OPTION_PARAGRAPH_NUMBER, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="<?php echo $obj->get_paragraph_number() ?>" size="2" maxlength="4" /> &nbsp; 0 means random paragraph, <span title="0.2 means paragraph at 20% of page height, 0.5 means paragraph halfway down the page, 0.9 means paragraph at 90% of page height, etc.">value between 0 and 1 means relative position on page.</span>
396
  </div>
397
  <div style="margin: 4px 0 4px 0; ">
398
+ Count
399
  <select style="border-radius: 5px;" name="<?php echo AI_OPTION_DIRECTION_TYPE, WP_FORM_FIELD_POSTFIX, $ad_number; ?>">
400
  <option value="<?php echo AD_DIRECTION_FROM_TOP; ?>" <?php echo ($obj->get_direction_type()==AD_DIRECTION_FROM_TOP) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AD_DIRECTION_FROM_TOP; ?></option>
401
  <option value="<?php echo AD_DIRECTION_FROM_BOTTOM; ?>" <?php echo ($obj->get_direction_type()==AD_DIRECTION_FROM_BOTTOM) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AD_DIRECTION_FROM_BOTTOM; ?></option>
402
+ </select>
403
+ paragraphs with tags
404
+ <input style="border-radius: 5px;" title="Comma separated HTML tags, usually only 'p' tags are used" type="text" name="<?php echo AI_OPTION_PARAGRAPH_TAGS, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="<?php echo $obj->get_paragraph_tags(); ?>" size="14" maxlength="50"/>&nbsp;&nbsp;&nbsp;
405
  Minimum number of paragraphs <input style="border-radius: 5px;" type="text" name="<?php echo AI_OPTION_MIN_PARAGRAPHS, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="<?php echo $obj->get_paragraph_number_minimum() ?>" size="2" maxlength="3" />&nbsp;&nbsp;&nbsp;
406
  </div>
407
  <div style="margin: 4px 0 4px 0; ">