AdRotate Banner Manager - Version 4.11.1

Version Description

FREE = * [fix] Date pickers not setting the right dates for some users * [fix] Editing schedules now sets right date format in all browsers * [new] More attractive theme for date pickers

Download this release

Release Info

Developer adegans
Plugin Icon 128x128 AdRotate Banner Manager
Version 4.11.1
Comparing to
See all releases

Code changes from version 4.11 to 4.11.1

adrotate-functions.php CHANGED
@@ -652,7 +652,7 @@ function adrotate_dashboard_scripts() {
652
  wp_enqueue_script('textatcursor', plugins_url('/library/textatcursor.js', __FILE__));
653
  wp_enqueue_script('tablesorter', plugins_url('/library/jquery.tablesorter.min.js', __FILE__), array('jquery'));
654
  wp_enqueue_script('adrotate-tablesorter', plugins_url('/library/jquery.adrotate.tablesorter.js', __FILE__), array('jquery', 'tablesorter'));
655
- wp_enqueue_script('adrotate-datepicker-fallback', plugins_url('/library/jquery.adrotate.datepicker.fallback.js', __FILE__), array('jquery'));
656
  }
657
 
658
  // WP Pointers
652
  wp_enqueue_script('textatcursor', plugins_url('/library/textatcursor.js', __FILE__));
653
  wp_enqueue_script('tablesorter', plugins_url('/library/jquery.tablesorter.min.js', __FILE__), array('jquery'));
654
  wp_enqueue_script('adrotate-tablesorter', plugins_url('/library/jquery.adrotate.tablesorter.js', __FILE__), array('jquery', 'tablesorter'));
655
+ wp_enqueue_script('adrotate-datepicker', plugins_url('/library/jquery.adrotate.datepicker.js', __FILE__), array('jquery'));
656
  }
657
 
658
  // WP Pointers
