AdRotate Banner Manager - Version 4.12

Version Description

FREE = * [fix] Post Injection showing adverts in the wrong categories * [change] Moved tracker for dynamic groups into Session Storage

Download this release

Release Info

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

Code changes from version 4.11.2 to 4.12

adrotate-output.php CHANGED
@@ -270,7 +270,7 @@ function adrotate_inject_posts($post_content) {
270
  if($group_count > 0) {
271
  $before = $after = $inside = 0;
272
  foreach($group_array as $group_id => $group) {
273
- if(is_page($group['ids']) OR is_category($group['ids']) OR in_category($group['ids'])) {
274
  // Advert in front of content
275
  if(($group['location'] == 1 OR $group['location'] == 3) AND $before == 0) {
276
  $post_content = adrotate_group($group_id).$post_content;
@@ -821,7 +821,7 @@ function adrotate_help_info() {
821
  'id' => 'adrotate_thanks',
822
  'title' => 'Thank You',
823
  'content' => '<h4>Thank you for using AdRotate</h4><p>AdRotate is growing to be one of the most popular WordPress plugins for Advertising and is a household name for many companies around the world. AdRotate wouldn\'t be possible without your support and my life wouldn\'t be what it is today without your help.</p><p><em>- Arnan</em></p>'.
824
- '<p><strong>Facebook:</strong> <a href="https://www.facebook.com/adegans/" target="_blank">Facebook</a>. <strong>Business:</strong> <a href="https://ajdg.solutions/" target="_blank">ajdg.solutions</a> <strong>Personal:</strong> <a href="http://www.arnan.me" target="_blank">arnan.me</a>.</p>'
825
  )
826
  );
827
  }
@@ -836,6 +836,7 @@ function adrotate_action_links($links) {
836
  $custom_actions['adrotate-pro'] = sprintf('<a href="%s" target="_blank">%s</a>', 'https://ajdg.solutions/cart/?add-to-cart=1124&utm_campaign=adrotate&utm_medium=action_links&utm_source=adrotate', 'Get Pro');
837
  $custom_actions['adrotate-help'] = sprintf('<a href="%s" target="_blank">%s</a>', 'https://ajdg.solutions/forums/?utm_campaign=adrotate&utm_medium=action_links&utm_source=adrotate', 'Support');
838
  $custom_actions['adrotate-arnan'] = sprintf('<a href="%s" target="_blank">%s</a>', 'http://www.arnan.me/?utm_campaign=adrotate&utm_medium=action_links&utm_source=adrotate', 'arnan.me');
 
839
 
840
  return array_merge($custom_actions, $links);
841
  }
270
  if($group_count > 0) {
271
  $before = $after = $inside = 0;
272
  foreach($group_array as $group_id => $group) {
273
+ if(is_page($group['ids']) OR has_category($group['ids'])) {
274
  // Advert in front of content
275
  if(($group['location'] == 1 OR $group['location'] == 3) AND $before == 0) {
276
  $post_content = adrotate_group($group_id).$post_content;
821
  'id' => 'adrotate_thanks',
822
  'title' => 'Thank You',
823
  'content' => '<h4>Thank you for using AdRotate</h4><p>AdRotate is growing to be one of the most popular WordPress plugins for Advertising and is a household name for many companies around the world. AdRotate wouldn\'t be possible without your support and my life wouldn\'t be what it is today without your help.</p><p><em>- Arnan</em></p>'.
824
+ '<p><strong>Telegram:</strong> <a href="https://t.me/arnanme" target="_blank">Channel</a>, <a href="https://t.me/arnandegans" target="_blank">Messages</a>. <strong>Facebook:</strong> <a href="https://www.facebook.com/adegans/" target="_blank">Facebook</a>. <strong>Business:</strong> <a href="https://ajdg.solutions/" target="_blank">ajdg.solutions</a>. <strong>Personal:</strong> <a href="http://www.arnan.me" target="_blank">arnan.me</a>.</p>'
825
  )
826
  );
827
  }
836
  $custom_actions['adrotate-pro'] = sprintf('<a href="%s" target="_blank">%s</a>', 'https://ajdg.solutions/cart/?add-to-cart=1124&utm_campaign=adrotate&utm_medium=action_links&utm_source=adrotate', 'Get Pro');
837
  $custom_actions['adrotate-help'] = sprintf('<a href="%s" target="_blank">%s</a>', 'https://ajdg.solutions/forums/?utm_campaign=adrotate&utm_medium=action_links&utm_source=adrotate', 'Support');
838
  $custom_actions['adrotate-arnan'] = sprintf('<a href="%s" target="_blank">%s</a>', 'http://www.arnan.me/?utm_campaign=adrotate&utm_medium=action_links&utm_source=adrotate', 'arnan.me');
839
+ $custom_actions['adrotate-telegram'] = sprintf('<a href="%s" target="_blank">%s</a>', 'https://t.me/arnanme', 'Telegram');
840
 
841
  return array_merge($custom_actions, $links);
842
  }
adrotate.php CHANGED
@@ -3,11 +3,11 @@
3
  Plugin Name: AdRotate
4
  Plugin URI: https://ajdg.solutions/products/adrotate-for-wordpress/
5
  Author: Arnan de Gans
6
- 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.2
11
  License: GPLv3
12
  */
13
 
@@ -22,7 +22,7 @@ License: GPLv3
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
- define("ADROTATE_DISPLAY", '4.11.2');
26
  define("ADROTATE_VERSION", 391);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
3
  Plugin Name: AdRotate
4
  Plugin URI: https://ajdg.solutions/products/adrotate-for-wordpress/
5
  Author: Arnan de Gans
6
+ Author URI: https://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.12
11
  License: GPLv3
12
  */
13
 
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
+ define("ADROTATE_DISPLAY", '4.12');
26
  define("ADROTATE_VERSION", 391);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
dashboard/adrotatepro.php CHANGED
@@ -48,7 +48,7 @@
48
  <h3><?php _e('AdRotate is brought to you by', 'adrotate'); ?></h3>
49
  <div class="postbox-ajdg">
50
  <div class="inside">
51
- <p><center><a href="http://www.arnan.me" title="Visit Arnan's website"><img src="<?php echo plugins_url("/images/arnan.png", dirname(__FILE__)); ?>" alt="Arnan.me website" /></a></center></p>
52
  </div>
53
  </div>
54
 
48
  <h3><?php _e('AdRotate is brought to you by', 'adrotate'); ?></h3>
49
  <div class="postbox-ajdg">
50
  <div class="inside">
51
+ <p><center><a href="https://www.arnan.me" title="Visit Arnan's website" target="_blank"><img src="<?php echo plugins_url("/images/social/arnanme.png", dirname(__FILE__)); ?>" alt="Arnan de Gans website" /></a><a href="https://ajdg.solutions" title="Visit the AdRotate website" target="_blank"><img src="<?php echo plugins_url("/images/social/ajdg.png", dirname(__FILE__)); ?>" alt="AJdG Solutions website" /></a><a href="https://t.me/arnanme" title="Arnan de Gans Telegram channel" target="_blank"><img src="<?php echo plugins_url("/images/social/telegram.png", dirname(__FILE__)); ?>" alt="Telegram channel" /></a><a href="https://fb.me/adegans" title="Arnan de Gans on Facebook" target="_blank"><img src="<?php echo plugins_url("/images/social/facebook.png", dirname(__FILE__)); ?>" alt="Arnan de Gans on Facebook" /></a></center></p>
52
  </div>
53
  </div>
54
 
dashboard/info.php CHANGED
@@ -59,7 +59,7 @@ $partner = mt_rand(1,3);
59
  <h3><?php _e('Arnan de Gans News & Updates', 'adrotate'); ?></h3>
60
  <div class="postbox-ajdg">
61
  <div class="inside">
62
- <p><center><a href="http://www.arnan.me" title="Visit Arnan's website"><img src="<?php echo plugins_url("/images/arnan.png", dirname(__FILE__)); ?>" alt="Arnan.me website" /></a></center></p>
63
  <?php wp_widget_rss_output(array(
64
  'url' => 'http://ajdg.solutions/feed/',
65
  'items' => 3,
59
  <h3><?php _e('Arnan de Gans News & Updates', 'adrotate'); ?></h3>
60
  <div class="postbox-ajdg">
61
  <div class="inside">
62
+ <p><center><a href="https://www.arnan.me" title="Visit Arnan's website" target="_blank"><img src="<?php echo plugins_url("/images/social/arnanme.png", dirname(__FILE__)); ?>" alt="Arnan de Gans website" /></a><a href="https://ajdg.solutions" title="Visit the AdRotate website" target="_blank"><img src="<?php echo plugins_url("/images/social/ajdg.png", dirname(__FILE__)); ?>" alt="AJdG Solutions website" /></a><a href="https://t.me/arnanme" title="Arnan de Gans Telegram channel" target="_blank"><img src="<?php echo plugins_url("/images/social/telegram.png", dirname(__FILE__)); ?>" alt="Telegram channel" /></a><a href="https://fb.me/adegans" title="Arnan de Gans on Facebook" target="_blank"><img src="<?php echo plugins_url("/images/social/facebook.png", dirname(__FILE__)); ?>" alt="Arnan de Gans on Facebook" /></a></center></p>
63
  <?php wp_widget_rss_output(array(
64
  'url' => 'http://ajdg.solutions/feed/',
65
  'items' => 3,
images/arnan.png DELETED
Binary file
images/social/ajdg.png ADDED
Binary file
images/social/arnanme.png ADDED
Binary file
images/social/facebook.png ADDED
Binary file
images/social/telegram.png ADDED
Binary file
library/jquery.adrotate.dyngroup.js CHANGED
@@ -1,14 +1,14 @@
1
- /****************************************************************************************
2
- * Dynamic advert rotation for AdRotate *
3
- * Arnan de Gans from AJdG Solutions (http://www.arnan.me.net) *
4
- * Version: 0.8.1 *
5
- * With help from: Mathias Joergensen (http://www.moofy.me), Fraser Munro *
6
- * Original code: Arnan de Gans *
7
- ****************************************************************************************/
8
 
9
  /* ------------------------------------------------------------------------------------
10
  * COPYRIGHT AND TRADEMARK NOTICE
11
- * Copyright 2008-2015 Arnan de Gans. All Rights Reserved.
12
  * ADROTATE is a trademark of Arnan de Gans.
13
 
14
  * COPYRIGHT NOTICES AND ALL THE COMMENTS SHOULD REMAIN INTACT.
@@ -72,38 +72,20 @@ speed : Time each slide is shown [integer: milliseconds, defaults to 3000]
72
 
73
  function impressiontracker(tracker) {
74
  admeta = atob(tracker).split(',');
 
75
  var now = Math.round(Date.now()/1000);
76
- var unixtime = now - admeta[3];
 
77
 
78
- cookietime = readCookie('adrotate-'+admeta[0]);
79
- if(cookietime <= unixtime) {
80
- $.post(
81
- impression_object.ajax_url,
82
- {'action': 'adrotate_impression','track': tracker}
83
- );
84
- createCookie('adrotate-'+admeta[0], now);
85
- delete tracker;
86
  }
87
- }
88
-
89
- function createCookie(name, value) {
90
- var expires;
91
- var date = new Date();
92
 
93
- date.setTime(date.getTime() + 86400000);
94
- expires = "; expires=" + date.toGMTString();
95
- document.cookie = escape(name) + "=" + escape(value) + expires + "; path=/";
96
- }
97
-
98
- function readCookie(name) {
99
- var nameEQ = escape(name) + "=";
100
- var ca = document.cookie.split(';');
101
- for (var i = 0; i < ca.length; i++) {
102
- var c = ca[i];
103
- while (c.charAt(0) === ' ') c = c.substring(1, c.length);
104
- if (c.indexOf(nameEQ) === 0) return unescape(c.substring(nameEQ.length, c.length));
105
- }
106
- return 0;
107
  }
108
  });
109
  return this;
1
+ /*
2
+ Dynamic advert rotation for AdRotate
3
+ Arnan de Gans (http://www.arnan.me)
4
+ Version: 1.0
5
+ With help from: Mathias Joergensen (http://www.moofy.me), Fraser Munro
6
+ Original code: Arnan de Gans
7
+ */
8
 
9
  /* ------------------------------------------------------------------------------------
10
  * COPYRIGHT AND TRADEMARK NOTICE
11
+ * Copyright 2008-2018 Arnan de Gans. All Rights Reserved.
12
  * ADROTATE is a trademark of Arnan de Gans.
13
 
14
  * COPYRIGHT NOTICES AND ALL THE COMMENTS SHOULD REMAIN INTACT.
72
 
73
  function impressiontracker(tracker) {
74
  admeta = atob(tracker).split(',');
75
+ var name = escape('adrotate-'+admeta[0]);
76
  var now = Math.round(Date.now()/1000);
77
+ var expired = now - admeta[3];
78
+ var session = sessionStorage.getItem(name); // Get session data
79
 
80
+ if(session == null) { // New session, no previous data
81
+ session = 0;
 
 
 
 
 
 
82
  }
 
 
 
 
 
83
 
84
+ if(session <= expired) { // Count new impression?
85
+ $.post(impression_object.ajax_url, {'action': 'adrotate_impression','track': tracker});
86
+ sessionStorage.setItem(name, now);
87
+ delete tracker;
88
+ }
 
 
 
 
 
 
 
 
 
89
  }
90
  });
91
  return this;
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === AdRotate Banner Manager ===
2
  Contributors: adegans
3
- 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.2
8
  License: GPLv3
9
 
10
  Monetise your website with adverts while keeping things simple. Start making money today!
@@ -99,34 +99,23 @@ 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.2 FREE =
103
- * [rollback] Post Injection to previous version
104
- * [fix] Shortcodes for W3 Total Cache not reliable for some users
105
 
106
- = 4.11.1 FREE =
107
- * [fix] Date pickers not setting the right dates for some users
108
- * [fix] Editing schedules now sets right date format in all browsers
109
- * [new] More attractive theme for date pickers
110
-
111
- = 4.13.2 PRO =
112
- * [rollback] Post Injection to previous version
113
- * [fix] Advert widget looking for a network variable
114
- * [fix] Group widget looking for a network variable
115
- * [fix] Shortcodes for W3 Total Cache not reliable for some users
116
- * [fix] Legacy licenses not able to activate or de-activate
117
-
118
- = 4.13.1 PRO =
119
- * [fix] Date pickers not setting the right dates for some users
120
- * [fix] Editing schedules now sets right date format in all browsers
121
- * [fix] Force-deactivating old licenses working more reliable
122
- * [new] More attractive theme for date pickers
123
 
124
  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).
125
 
126
  == Upgrade Notice ==
127
 
128
- * [rollback] Post Injection to previous version
129
- * [fix] Shortcodes for W3 Total Cache not reliable for some users
130
 
131
  == Screenshots ==
132
 
1
  === AdRotate Banner Manager ===
2
  Contributors: adegans
3
+ Donate link: https://www.arnan.me/donate.html
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.12
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.12 FREE =
103
+ * [fix] Post Injection showing adverts in the wrong categories
104
+ * [change] Moved tracker for dynamic groups into Session Storage
105
 
106
+ = 4.14 PRO =
107
+ * [fix] Advertisers having control over their own permissions
108
+ * [fix] AdRotate Geo not always using cookie when it should
109
+ * [fix] Post Injection showing adverts in the wrong categories
110
+ * [change] Migrate FreegeoIP to Ipstack (requires free account)
111
+ * [change] Moved tracker for dynamic groups into Session Storage
 
 
 
 
 
 
 
 
 
 
 
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] Post Injection showing adverts in the wrong categories
118
+ * [change] Moved tracker for dynamic groups into Session Storage
119
 
120
  == Screenshots ==
121