Version Description
FREE = * [fix] Output of Dynamic groups and Block groups * [fix] Notice error on schedules page * [fix] Typo on AdRotate Info page
Download this release
Release Info
Developer | adegans |
Plugin | AdRotate Banner Manager |
Version | 3.11.6 |
Comparing to | |
See all releases |
Code changes from version 3.11.5 to 3.11.6
- adrotate-functions.php +6 -7
- adrotate-output.php +10 -12
- adrotate.php +3 -3
- readme.txt +14 -2
adrotate-functions.php
CHANGED
@@ -20,10 +20,9 @@
|
|
20 |
function adrotate_shortcode($atts, $content = null) {
|
21 |
global $adrotate_config;
|
22 |
|
23 |
-
$banner_id = $group_ids =
|
24 |
if(!empty($atts['banner'])) $banner_id = trim($atts['banner'], "\r\t ");
|
25 |
if(!empty($atts['group'])) $group_ids = trim($atts['group'], "\r\t ");
|
26 |
-
if(!empty($atts['nowrapper'])) $nowrapper = trim($atts['nowrapper'], "\r\t "); // Optional (override)
|
27 |
if(!empty($atts['fallback'])) $fallback = 0; // Not supported in free version
|
28 |
if(!empty($atts['weight'])) $weight = 0; // Not supported in free version
|
29 |
if(!empty($atts['site'])) $site = 0; // Not supported in free version
|
@@ -33,14 +32,14 @@ function adrotate_shortcode($atts, $content = null) {
|
|
33 |
if($adrotate_config['w3caching'] == "Y") $output .= '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
34 |
|
35 |
if($banner_id > 0 AND $group_ids == 0) { // Show one Ad
|
36 |
-
if($adrotate_config['supercache'] == "Y") $output .= '<!--mfunc echo adrotate_ad('.$banner_id.', true, 0, 0
|
37 |
-
$output .= adrotate_ad($banner_id, true, 0, 0
|
38 |
if($adrotate_config['supercache'] == "Y") $output .= '<!--/mfunc-->';
|
39 |
}
|
40 |
|
41 |
if($banner_id == 0 AND $group_ids > 0) { // Show group
|
42 |
-
if($adrotate_config['supercache'] == "Y") $output .= '<!--mfunc echo adrotate_group('.$group_ids.', 0, 0, 0
|
43 |
-
$output .= adrotate_group($group_ids, 0, 0, 0
|
44 |
if($adrotate_config['supercache'] == "Y") $output .= '<!--/mfunc-->';
|
45 |
}
|
46 |
|
@@ -58,7 +57,7 @@ function adrotate_shortcode($atts, $content = null) {
|
|
58 |
Since: 3.9.8
|
59 |
-------------------------------------------------------------*/
|
60 |
function adrotate_is_networked() {
|
61 |
-
if(!function_exists(
|
62 |
|
63 |
if(is_plugin_active_for_network(ADROTATE_FOLDER.'/adrotate.php')) {
|
64 |
return true;
|
20 |
function adrotate_shortcode($atts, $content = null) {
|
21 |
global $adrotate_config;
|
22 |
|
23 |
+
$banner_id = $group_ids = 0;
|
24 |
if(!empty($atts['banner'])) $banner_id = trim($atts['banner'], "\r\t ");
|
25 |
if(!empty($atts['group'])) $group_ids = trim($atts['group'], "\r\t ");
|
|
|
26 |
if(!empty($atts['fallback'])) $fallback = 0; // Not supported in free version
|
27 |
if(!empty($atts['weight'])) $weight = 0; // Not supported in free version
|
28 |
if(!empty($atts['site'])) $site = 0; // Not supported in free version
|
32 |
if($adrotate_config['w3caching'] == "Y") $output .= '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
33 |
|
34 |
if($banner_id > 0 AND $group_ids == 0) { // Show one Ad
|
35 |
+
if($adrotate_config['supercache'] == "Y") $output .= '<!--mfunc echo adrotate_ad('.$banner_id.', true, 0, 0) -->';
|
36 |
+
$output .= adrotate_ad($banner_id, true, 0, 0);
|
37 |
if($adrotate_config['supercache'] == "Y") $output .= '<!--/mfunc-->';
|
38 |
}
|
39 |
|
40 |
if($banner_id == 0 AND $group_ids > 0) { // Show group
|
41 |
+
if($adrotate_config['supercache'] == "Y") $output .= '<!--mfunc echo adrotate_group('.$group_ids.', 0, 0, 0) -->';
|
42 |
+
$output .= adrotate_group($group_ids, 0, 0, 0);
|
43 |
if($adrotate_config['supercache'] == "Y") $output .= '<!--/mfunc-->';
|
44 |
}
|
45 |
|
57 |
Since: 3.9.8
|
58 |
-------------------------------------------------------------*/
|
59 |
function adrotate_is_networked() {
|
60 |
+
if(!function_exists('is_plugin_active_for_network')) require_once(ABSPATH.'/wp-admin/includes/plugin.php');
|
61 |
|
62 |
if(is_plugin_active_for_network(ADROTATE_FOLDER.'/adrotate.php')) {
|
63 |
return true;
|
adrotate-output.php
CHANGED
@@ -13,11 +13,11 @@
|
|
13 |
Name: adrotate_ad
|
14 |
|
15 |
Purpose: Show requested ad
|
16 |
-
Receive: $banner_id, $individual, $group, $site
|
17 |
Return: $output
|
18 |
Since: 3.0
|
19 |
-------------------------------------------------------------*/
|
20 |
-
function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0
|
21 |
global $wpdb, $adrotate_config, $adrotate_debug;
|
22 |
|
23 |
$output = '';
|
@@ -39,12 +39,11 @@ function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0, $
|
|
39 |
}
|
40 |
|
41 |
if($selected) {
|
42 |
-
$nowrapper = ($nowrapper == 1) ? true : false;
|
43 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $banner->image);
|
44 |
|
45 |
-
if($individual == true
|
46 |
$output .= adrotate_ad_output($banner->id, 0, $banner->bannercode, $banner->tracker, $banner->link, $image, $banner->responsive);
|
47 |
-
if($individual == true
|
48 |
|
49 |
if($adrotate_config['stats'] == 1 AND $banner->tracker == "Y") {
|
50 |
adrotate_count_impression($banner->id, 0, 0);
|
@@ -64,11 +63,11 @@ function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0, $
|
|
64 |
Name: adrotate_group
|
65 |
|
66 |
Purpose: Fetch ads in specified group(s) and show a random ad
|
67 |
-
Receive: $group_ids, $fallback, $weight, $site
|
68 |
Return: $output
|
69 |
Since: 3.0
|
70 |
-------------------------------------------------------------*/
|
71 |
-
function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0
|
72 |
global $wpdb, $adrotate_config, $adrotate_debug;
|
73 |
|
74 |
$output = $group_select = '';
|
@@ -135,11 +134,10 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0, $nowr
|
|
135 |
$array_count = count($selected);
|
136 |
if($array_count > 0) {
|
137 |
$before = $after = '';
|
138 |
-
$nowrapper = ($nowrapper == 1) ? true : false;
|
139 |
$before = str_replace('%id%', $group_array[0], stripslashes(html_entity_decode($group->wrapper_before, ENT_QUOTES)));
|
140 |
$after = str_replace('%id%', $group_array[0], stripslashes(html_entity_decode($group->wrapper_after, ENT_QUOTES)));
|
141 |
|
142 |
-
|
143 |
|
144 |
if($group->modus == 1) { // Dynamic ads
|
145 |
$i = 1;
|
@@ -191,16 +189,16 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0, $nowr
|
|
191 |
|
192 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $selected[$banner_id]->image);
|
193 |
|
194 |
-
|
195 |
$output .= $before.adrotate_ad_output($selected[$banner_id]->id, $group->id, $selected[$banner_id]->bannercode, $selected[$banner_id]->tracker, $selected[$banner_id]->link, $image, $selected[$banner_id]->responsive).$after;
|
196 |
-
|
197 |
|
198 |
if($adrotate_config['stats'] == 1){
|
199 |
adrotate_count_impression($selected[$banner_id]->id, $group->id, 0);
|
200 |
}
|
201 |
}
|
202 |
|
203 |
-
|
204 |
|
205 |
unset($selected);
|
206 |
} else {
|
13 |
Name: adrotate_ad
|
14 |
|
15 |
Purpose: Show requested ad
|
16 |
+
Receive: $banner_id, $individual, $group, $site
|
17 |
Return: $output
|
18 |
Since: 3.0
|
19 |
-------------------------------------------------------------*/
|
20 |
+
function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
|
21 |
global $wpdb, $adrotate_config, $adrotate_debug;
|
22 |
|
23 |
$output = '';
|
39 |
}
|
40 |
|
41 |
if($selected) {
|
|
|
42 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $banner->image);
|
43 |
|
44 |
+
if($individual == true) $output .= '<div class="a-single a-'.$banner->id.'">';
|
45 |
$output .= adrotate_ad_output($banner->id, 0, $banner->bannercode, $banner->tracker, $banner->link, $image, $banner->responsive);
|
46 |
+
if($individual == true) $output .= '</div>';
|
47 |
|
48 |
if($adrotate_config['stats'] == 1 AND $banner->tracker == "Y") {
|
49 |
adrotate_count_impression($banner->id, 0, 0);
|
63 |
Name: adrotate_group
|
64 |
|
65 |
Purpose: Fetch ads in specified group(s) and show a random ad
|
66 |
+
Receive: $group_ids, $fallback, $weight, $site
|
67 |
Return: $output
|
68 |
Since: 3.0
|
69 |
-------------------------------------------------------------*/
|
70 |
+
function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
|
71 |
global $wpdb, $adrotate_config, $adrotate_debug;
|
72 |
|
73 |
$output = $group_select = '';
|
134 |
$array_count = count($selected);
|
135 |
if($array_count > 0) {
|
136 |
$before = $after = '';
|
|
|
137 |
$before = str_replace('%id%', $group_array[0], stripslashes(html_entity_decode($group->wrapper_before, ENT_QUOTES)));
|
138 |
$after = str_replace('%id%', $group_array[0], stripslashes(html_entity_decode($group->wrapper_after, ENT_QUOTES)));
|
139 |
|
140 |
+
$output .= '<div class="g g-'.$group->id.'">';
|
141 |
|
142 |
if($group->modus == 1) { // Dynamic ads
|
143 |
$i = 1;
|
189 |
|
190 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $selected[$banner_id]->image);
|
191 |
|
192 |
+
$output .= '<div class="g-single a-'.$selected[$banner_id]->id.'">';
|
193 |
$output .= $before.adrotate_ad_output($selected[$banner_id]->id, $group->id, $selected[$banner_id]->bannercode, $selected[$banner_id]->tracker, $selected[$banner_id]->link, $image, $selected[$banner_id]->responsive).$after;
|
194 |
+
$output .= '</div>';
|
195 |
|
196 |
if($adrotate_config['stats'] == 1){
|
197 |
adrotate_count_impression($selected[$banner_id]->id, $group->id, 0);
|
198 |
}
|
199 |
}
|
200 |
|
201 |
+
$output .= '</div>';
|
202 |
|
203 |
unset($selected);
|
204 |
} else {
|
adrotate.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://ajdg.solutions/products/adrotate-for-wordpress/?pk_campaign=
|
|
5 |
Author: Arnan de Gans of AJdG Solutions
|
6 |
Author URI: http://ajdg.solutions/?pk_campaign=adrotatefree-pluginpage&pk_kwd=authorurl
|
7 |
Description: Used on over a hundred thousand websites and by even more people! AdRotate is the popular choice for monetizing your website with adverts while keeping things simple.
|
8 |
-
Version: 3.11.
|
9 |
License: GPLv3
|
10 |
*/
|
11 |
|
@@ -20,7 +20,7 @@ License: GPLv3
|
|
20 |
------------------------------------------------------------------------------------ */
|
21 |
|
22 |
/*--- AdRotate values ---------------------------------------*/
|
23 |
-
define("ADROTATE_DISPLAY", '3.11.
|
24 |
define("ADROTATE_VERSION", 379);
|
25 |
define("ADROTATE_DB_VERSION", 51);
|
26 |
define("ADROTATE_FOLDER", 'adrotate');
|
@@ -470,7 +470,7 @@ function adrotate_manage_schedules() {
|
|
470 |
if($schedules) {
|
471 |
$class = '';
|
472 |
foreach($schedules as $schedule) {
|
473 |
-
$schedulesmeta = $wpdb->get_results("SELECT `ad` FROM `".$wpdb->prefix."adrotate_linkmeta` WHERE `group` = 0 AND `
|
474 |
if($schedule->maxclicks == 0) $schedule->maxclicks = 'unlimited';
|
475 |
if($schedule->maximpressions == 0) $schedule->maximpressions = 'unlimited';
|
476 |
|
5 |
Author: Arnan de Gans of AJdG Solutions
|
6 |
Author URI: http://ajdg.solutions/?pk_campaign=adrotatefree-pluginpage&pk_kwd=authorurl
|
7 |
Description: Used on over a hundred thousand websites and by even more people! AdRotate is the popular choice for monetizing your website with adverts while keeping things simple.
|
8 |
+
Version: 3.11.6
|
9 |
License: GPLv3
|
10 |
*/
|
11 |
|
20 |
------------------------------------------------------------------------------------ */
|
21 |
|
22 |
/*--- AdRotate values ---------------------------------------*/
|
23 |
+
define("ADROTATE_DISPLAY", '3.11.6');
|
24 |
define("ADROTATE_VERSION", 379);
|
25 |
define("ADROTATE_DB_VERSION", 51);
|
26 |
define("ADROTATE_FOLDER", 'adrotate');
|
470 |
if($schedules) {
|
471 |
$class = '';
|
472 |
foreach($schedules as $schedule) {
|
473 |
+
$schedulesmeta = $wpdb->get_results("SELECT `ad` FROM `".$wpdb->prefix."adrotate_linkmeta` WHERE `group` = 0 AND `user` = 0 AND `schedule` = ".$schedule->id.";");
|
474 |
if($schedule->maxclicks == 0) $schedule->maxclicks = 'unlimited';
|
475 |
if($schedule->maximpressions == 0) $schedule->maximpressions = 'unlimited';
|
476 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://meandmymac.net/donate/?pk_campaign=adrotatefree-readme&pk_kw
|
|
4 |
Tags: ads, banner, commercial, admin, advertise, adrotator, 2013, plugin, random, rotator, ad, advertising, advertisement, block, blocks, advertiser, publisher, adsense, geo, geolocation, geotarget, chitika, clickbank, broadstreet, banner manager,advert manager, campaign manager, export, import, freegeoip, geoplugin, maxmind, referrer, email, menu, statistics, stats, report, advert, adverts, best, great, 2014, geoselect, geobytes, schedules, schedule, monetize, header, widget, javascript, jquery, tracking, clicks, impressions, rotate, zone, zones, sidebar, footer, content, posts, pages
|
5 |
Requires at least: 3.8, PHP5.3
|
6 |
Tested up to: 4.2.2
|
7 |
-
Stable tag: 3.11.
|
8 |
|
9 |
Used on over a hundred thousand websites and by even more people! With over a million downloads AdRotate is the popular choice for monetizing your website with adverts while keeping things simple. Make money with advertising while you do other things. Make making money easy!
|
10 |
|
@@ -90,6 +90,11 @@ If that's not enough you can post on the [forum](https://ajdg.solutions/forums/?
|
|
90 |
|
91 |
== Changelog ==
|
92 |
|
|
|
|
|
|
|
|
|
|
|
93 |
= 3.11.5 FREE =
|
94 |
* [tweak] Minor tweaks and improvements to dashboards
|
95 |
* [fix] More accurate regexes for AdRotate Tracker
|
@@ -97,7 +102,9 @@ If that's not enough you can post on the [forum](https://ajdg.solutions/forums/?
|
|
97 |
* [fix] Unwanted advert after content with post injection on some settings
|
98 |
* [i18n] Updated strings for all language files
|
99 |
|
100 |
-
|
|
|
|
|
101 |
|
102 |
= 3.12.7 PRO =
|
103 |
* [new] Show select adverts on mobile only when in a group
|
@@ -120,6 +127,11 @@ NOTE: Unsolicited offers, parnterships, job offers, promotional emails or produc
|
|
120 |
|
121 |
== Upgrade Notice ==
|
122 |
|
|
|
|
|
|
|
|
|
|
|
123 |
= 3.11.5 FREE =
|
124 |
* [tweak] Minor tweaks and improvements to dashboards
|
125 |
* [fix] More accurate regexes for AdRotate Tracker
|
4 |
Tags: ads, banner, commercial, admin, advertise, adrotator, 2013, plugin, random, rotator, ad, advertising, advertisement, block, blocks, advertiser, publisher, adsense, geo, geolocation, geotarget, chitika, clickbank, broadstreet, banner manager,advert manager, campaign manager, export, import, freegeoip, geoplugin, maxmind, referrer, email, menu, statistics, stats, report, advert, adverts, best, great, 2014, geoselect, geobytes, schedules, schedule, monetize, header, widget, javascript, jquery, tracking, clicks, impressions, rotate, zone, zones, sidebar, footer, content, posts, pages
|
5 |
Requires at least: 3.8, PHP5.3
|
6 |
Tested up to: 4.2.2
|
7 |
+
Stable tag: 3.11.6
|
8 |
|
9 |
Used on over a hundred thousand websites and by even more people! With over a million downloads AdRotate is the popular choice for monetizing your website with adverts while keeping things simple. Make money with advertising while you do other things. Make making money easy!
|
10 |
|
90 |
|
91 |
== Changelog ==
|
92 |
|
93 |
+
= 3.11.6 FREE =
|
94 |
+
* [fix] Output of Dynamic groups and Block groups
|
95 |
+
* [fix] Notice error on schedules page
|
96 |
+
* [fix] Typo on AdRotate Info page
|
97 |
+
|
98 |
= 3.11.5 FREE =
|
99 |
* [tweak] Minor tweaks and improvements to dashboards
|
100 |
* [fix] More accurate regexes for AdRotate Tracker
|
102 |
* [fix] Unwanted advert after content with post injection on some settings
|
103 |
* [i18n] Updated strings for all language files
|
104 |
|
105 |
+
= 3.12.8 PRO =
|
106 |
+
* [fix] strip_tags error when saving adverts
|
107 |
+
* [fix] Typo on AdRotate Info page
|
108 |
|
109 |
= 3.12.7 PRO =
|
110 |
* [new] Show select adverts on mobile only when in a group
|
127 |
|
128 |
== Upgrade Notice ==
|
129 |
|
130 |
+
= 3.11.6 FREE =
|
131 |
+
* [fix] Output of Dynamic groups and Block groups
|
132 |
+
* [fix] Notice error on schedules page
|
133 |
+
* [fix] Typo on AdRotate Info page
|
134 |
+
|
135 |
= 3.11.5 FREE =
|
136 |
* [tweak] Minor tweaks and improvements to dashboards
|
137 |
* [fix] More accurate regexes for AdRotate Tracker
|