adrotate-manage-publisher.php CHANGED
@@ -200,11 +200,7 @@ function adrotate_insert_input() {
200
 
201
  // Sort out start dates
202
  if(strlen($start_date) > 0) {
203
- if(strstr($start_date, '-')) {
204
- list($start_year, $start_month, $start_day) = explode('-', $start_date); // yyyy-mm-dd
205
- } else {
206
- list($start_day, $start_month, $start_year) = explode('/', $start_date); // Fuck you Safari (dd/mm/yyyy)
207
- }
208
  } else {
209
  $start_year = $start_month = $start_day = 0;
210
  }
@@ -220,11 +216,7 @@ function adrotate_insert_input() {
220
 
221
  // Sort out end dates
222
  if(strlen($end_date) > 0) {
223
- if(strstr($end_date, '-')) {
224
- list($end_year, $end_month, $end_day) = explode('-', $end_date); // yyyy-mm-dd
225
- } else {
226
- list($end_day, $end_month, $end_year) = explode('/', $end_date); // Fuck you Safari (dd/mm/yyyy)
227
- }
228
  } else {
229
  $end_year = $end_month = $end_day = 0;
230
  }
200
 
201
  // Sort out start dates
202
  if(strlen($start_date) > 0) {
203
+ list($start_day, $start_month, $start_year) = explode('-', $start_date); // dd/mm/yyyy
 
 
 
 
204
  } else {
205
  $start_year = $start_month = $start_day = 0;
206
  }
216
 
217
  // Sort out end dates
218
  if(strlen($end_date) > 0) {
219
+ list($end_day, $end_month, $end_year) = explode('-', $end_date); // dd/mm/yyyy
 
 
 
 
220
  } else {
221
  $end_year = $end_month = $end_day = 0;
222
  }
adrotate-output.php CHANGED
@@ -655,7 +655,7 @@ function adrotate_dashboard_error() {
655
  $error['borlabs_not_active'] = __('You have enable caching support but Borlabs Cache is not active on your site!', 'adrotate').' <a href="'.admin_url('/admin.php?page=adrotate-settings&tab=misc').'">'.__('Disable Borlabs Cache Support', 'adrotate').'</a>.';
656
  }
657
  if(is_plugin_active('borlabs-cache/borlabs-cache.php')) {
658
- $borlabscache = $borlabsphrase = '';
659
  if(class_exists('\Borlabs\Factory')) {
660
  $borlabscache = \Borlabs\Factory::get('Cache\Config')->get('fragmentCaching');
661
  }
655
  $error['borlabs_not_active'] = __('You have enable caching support but Borlabs Cache is not active on your site!', 'adrotate').' <a href="'.admin_url('/admin.php?page=adrotate-settings&tab=misc').'">'.__('Disable Borlabs Cache Support', 'adrotate').'</a>.';
656
  }
657
  if(is_plugin_active('borlabs-cache/borlabs-cache.php')) {
658
+ $borlabscache = '';
659
  if(class_exists('\Borlabs\Factory')) {
660
  $borlabscache = \Borlabs\Factory::get('Cache\Config')->get('fragmentCaching');
661
  }
adrotate.php CHANGED
@@ -7,7 +7,7 @@ Author URI: http://www.arnan.me/
7
  Description: Monetise your website with adverts while keeping things simple. Start making money today!
8
  Text Domain: adrotate
9
  Domain Path: /languages/
10
- Version: 4.11
11
  License: GPLv3
12
  */
13
 
@@ -22,7 +22,7 @@ License: GPLv3
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
- define("ADROTATE_DISPLAY", '4.11');
26
  define("ADROTATE_VERSION", 391);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
7
  Description: Monetise your website with adverts while keeping things simple. Start making money today!
8
  Text Domain: adrotate
9
  Domain Path: /languages/
10
+ Version: 4.11.1
11
  License: GPLv3
12
  */
13
 
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
+ define("ADROTATE_DISPLAY", '4.11.1');
26
  define("ADROTATE_VERSION", 391);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
dashboard/publisher/adverts-edit.php CHANGED
@@ -31,11 +31,17 @@ wp_enqueue_media();
31
  wp_enqueue_script('uploader-hook', plugins_url().'/adrotate/library/uploader-hook.js', array('jquery'));
32
 
33
  // Set up start and end date
 
34
  list($start_day, $start_month, $start_year) = explode(" ", date("d m Y", $schedule->starttime));
35
  list($end_day, $end_month, $end_year) = explode(" ", date("d m Y", $schedule->stoptime));
36
  $start_date = $start_day.'/'.$start_month.'/'.$start_year;
37
  $end_date = $end_day.'/'.$end_month.'/'.$end_year;
38
  $start_hour = $start_minute = $end_hour = $end_minute = '00';
 
 
 
 
 
39
 
40
  $meta_array = array();
41
  foreach($linkmeta as $meta) {
@@ -219,11 +225,11 @@ if($edit_banner->imagetype == "field") {
219
  <tr>
220
  <th><?php _e('Start date', 'adrotate'); ?></th>
221
  <td>
222
- <input tabindex="9" type="date" id="startdate_picker" name="adrotate_start_date" value="<?php echo $start_date; ?>" class="datepicker" />
223
  </td>
224
  <th><?php _e('End date', 'adrotate'); ?></th>
225
  <td>
226
- <input tabindex="10" type="date" id="enddate_picker" name="adrotate_end_date" value="<?php echo $end_date; ?>" class="datepicker" />
227
  </td>
228
  </tr>
229
  <tr>
31
  wp_enqueue_script('uploader-hook', plugins_url().'/adrotate/library/uploader-hook.js', array('jquery'));
32
 
33
  // Set up start and end date
34
+ /*
35
  list($start_day, $start_month, $start_year) = explode(" ", date("d m Y", $schedule->starttime));
36
  list($end_day, $end_month, $end_year) = explode(" ", date("d m Y", $schedule->stoptime));
37
  $start_date = $start_day.'/'.$start_month.'/'.$start_year;
38
  $end_date = $end_day.'/'.$end_month.'/'.$end_year;
39
  $start_hour = $start_minute = $end_hour = $end_minute = '00';
40
+ */
41
+ list($start_day, $start_month, $start_year, $start_hour, $start_minute) = explode(" ", date("d m Y H i", $schedule->starttime));
42
+ list($end_day, $end_month, $end_year, $end_hour, $end_minute) = explode(" ", date("d m Y H i", $schedule->stoptime));
43
+ $start_date = $start_day.'-'.$start_month.'-'.$start_year;
44
+ $end_date = $end_day.'-'.$end_month.'-'.$end_year;
45
 
46
  $meta_array = array();
47
  foreach($linkmeta as $meta) {
225
  <tr>
226
  <th><?php _e('Start date', 'adrotate'); ?></th>
227
  <td>
228
+ <input tabindex="9" type="text" id="startdate_picker" name="adrotate_start_date" value="<?php echo $start_date; ?>" class="datepicker" />
229
  </td>
230
  <th><?php _e('End date', 'adrotate'); ?></th>
231
  <td>
232
+ <input tabindex="10" type="text" id="enddate_picker" name="adrotate_end_date" value="<?php echo $end_date; ?>" class="datepicker" />
233
  </td>
234
  </tr>
235
  <tr>
images/date-arrow.png CHANGED
Binary file
library/dashboard.css CHANGED
@@ -38,25 +38,24 @@
38
  /* Tablesorter */
39
  table.tablesorter thead tr .header { text-decoration: underline; cursor: pointer; }
40
 
41
- /* Fallback DatePicker */
42
- .ui-datepicker { background: #efefef; margin: 5px auto 0; -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5); -moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5); box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5); }
43
  .ui-datepicker a { text-decoration: none; }
44
  .ui-datepicker table { width: 100%; }
45
- .ui-datepicker-header { background: #0073aa; color: #fff; font-weight: bold; line-height: 30px; border-width: 1px 0 0 0; border-style: solid; border-color: #111; }
46
  .ui-datepicker-title { text-align: center; }
47
  .ui-datepicker-prev, .ui-datepicker-next { display: inline-block; width: 30px; height: 30px; text-align: center; cursor: pointer; background-image: url('../images/date-arrow.png'); background-repeat: no-repeat; line-height: 600%; overflow: hidden; }
48
  .ui-datepicker-prev { float: left; background-position: center -30px; }
49
  .ui-datepicker-next { float: right; background-position: center 0px; }
50
  .ui-datepicker thead { background-color: #dfdfdf; border-bottom: 1px solid #bbb; }
51
  .ui-datepicker th { text-transform: uppercase; padding: 5px 0; color: #666666; }
52
- .ui-datepicker tbody td { padding: 0; border-right: 1px solid #bbb; }
53
- .ui-datepicker tbody td:last-child { border-right: 0px; }
54
- .ui-datepicker tbody tr { border-bottom: 1px solid #bbb; }
55
- .ui-datepicker tbody tr:last-child { border-bottom: 0px; }
56
  .ui-datepicker td span, .ui-datepicker td a { display: inline-block; font-weight: bold; text-align: center; width: 30px; height: 30px; line-height: 30px; color: #666666; }
57
- .ui-datepicker-calendar .ui-state-default { background: #efefef; }
58
- .ui-datepicker-calendar .ui-state-hover { background: #f7f7f7; }
59
- .ui-datepicker-calendar .ui-state-active { background: #6eafbf; color: #e0e0e0; border: 1px solid #55838f; position: relative; margin: -1px; }
 
60
  .ui-datepicker-unselectable .ui-state-default { background: #f4f4f4; color: #b4b3b3; }
61
  .ui-datepicker-calendar td:first-child .ui-state-active { width: 29px; margin-left: 0; }
62
  .ui-datepicker-calendar td:last-child .ui-state-active { width: 29px; margin-right: 0; }
38
  /* Tablesorter */
39
  table.tablesorter thead tr .header { text-decoration: underline; cursor: pointer; }
40
 
41
+ /* DatePicker */
42
+ .ui-datepicker { background: #f7f7f7; margin: 5px auto 0; -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5); -moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5); box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5); }
43
  .ui-datepicker a { text-decoration: none; }
44
  .ui-datepicker table { width: 100%; }
45
+ .ui-datepicker-header { background: #86c351; color: #fff; font-weight: bold; line-height: 30px; border: 0px; }
46
  .ui-datepicker-title { text-align: center; }
47
  .ui-datepicker-prev, .ui-datepicker-next { display: inline-block; width: 30px; height: 30px; text-align: center; cursor: pointer; background-image: url('../images/date-arrow.png'); background-repeat: no-repeat; line-height: 600%; overflow: hidden; }
48
  .ui-datepicker-prev { float: left; background-position: center -30px; }
49
  .ui-datepicker-next { float: right; background-position: center 0px; }
50
  .ui-datepicker thead { background-color: #dfdfdf; border-bottom: 1px solid #bbb; }
51
  .ui-datepicker th { text-transform: uppercase; padding: 5px 0; color: #666666; }
52
+ .ui-datepicker tbody td { padding: 0; border: 0px; }
53
+ .ui-datepicker tbody tr { border-bottom: 0px; }
 
 
54
  .ui-datepicker td span, .ui-datepicker td a { display: inline-block; font-weight: bold; text-align: center; width: 30px; height: 30px; line-height: 30px; color: #666666; }
55
+ .ui-datepicker-calendar .ui-datepicker-today { border: 1px solid #86c351; border-radius: 5px; overflow: hidden; }
56
+ .ui-datepicker-calendar .ui-state-default { background: #f7f7f7; }
57
+ .ui-datepicker-calendar .ui-state-hover { background: #efefef; border-radius: 5px; }
58
+ .ui-datepicker-calendar .ui-state-active { background: #86c351; color: #fff; border: 1px solid #e2f4d2; position: relative; margin: -1px; border-radius: 5px; }
59
  .ui-datepicker-unselectable .ui-state-default { background: #f4f4f4; color: #b4b3b3; }
60
  .ui-datepicker-calendar td:first-child .ui-state-active { width: 29px; margin-left: 0; }
61
  .ui-datepicker-calendar td:last-child .ui-state-active { width: 29px; margin-right: 0; }
library/{jquery.adrotate.datepicker.fallback.js → jquery.adrotate.datepicker.js} RENAMED
@@ -1,7 +1,7 @@
1
  /*
2
  Fallback datepicker for non-compliant browsers
3
  Arnan de Gans (http://www.arnan.me)
4
- Version: 0.1
5
  Original code: Arnan de Gans
6
  */
7
 
@@ -17,12 +17,7 @@ Original code: Arnan de Gans
17
 
18
  (function($) {
19
  $(document).ready(function() {
20
- var elem = document.createElement('input');
21
- elem.setAttribute('type', 'date');
22
-
23
- if(elem.type === 'text') {
24
- $('#startdate_picker').datepicker({dateFormat: 'dd/mm/yy'});
25
- $('#enddate_picker').datepicker({dateFormat: 'dd/mm/yy'});
26
- }
27
  });
28
  }(jQuery));
1
  /*
2
  Fallback datepicker for non-compliant browsers
3
  Arnan de Gans (http://www.arnan.me)
4
+ Version: 0.2
5
  Original code: Arnan de Gans
6
  */
7
 
17
 
18
  (function($) {
19
  $(document).ready(function() {
20
+ $('#startdate_picker').datepicker({dateFormat: 'dd-mm-yy'});
21
+ $('#enddate_picker').datepicker({dateFormat: 'dd-mm-yy'});
 
 
 
 
 
22
  });
23
  }(jQuery));
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.arnan.me/#donate
4
  Tags: ad, advert, adsense, advertising, doubleclick, responsive, ad rotator, ad manager, banner manager, advert manager, analytics, advertisement,
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
- Stable tag: 4.11
8
  License: GPLv3
9
 
10
  Monetise your website with adverts while keeping things simple. Start making money today!
@@ -99,38 +99,24 @@ You can also post your questions on the [forum](https://ajdg.solutions/forums/?u
99
  Be a Professional and go Pro. With [AdRotate Professional](https://ajdg.solutions/plugins/adrotate-for-wordpress/?utm_campaign=adrotate-page&utm_medium=readme&utm_source=adrotate)!
100
 
101
 
102
- = 4.11 FREE =
103
- * [change] Widgets loaded via WordPress method
104
- * [change] Dashboard tweaks and improvements
105
- * [change] Caching notifications optimised
106
- * [fix] Datepickers not working in Safari (macOS)
107
-
108
- = 4.13 PRO =
109
- * Legacy widgets removed, set up new widgets!
110
- * [new] Delete unused advert images from Maintenance
111
- * [change] 'AdRotate (Old)' widget removed
112
- * [change] Widgets loaded via WordPress method
113
- * [change] Dashboard tweaks and improvements
114
- * [change] Caching notifications optimised
115
- * [change] Redid the maintenance dashboard
116
- * [fix] Google Adsense event names inconsistent
117
- * [fix] Google Adsense showing wrong banner names
118
- * [fix] Google Adsense output incorrent
119
- * [fix] Google Adsense not applying data values
120
- * [fix] Export column headers mixed up for some users
121
- * [fix] Datepickers not working in Safari (macOS)
122
- * [fix] Not being able to select gtag.js in settings
123
- * [fix] Nothing showing in network widget on primary site
124
- * [fix] Nothing showing in network widget if there are no groups
125
 
126
  All recent changes are available on the [AdRotate website](https://ajdg.solutions/plugins/adrotate-for-wordpress/development/?utm_campaign=development&utm_medium=readme&utm_source=adrotate).
127
 
128
  == Upgrade Notice ==
129
 
130
- * [change] Widgets loaded via WordPress method
131
- * [change] Dashboard tweaks and improvements
132
- * [change] Caching notifications optimised
133
- * [fix] Datepickers not working in Safari (macOS)
134
 
135
  == Screenshots ==
136
 
4
  Tags: ad, advert, adsense, advertising, doubleclick, responsive, ad rotator, ad manager, banner manager, advert manager, analytics, advertisement,
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
+ Stable tag: 4.11.1
8
  License: GPLv3
9
 
10
  Monetise your website with adverts while keeping things simple. Start making money today!
99
  Be a Professional and go Pro. With [AdRotate Professional](https://ajdg.solutions/plugins/adrotate-for-wordpress/?utm_campaign=adrotate-page&utm_medium=readme&utm_source=adrotate)!
100
 
101
 
102
+ = 4.11.1 FREE =
103
+ * [fix] Date pickers not setting the right dates for some users
104
+ * [fix] Editing schedules now sets right date format in all browsers
105
+ * [new] More attractive theme for date pickers
106
+
107
+ = 4.13.1 PRO =
108
+ * [fix] Date pickers not setting the right dates for some users
109
+ * [fix] Editing schedules now sets right date format in all browsers
110
+ * [fix] Force-deactivating old licenses working more reliable
111
+ * [new] More attractive theme for date pickers
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  All recent changes are available on the [AdRotate website](https://ajdg.solutions/plugins/adrotate-for-wordpress/development/?utm_campaign=development&utm_medium=readme&utm_source=adrotate).
114
 
115
  == Upgrade Notice ==
116
 
117
+ * [fix] Date pickers not setting the right dates for some users
118
+ * [fix] Editing schedules now sets right date format in all browsers
119
+ * [new] More attractive theme for date pickers
 
120
 
121
  == Screenshots ==
122