Version Description
- [fix] More clear color coding for adverts with errors
- [fix] Database prefix for transient cleanup wrong
- [fix] Improved PHP7 compatibility
- [change] Dashboard updates
- [change] Responsive feature no longer available
- [change] Using Responsive feature now causes an error
All recent changes are available on the AdRotate website.
=
Download this release
Release Info
Developer | adegans |
Plugin | AdRotate Banner Manager |
Version | 3.19 |
Comparing to | |
See all releases |
Code changes from version 3.18.1 to 3.19
- adrotate-export.php +2 -2
- adrotate-functions.php +17 -16
- adrotate-manage-publisher.php +8 -17
- adrotate-output.php +6 -30
- adrotate-setup.php +14 -6
- adrotate.php +4 -4
- dashboard/adrotatepro.php +1 -1
- dashboard/info.php +4 -4
- dashboard/publisher/adverts-disabled.php +12 -15
- dashboard/publisher/adverts-edit.php +32 -7
- dashboard/publisher/adverts-error.php +8 -8
- dashboard/publisher/adverts-main.php +5 -7
- images/medianet.jpg +0 -0
- images/viglink.png +0 -0
- library/dashboard.css +1 -1
- library/jquery.adrotate.dyngroup.js +2 -3
- library/jquery.adrotate.responsive.js +0 -72
- library/jquery.adrotate.tablesorter.js +0 -1
- readme.txt +24 -13
adrotate-export.php
CHANGED
@@ -40,7 +40,7 @@ function adrotate_export_ads($ids, $format) {
|
|
40 |
'tracker' => $single['tracker'],
|
41 |
'mobile' => $single['mobile'],
|
42 |
'tablet' => $single['tablet'],
|
43 |
-
'responsive' =>
|
44 |
'weight' => $single['weight'],
|
45 |
'budget' => $single['budget'],
|
46 |
'crate' => $single['crate'],
|
@@ -66,7 +66,7 @@ function adrotate_export_ads($ids, $format) {
|
|
66 |
$node->addChild('tracker', $ad['tracker']);
|
67 |
$node->addChild('mobile', $ad['mobile']);
|
68 |
$node->addChild('tablet', $ad['tablet']);
|
69 |
-
$node->addChild('responsive',
|
70 |
$node->addChild('weight', $ad['weight']);
|
71 |
$node->addChild('budget', $ad['budget']);
|
72 |
$node->addChild('crate', $ad['crate']);
|
40 |
'tracker' => $single['tracker'],
|
41 |
'mobile' => $single['mobile'],
|
42 |
'tablet' => $single['tablet'],
|
43 |
+
'responsive' => 'N',
|
44 |
'weight' => $single['weight'],
|
45 |
'budget' => $single['budget'],
|
46 |
'crate' => $single['crate'],
|
66 |
$node->addChild('tracker', $ad['tracker']);
|
67 |
$node->addChild('mobile', $ad['mobile']);
|
68 |
$node->addChild('tablet', $ad['tablet']);
|
69 |
+
$node->addChild('responsive', 'N');
|
70 |
$node->addChild('weight', $ad['weight']);
|
71 |
$node->addChild('budget', $ad['budget']);
|
72 |
$node->addChild('crate', $ad['crate']);
|
adrotate-functions.php
CHANGED
@@ -166,7 +166,7 @@ function adrotate_filter_schedule($selected, $banner) {
|
|
166 |
}
|
167 |
|
168 |
// Get schedules for advert
|
169 |
-
$schedules = $wpdb->get_results("SELECT `
|
170 |
$schedule = $schedules[0];
|
171 |
|
172 |
if($adrotate_debug['general'] == true) {
|
@@ -369,7 +369,7 @@ function adrotate_prepare_evaluate_ads($return = true) {
|
|
369 |
global $wpdb;
|
370 |
|
371 |
// Fetch ads
|
372 |
-
$ads = $wpdb->get_results("SELECT `id` FROM `
|
373 |
|
374 |
// Determine error states
|
375 |
$error = $expired = $expiressoon = $normal = $unknown = 0;
|
@@ -377,27 +377,27 @@ function adrotate_prepare_evaluate_ads($return = true) {
|
|
377 |
$result = adrotate_evaluate_ad($ad->id);
|
378 |
if($result == 'error') {
|
379 |
$error++;
|
380 |
-
$wpdb->query("UPDATE `
|
381 |
}
|
382 |
|
383 |
if($result == 'expired') {
|
384 |
$expired++;
|
385 |
-
$wpdb->query("UPDATE `
|
386 |
}
|
387 |
|
388 |
if($result == '2days') {
|
389 |
$expiressoon++;
|
390 |
-
$wpdb->query("UPDATE `
|
391 |
}
|
392 |
|
393 |
if($result == '7days') {
|
394 |
$normal++;
|
395 |
-
$wpdb->query("UPDATE `
|
396 |
}
|
397 |
|
398 |
if($result == 'active') {
|
399 |
$normal++;
|
400 |
-
$wpdb->query("UPDATE `
|
401 |
}
|
402 |
|
403 |
if($result == 'unknown') {
|
@@ -439,9 +439,9 @@ function adrotate_evaluate_ad($ad_id) {
|
|
439 |
$in7days = $now + 604800;
|
440 |
|
441 |
// Fetch ad
|
442 |
-
$ad = $wpdb->get_row($wpdb->prepare("SELECT `id`, `bannercode`, `tracker`, `imagetype`, `image`, `responsive` FROM `
|
443 |
-
$stoptime = $wpdb->get_var("SELECT `stoptime` FROM `
|
444 |
-
$schedules = $wpdb->get_var("SELECT COUNT(`schedule`) FROM `
|
445 |
|
446 |
$bannercode = stripslashes(htmlspecialchars_decode($ad->bannercode, ENT_QUOTES));
|
447 |
// Determine error states
|
@@ -450,6 +450,7 @@ function adrotate_evaluate_ad($ad_id) {
|
|
450 |
OR (!preg_match_all('/<(a|script|embed|iframe)[^>](.*?)>/i', $bannercode, $things) AND $ad->tracker == 'Y') // Clicktracking active but no valid link/tag present
|
451 |
OR (preg_match_all("/(%image%|%asset%)/i", $bannercode, $things) AND $ad->image == '' AND $ad->imagetype == '') // Did use %image% but didn't select an image
|
452 |
OR (!preg_match_all("/(%image%|%asset%)/i", $bannercode, $things) AND $ad->image != '' AND $ad->imagetype != '') // Didn't use %image% but selected an image
|
|
|
453 |
OR (($ad->image == '' AND $ad->imagetype != '') OR ($ad->image != '' AND $ad->imagetype == '')) // Image and Imagetype mismatch
|
454 |
OR $schedules == 0 // No Schedules for this ad
|
455 |
) {
|
@@ -509,14 +510,14 @@ function adrotate_ad_is_in_groups($id) {
|
|
509 |
$output = '';
|
510 |
$groups = $wpdb->get_results("
|
511 |
SELECT
|
512 |
-
`
|
513 |
FROM
|
514 |
-
`
|
515 |
-
`
|
516 |
WHERE
|
517 |
-
`
|
518 |
-
AND `
|
519 |
-
AND `
|
520 |
;");
|
521 |
if($groups) {
|
522 |
foreach($groups as $group) {
|
166 |
}
|
167 |
|
168 |
// Get schedules for advert
|
169 |
+
$schedules = $wpdb->get_results("SELECT `{$wpdb->prefix}adrotate_schedule`.`id`, `starttime`, `stoptime`, `maxclicks`, `maximpressions` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` AND `ad` = '".$banner->id."' ORDER BY `starttime` ASC LIMIT 1;");
|
170 |
$schedule = $schedules[0];
|
171 |
|
172 |
if($adrotate_debug['general'] == true) {
|
369 |
global $wpdb;
|
370 |
|
371 |
// Fetch ads
|
372 |
+
$ads = $wpdb->get_results("SELECT `id` FROM `{$wpdb->prefix}adrotate` WHERE `type` != 'disabled' AND `type` != 'empty' ORDER BY `id` ASC;");
|
373 |
|
374 |
// Determine error states
|
375 |
$error = $expired = $expiressoon = $normal = $unknown = 0;
|
377 |
$result = adrotate_evaluate_ad($ad->id);
|
378 |
if($result == 'error') {
|
379 |
$error++;
|
380 |
+
$wpdb->query("UPDATE `{$wpdb->prefix}adrotate` SET `type` = 'error' WHERE `id` = '".$ad->id."';");
|
381 |
}
|
382 |
|
383 |
if($result == 'expired') {
|
384 |
$expired++;
|
385 |
+
$wpdb->query("UPDATE `{$wpdb->prefix}adrotate` SET `type` = 'expired' WHERE `id` = '".$ad->id."';");
|
386 |
}
|
387 |
|
388 |
if($result == '2days') {
|
389 |
$expiressoon++;
|
390 |
+
$wpdb->query("UPDATE `{$wpdb->prefix}adrotate` SET `type` = '2days' WHERE `id` = '".$ad->id."';");
|
391 |
}
|
392 |
|
393 |
if($result == '7days') {
|
394 |
$normal++;
|
395 |
+
$wpdb->query("UPDATE `{$wpdb->prefix}adrotate` SET `type` = '7days' WHERE `id` = '".$ad->id."';");
|
396 |
}
|
397 |
|
398 |
if($result == 'active') {
|
399 |
$normal++;
|
400 |
+
$wpdb->query("UPDATE `{$wpdb->prefix}adrotate` SET `type` = 'active' WHERE `id` = '".$ad->id."';");
|
401 |
}
|
402 |
|
403 |
if($result == 'unknown') {
|
439 |
$in7days = $now + 604800;
|
440 |
|
441 |
// Fetch ad
|
442 |
+
$ad = $wpdb->get_row($wpdb->prepare("SELECT `id`, `bannercode`, `tracker`, `imagetype`, `image`, `responsive` FROM `{$wpdb->prefix}adrotate` WHERE `id` = %d;", $ad_id));
|
443 |
+
$stoptime = $wpdb->get_var("SELECT `stoptime` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '{$ad->id}' AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `stoptime` DESC LIMIT 1;");
|
444 |
+
$schedules = $wpdb->get_var("SELECT COUNT(`schedule`) FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '".$ad->id."' AND `group` = 0 AND `user` = 0;");
|
445 |
|
446 |
$bannercode = stripslashes(htmlspecialchars_decode($ad->bannercode, ENT_QUOTES));
|
447 |
// Determine error states
|
450 |
OR (!preg_match_all('/<(a|script|embed|iframe)[^>](.*?)>/i', $bannercode, $things) AND $ad->tracker == 'Y') // Clicktracking active but no valid link/tag present
|
451 |
OR (preg_match_all("/(%image%|%asset%)/i", $bannercode, $things) AND $ad->image == '' AND $ad->imagetype == '') // Did use %image% but didn't select an image
|
452 |
OR (!preg_match_all("/(%image%|%asset%)/i", $bannercode, $things) AND $ad->image != '' AND $ad->imagetype != '') // Didn't use %image% but selected an image
|
453 |
+
OR ($ad->responsive == 'Y') // Uses Responsive feature
|
454 |
OR (($ad->image == '' AND $ad->imagetype != '') OR ($ad->image != '' AND $ad->imagetype == '')) // Image and Imagetype mismatch
|
455 |
OR $schedules == 0 // No Schedules for this ad
|
456 |
) {
|
510 |
$output = '';
|
511 |
$groups = $wpdb->get_results("
|
512 |
SELECT
|
513 |
+
`{$wpdb->prefix}adrotate_groups`.`name`
|
514 |
FROM
|
515 |
+
`{$wpdb->prefix}adrotate_groups`,
|
516 |
+
`{$wpdb->prefix}adrotate_linkmeta`
|
517 |
WHERE
|
518 |
+
`{$wpdb->prefix}adrotate_linkmeta`.`ad` = '".$id."'
|
519 |
+
AND `{$wpdb->prefix}adrotate_linkmeta`.`group` = `{$wpdb->prefix}adrotate_groups`.`id`
|
520 |
+
AND `{$wpdb->prefix}adrotate_linkmeta`.`user` = 0
|
521 |
;");
|
522 |
if($groups) {
|
523 |
foreach($groups as $group) {
|
adrotate-manage-publisher.php
CHANGED
@@ -53,7 +53,6 @@ function adrotate_insert_input() {
|
|
53 |
if(isset($_POST['adrotate_image'])) $image_field = strip_tags(trim($_POST['adrotate_image'], "\t\n "));
|
54 |
if(isset($_POST['adrotate_image_dropdown'])) $image_dropdown = strip_tags(trim($_POST['adrotate_image_dropdown'], "\t\n "));
|
55 |
if(isset($_POST['adrotate_tracker'])) $tracker = strip_tags(trim($_POST['adrotate_tracker'], "\t\n "));
|
56 |
-
if(isset($_POST['adrotate_responsive'])) $responsive = strip_tags(trim($_POST['adrotate_responsive'], "\t\n "));
|
57 |
|
58 |
// Misc variabled
|
59 |
$groups = $type = $group_array = '';
|
@@ -73,11 +72,11 @@ function adrotate_insert_input() {
|
|
73 |
if(preg_match("/%RANDOM%/", $bannercode)) $bannercode = str_replace('%RANDOM%', '%random%', $bannercode);
|
74 |
|
75 |
// Sort out start dates
|
76 |
-
if(strlen($smonth) > 0 AND !is_numeric($smonth))
|
77 |
-
if(strlen($sday) > 0 AND !is_numeric($sday))
|
78 |
-
if(strlen($syear) > 0 AND !is_numeric($syear))
|
79 |
-
if(strlen($shour) > 0 AND !is_numeric($shour))
|
80 |
-
if(strlen($sminute) > 0 AND !is_numeric($sminute))
|
81 |
if(($smonth > 0 AND $sday > 0 AND $syear > 0) AND strlen($shour) == 0) $shour = '00';
|
82 |
if(($smonth > 0 AND $sday > 0 AND $syear > 0) AND strlen($sminute) == 0) $sminute = '00';
|
83 |
|
@@ -106,16 +105,12 @@ function adrotate_insert_input() {
|
|
106 |
if($enddate <= $startdate) $enddate = $startdate + 7257600; // 84 days (12 weeks)
|
107 |
|
108 |
// Sort out click and impressions restrictions
|
109 |
-
if(strlen($maxclicks) < 1 OR !is_numeric($maxclicks))
|
110 |
-
if(strlen($maxshown) < 1 OR !is_numeric($maxshown))
|
111 |
|
112 |
// Set tracker value
|
113 |
if(isset($tracker) AND strlen($tracker) != 0) $tracker = 'Y';
|
114 |
else $tracker = 'N';
|
115 |
-
|
116 |
-
// Set responsive value
|
117 |
-
if(isset($responsive) AND strlen($responsive) != 0) $responsive = 'Y';
|
118 |
-
else $responsive = 'N';
|
119 |
|
120 |
// Determine image settings ($image_field has priority!)
|
121 |
if(strlen($image_field) > 1) {
|
@@ -136,12 +131,8 @@ function adrotate_insert_input() {
|
|
136 |
$wpdb->update($wpdb->prefix.'adrotate_schedule', array('starttime' => $startdate, 'stoptime' => $enddate, 'maxclicks' => $maxclicks, 'maximpressions' => $maxshown), array('id' => $schedule_id));
|
137 |
|
138 |
// Save the ad to the DB
|
139 |
-
$wpdb->update($wpdb->prefix.'adrotate', array('title' => $title, 'bannercode' => $bannercode, 'updated' => $thetime, 'author' => $author, 'imagetype' => $imagetype, 'image' => $image, 'tracker' => $tracker, 'responsive' =>
|
140 |
|
141 |
-
// Determine Responsive requirement
|
142 |
-
$responsive_count = $wpdb->get_var("SELECT COUNT(*) as `total` FROM `{$wpdb->prefix}adrotate` WHERE `responsive` = 'Y';");
|
143 |
-
update_option('adrotate_responsive_required', $responsive_count);
|
144 |
-
|
145 |
// Fetch group records for the ad
|
146 |
$groupmeta = $wpdb->get_results($wpdb->prepare("SELECT `group` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = %d AND `user` = 0 AND `schedule` = 0;", $id));
|
147 |
foreach($groupmeta as $meta) {
|
53 |
if(isset($_POST['adrotate_image'])) $image_field = strip_tags(trim($_POST['adrotate_image'], "\t\n "));
|
54 |
if(isset($_POST['adrotate_image_dropdown'])) $image_dropdown = strip_tags(trim($_POST['adrotate_image_dropdown'], "\t\n "));
|
55 |
if(isset($_POST['adrotate_tracker'])) $tracker = strip_tags(trim($_POST['adrotate_tracker'], "\t\n "));
|
|
|
56 |
|
57 |
// Misc variabled
|
58 |
$groups = $type = $group_array = '';
|
72 |
if(preg_match("/%RANDOM%/", $bannercode)) $bannercode = str_replace('%RANDOM%', '%random%', $bannercode);
|
73 |
|
74 |
// Sort out start dates
|
75 |
+
if(strlen($smonth) > 0 AND !is_numeric($smonth)) $smonth = date_i18n('m');
|
76 |
+
if(strlen($sday) > 0 AND !is_numeric($sday)) $sday = date_i18n('d');
|
77 |
+
if(strlen($syear) > 0 AND !is_numeric($syear)) $syear = date_i18n('Y');
|
78 |
+
if(strlen($shour) > 0 AND !is_numeric($shour)) $shour = date_i18n('H');
|
79 |
+
if(strlen($sminute) > 0 AND !is_numeric($sminute)) $sminute = date_i18n('i');
|
80 |
if(($smonth > 0 AND $sday > 0 AND $syear > 0) AND strlen($shour) == 0) $shour = '00';
|
81 |
if(($smonth > 0 AND $sday > 0 AND $syear > 0) AND strlen($sminute) == 0) $sminute = '00';
|
82 |
|
105 |
if($enddate <= $startdate) $enddate = $startdate + 7257600; // 84 days (12 weeks)
|
106 |
|
107 |
// Sort out click and impressions restrictions
|
108 |
+
if(strlen($maxclicks) < 1 OR !is_numeric($maxclicks)) $maxclicks = 0;
|
109 |
+
if(strlen($maxshown) < 1 OR !is_numeric($maxshown)) $maxshown = 0;
|
110 |
|
111 |
// Set tracker value
|
112 |
if(isset($tracker) AND strlen($tracker) != 0) $tracker = 'Y';
|
113 |
else $tracker = 'N';
|
|
|
|
|
|
|
|
|
114 |
|
115 |
// Determine image settings ($image_field has priority!)
|
116 |
if(strlen($image_field) > 1) {
|
131 |
$wpdb->update($wpdb->prefix.'adrotate_schedule', array('starttime' => $startdate, 'stoptime' => $enddate, 'maxclicks' => $maxclicks, 'maximpressions' => $maxshown), array('id' => $schedule_id));
|
132 |
|
133 |
// Save the ad to the DB
|
134 |
+
$wpdb->update($wpdb->prefix.'adrotate', array('title' => $title, 'bannercode' => $bannercode, 'updated' => $thetime, 'author' => $author, 'imagetype' => $imagetype, 'image' => $image, 'tracker' => $tracker, 'responsive' => 'N', 'type' => $active), array('id' => $id));
|
135 |
|
|
|
|
|
|
|
|
|
136 |
// Fetch group records for the ad
|
137 |
$groupmeta = $wpdb->get_results($wpdb->prepare("SELECT `group` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = %d AND `user` = 0 AND `schedule` = 0;", $id));
|
138 |
foreach($groupmeta as $meta) {
|
adrotate-output.php
CHANGED
@@ -20,7 +20,7 @@ function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
|
|
20 |
$output = '';
|
21 |
|
22 |
if($banner_id) {
|
23 |
-
$banner = $wpdb->get_row($wpdb->prepare("SELECT `id`, `title`, `bannercode`, `tracker`, `image
|
24 |
|
25 |
if($banner) {
|
26 |
if($adrotate_debug['general'] == true) {
|
@@ -39,7 +39,7 @@ function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
|
|
39 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $banner->image);
|
40 |
|
41 |
if($individual == true) $output .= '<div class="a-single a-'.$banner->id.'">';
|
42 |
-
$output .= adrotate_ad_output($banner->id, 0, $banner->title, $banner->bannercode, $banner->tracker, $image
|
43 |
if($individual == true) $output .= '</div>';
|
44 |
|
45 |
if($adrotate_config['stats'] == 1) {
|
@@ -90,7 +90,6 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
|
|
90 |
`{$wpdb->prefix}adrotate`.`title`,
|
91 |
`{$wpdb->prefix}adrotate`.`bannercode`,
|
92 |
`{$wpdb->prefix}adrotate`.`image`,
|
93 |
-
`{$wpdb->prefix}adrotate`.`responsive`,
|
94 |
`{$wpdb->prefix}adrotate`.`tracker`,
|
95 |
`{$wpdb->prefix}adrotate_linkmeta`.`group`
|
96 |
FROM
|
@@ -151,7 +150,7 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
|
|
151 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $banner->image);
|
152 |
|
153 |
$output .= '<div class="g-dyn a-'.$banner->id.' c-'.$i.'">';
|
154 |
-
$output .= $before.adrotate_ad_output($banner->id, $group->id, $banner->title, $banner->bannercode, $banner->tracker, $image
|
155 |
$output .= '</div>';
|
156 |
$i++;
|
157 |
}
|
@@ -167,7 +166,7 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
|
|
167 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $selected[$banner_id]->image);
|
168 |
|
169 |
$output .= '<div class="g-col b-'.$group->id.' a-'.$selected[$banner_id]->id.'">';
|
170 |
-
$output .= $before.adrotate_ad_output($selected[$banner_id]->id, $group->id, $selected[$banner_id]->title, $selected[$banner_id]->bannercode, $selected[$banner_id]->tracker, $image
|
171 |
$output .= '</div>';
|
172 |
|
173 |
if($columns == $group->gridcolumns AND $i != $block_count) {
|
@@ -189,7 +188,7 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
|
|
189 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $selected[$banner_id]->image);
|
190 |
|
191 |
$output .= '<div class="g-single a-'.$selected[$banner_id]->id.'">';
|
192 |
-
$output .= $before.adrotate_ad_output($selected[$banner_id]->id, $group->id, $selected[$banner_id]->title, $selected[$banner_id]->bannercode, $selected[$banner_id]->tracker, $image
|
193 |
$output .= '</div>';
|
194 |
|
195 |
if($adrotate_config['stats'] == 1){
|
@@ -351,7 +350,7 @@ function adrotate_preview($banner_id) {
|
|
351 |
Purpose: Prepare the output for viewing
|
352 |
Since: 3.0
|
353 |
-------------------------------------------------------------*/
|
354 |
-
function adrotate_ad_output($id, $group = 0, $name, $bannercode, $tracker, $image
|
355 |
global $blog_id, $adrotate_debug, $adrotate_config;
|
356 |
|
357 |
$banner_output = $bannercode;
|
@@ -382,28 +381,6 @@ function adrotate_ad_output($id, $group = 0, $name, $bannercode, $tracker, $imag
|
|
382 |
}
|
383 |
}
|
384 |
|
385 |
-
// Add Responsive classes
|
386 |
-
preg_match_all('/<img[^>](?:.*?)>/i', $banner_output, $matches, PREG_SET_ORDER);
|
387 |
-
if(isset($matches[0])) {
|
388 |
-
foreach($matches[0] as $value) {
|
389 |
-
if(preg_match('/<img[^>]+class=\"(.+?)\"[^>]*>/i', $value, $regs)) {
|
390 |
-
$result = $regs[1];
|
391 |
-
if($responsive == 'Y') $result .= " responsive";
|
392 |
-
$result = trim($result);
|
393 |
-
$banner_output = str_ireplace('class="'.$regs[1].'"', 'class="'.$result.'"', $banner_output);
|
394 |
-
} else {
|
395 |
-
$result = '';
|
396 |
-
if($responsive == 'Y') $result .= " responsive";
|
397 |
-
$result = trim($result);
|
398 |
-
if(strlen($result) > 0) {
|
399 |
-
$banner_output = str_ireplace('<img ', '<img class="'.$result.'" ', $banner_output);
|
400 |
-
}
|
401 |
-
}
|
402 |
-
unset($value, $regs, $result);
|
403 |
-
}
|
404 |
-
}
|
405 |
-
unset($matches);
|
406 |
-
|
407 |
$banner_output = str_replace('%title%', $name, $banner_output);
|
408 |
$banner_output = str_replace('%random%', rand(100000,999999), $banner_output);
|
409 |
$banner_output = str_replace('%asset%', $image, $banner_output); // Replaces %image%
|
@@ -429,7 +406,6 @@ function adrotate_custom_scripts() {
|
|
429 |
|
430 |
if($adrotate_config['jquery'] == 'Y') wp_enqueue_script('jquery', false, false, false, $in_footer);
|
431 |
if(get_option('adrotate_dynamic_required') > 0) wp_enqueue_script('jshowoff-adrotate', plugins_url('/library/jquery.adrotate.dyngroup.js', __FILE__), false, null, $in_footer);
|
432 |
-
if(get_option('adrotate_responsive_required') > 0) wp_enqueue_script('responsive-adrotate', plugins_url('/library/jquery.adrotate.responsive.js', __FILE__), false, null, $in_footer);
|
433 |
|
434 |
// Make clicktracking and impression tracking a possibility
|
435 |
if($adrotate_config['stats'] == 1) {
|
20 |
$output = '';
|
21 |
|
22 |
if($banner_id) {
|
23 |
+
$banner = $wpdb->get_row($wpdb->prepare("SELECT `id`, `title`, `bannercode`, `tracker`, `image` FROM `{$wpdb->prefix}adrotate` WHERE `id` = %d AND (`type` = 'active' OR `type` = '2days' OR `type` = '7days');", $banner_id));
|
24 |
|
25 |
if($banner) {
|
26 |
if($adrotate_debug['general'] == true) {
|
39 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $banner->image);
|
40 |
|
41 |
if($individual == true) $output .= '<div class="a-single a-'.$banner->id.'">';
|
42 |
+
$output .= adrotate_ad_output($banner->id, 0, $banner->title, $banner->bannercode, $banner->tracker, $image);
|
43 |
if($individual == true) $output .= '</div>';
|
44 |
|
45 |
if($adrotate_config['stats'] == 1) {
|
90 |
`{$wpdb->prefix}adrotate`.`title`,
|
91 |
`{$wpdb->prefix}adrotate`.`bannercode`,
|
92 |
`{$wpdb->prefix}adrotate`.`image`,
|
|
|
93 |
`{$wpdb->prefix}adrotate`.`tracker`,
|
94 |
`{$wpdb->prefix}adrotate_linkmeta`.`group`
|
95 |
FROM
|
150 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $banner->image);
|
151 |
|
152 |
$output .= '<div class="g-dyn a-'.$banner->id.' c-'.$i.'">';
|
153 |
+
$output .= $before.adrotate_ad_output($banner->id, $group->id, $banner->title, $banner->bannercode, $banner->tracker, $image).$after;
|
154 |
$output .= '</div>';
|
155 |
$i++;
|
156 |
}
|
166 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $selected[$banner_id]->image);
|
167 |
|
168 |
$output .= '<div class="g-col b-'.$group->id.' a-'.$selected[$banner_id]->id.'">';
|
169 |
+
$output .= $before.adrotate_ad_output($selected[$banner_id]->id, $group->id, $selected[$banner_id]->title, $selected[$banner_id]->bannercode, $selected[$banner_id]->tracker, $image).$after;
|
170 |
$output .= '</div>';
|
171 |
|
172 |
if($columns == $group->gridcolumns AND $i != $block_count) {
|
188 |
$image = str_replace('%folder%', $adrotate_config['banner_folder'], $selected[$banner_id]->image);
|
189 |
|
190 |
$output .= '<div class="g-single a-'.$selected[$banner_id]->id.'">';
|
191 |
+
$output .= $before.adrotate_ad_output($selected[$banner_id]->id, $group->id, $selected[$banner_id]->title, $selected[$banner_id]->bannercode, $selected[$banner_id]->tracker, $image).$after;
|
192 |
$output .= '</div>';
|
193 |
|
194 |
if($adrotate_config['stats'] == 1){
|
350 |
Purpose: Prepare the output for viewing
|
351 |
Since: 3.0
|
352 |
-------------------------------------------------------------*/
|
353 |
+
function adrotate_ad_output($id, $group = 0, $name, $bannercode, $tracker, $image) {
|
354 |
global $blog_id, $adrotate_debug, $adrotate_config;
|
355 |
|
356 |
$banner_output = $bannercode;
|
381 |
}
|
382 |
}
|
383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
$banner_output = str_replace('%title%', $name, $banner_output);
|
385 |
$banner_output = str_replace('%random%', rand(100000,999999), $banner_output);
|
386 |
$banner_output = str_replace('%asset%', $image, $banner_output); // Replaces %image%
|
406 |
|
407 |
if($adrotate_config['jquery'] == 'Y') wp_enqueue_script('jquery', false, false, false, $in_footer);
|
408 |
if(get_option('adrotate_dynamic_required') > 0) wp_enqueue_script('jshowoff-adrotate', plugins_url('/library/jquery.adrotate.dyngroup.js', __FILE__), false, null, $in_footer);
|
|
|
409 |
|
410 |
// Make clicktracking and impression tracking a possibility
|
411 |
if($adrotate_config['stats'] == 1) {
|
adrotate-setup.php
CHANGED
@@ -63,7 +63,6 @@ function adrotate_activate_setup() {
|
|
63 |
add_option('adrotate_advert_status', array('error' => 0, 'expired' => 0, 'expiressoon' => 0, 'normal' => 0, 'total' => 0));
|
64 |
add_option('adrotate_geo_required', 0);
|
65 |
add_option('adrotate_geo_requests', 0);
|
66 |
-
add_option('adrotate_responsive_required', 0);
|
67 |
add_option('adrotate_dynamic_required', 0);
|
68 |
add_option('adrotate_hide_banner', adrotate_now());
|
69 |
add_option('adrotate_hide_review', adrotate_now());
|
@@ -171,7 +170,7 @@ function adrotate_uninstall_setup() {
|
|
171 |
delete_option('adrotate_notifications');
|
172 |
delete_option('adrotate_geo_required');
|
173 |
delete_option('adrotate_geo_requests');
|
174 |
-
delete_option('adrotate_responsive_required');
|
175 |
delete_option('adrotate_dynamic_required');
|
176 |
delete_option('adrotate_version');
|
177 |
|
@@ -352,7 +351,7 @@ function adrotate_dummy_data() {
|
|
352 |
// Demo ad 1
|
353 |
$wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo ad 468x60', 'bannercode' => '<a href=\"http:\/\/www.adrotateforwordpress.com\"><img src=\"http://ajdg.solutions/assets/dummy-banners/adrotate-468x60.jpg\" /></a>', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'paid' => 'U', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'os_other' => 'Y', 'responsive' => 'N', 'type' => 'active', 'weight' => 6, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
|
354 |
$ad_id = $wpdb->insert_id;
|
355 |
-
$wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', '
|
356 |
$schedule_id = $wpdb->insert_id;
|
357 |
$wpdb->insert("{$wpdb->prefix}adrotate_linkmeta", array('ad' => $ad_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
|
358 |
unset($ad_id, $schedule_id);
|
@@ -360,7 +359,7 @@ function adrotate_dummy_data() {
|
|
360 |
// Demo ad 2
|
361 |
$wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo ad 200x200', 'bannercode' => '<a href=\"http:\/\/www.adrotateforwordpress.com\"><img src=\"http://ajdg.solutions/assets/dummy-banners/adrotate-200x200.jpg\" /></a>', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'paid' => 'U', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'os_other' => 'Y', 'responsive' => 'N', 'type' => 'active', 'weight' => 6, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
|
362 |
$ad_id = $wpdb->insert_id;
|
363 |
-
$wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', '
|
364 |
$schedule_id = $wpdb->insert_id;
|
365 |
$wpdb->insert("{$wpdb->prefix}adrotate_linkmeta", array('ad' => $ad_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
|
366 |
unset($ad_id, $schedule_id);
|
@@ -479,7 +478,6 @@ function adrotate_database_install() {
|
|
479 |
`maxclicks` int(15) unsigned NOT NULL default '0',
|
480 |
`maximpressions` int(15) unsigned NOT NULL default '0',
|
481 |
`spread` char(1) NOT NULL default 'N',
|
482 |
-
`hourimpressions` int(15) unsigned NOT NULL default '0',
|
483 |
`daystarttime` char(4) NOT NULL default '0000',
|
484 |
`daystoptime` char(4) NOT NULL default '0000',
|
485 |
`day_mon` char(1) NOT NULL default 'Y',
|
@@ -924,6 +922,11 @@ function adrotate_database_upgrade() {
|
|
924 |
$wpdb->query("DROP TABLE IF EXISTS `{$wpdb->prefix}adrotate_tracker`");
|
925 |
}
|
926 |
|
|
|
|
|
|
|
|
|
|
|
927 |
|
928 |
update_option("adrotate_db_version", array('current' => ADROTATE_DB_VERSION, 'previous' => $adrotate_db_version['current']));
|
929 |
}
|
@@ -1098,6 +1101,11 @@ function adrotate_core_upgrade() {
|
|
1098 |
if(!wp_next_scheduled('adrotate_delete_transients')) wp_schedule_event($firstrun, 'hourly', 'adrotate_delete_transients');
|
1099 |
}
|
1100 |
|
|
|
|
|
|
|
|
|
|
|
1101 |
update_option("adrotate_version", array('current' => ADROTATE_VERSION, 'previous' => $adrotate_version['current']));
|
1102 |
}
|
1103 |
|
@@ -1191,7 +1199,7 @@ function adrotate_delete_transients() {
|
|
1191 |
|
1192 |
$onedayonehour = adrotate_now() - 90000;
|
1193 |
|
1194 |
-
$wpdb->query("DELETE FROM
|
1195 |
|
1196 |
}
|
1197 |
|
63 |
add_option('adrotate_advert_status', array('error' => 0, 'expired' => 0, 'expiressoon' => 0, 'normal' => 0, 'total' => 0));
|
64 |
add_option('adrotate_geo_required', 0);
|
65 |
add_option('adrotate_geo_requests', 0);
|
|
|
66 |
add_option('adrotate_dynamic_required', 0);
|
67 |
add_option('adrotate_hide_banner', adrotate_now());
|
68 |
add_option('adrotate_hide_review', adrotate_now());
|
170 |
delete_option('adrotate_notifications');
|
171 |
delete_option('adrotate_geo_required');
|
172 |
delete_option('adrotate_geo_requests');
|
173 |
+
delete_option('adrotate_responsive_required'); // Obsolete
|
174 |
delete_option('adrotate_dynamic_required');
|
175 |
delete_option('adrotate_version');
|
176 |
|
351 |
// Demo ad 1
|
352 |
$wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo ad 468x60', 'bannercode' => '<a href=\"http:\/\/www.adrotateforwordpress.com\"><img src=\"http://ajdg.solutions/assets/dummy-banners/adrotate-468x60.jpg\" /></a>', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'paid' => 'U', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'os_other' => 'Y', 'responsive' => 'N', 'type' => 'active', 'weight' => 6, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
|
353 |
$ad_id = $wpdb->insert_id;
|
354 |
+
$wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', 'daystarttime' => '0000', 'daystoptime' => '0000', 'day_mon' => 'Y', 'day_tue' => 'Y', 'day_wed' => 'Y', 'day_thu' => 'Y', 'day_fri' => 'Y', 'day_sat' => 'Y', 'day_sun' => 'Y'));
|
355 |
$schedule_id = $wpdb->insert_id;
|
356 |
$wpdb->insert("{$wpdb->prefix}adrotate_linkmeta", array('ad' => $ad_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
|
357 |
unset($ad_id, $schedule_id);
|
359 |
// Demo ad 2
|
360 |
$wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo ad 200x200', 'bannercode' => '<a href=\"http:\/\/www.adrotateforwordpress.com\"><img src=\"http://ajdg.solutions/assets/dummy-banners/adrotate-200x200.jpg\" /></a>', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'paid' => 'U', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'os_other' => 'Y', 'responsive' => 'N', 'type' => 'active', 'weight' => 6, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
|
361 |
$ad_id = $wpdb->insert_id;
|
362 |
+
$wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', 'daystarttime' => '0000', 'daystoptime' => '0000', 'day_mon' => 'Y', 'day_tue' => 'Y', 'day_wed' => 'Y', 'day_thu' => 'Y', 'day_fri' => 'Y', 'day_sat' => 'Y', 'day_sun' => 'Y'));
|
363 |
$schedule_id = $wpdb->insert_id;
|
364 |
$wpdb->insert("{$wpdb->prefix}adrotate_linkmeta", array('ad' => $ad_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
|
365 |
unset($ad_id, $schedule_id);
|
478 |
`maxclicks` int(15) unsigned NOT NULL default '0',
|
479 |
`maximpressions` int(15) unsigned NOT NULL default '0',
|
480 |
`spread` char(1) NOT NULL default 'N',
|
|
|
481 |
`daystarttime` char(4) NOT NULL default '0000',
|
482 |
`daystoptime` char(4) NOT NULL default '0000',
|
483 |
`day_mon` char(1) NOT NULL default 'Y',
|
922 |
$wpdb->query("DROP TABLE IF EXISTS `{$wpdb->prefix}adrotate_tracker`");
|
923 |
}
|
924 |
|
925 |
+
// Database: 61
|
926 |
+
// AdRotate: 3.18.2
|
927 |
+
if($adrotate_db_version['current'] < 61) {
|
928 |
+
adrotate_del_column("{$wpdb->prefix}adrotate_schedule", 'hourimpressions');
|
929 |
+
}
|
930 |
|
931 |
update_option("adrotate_db_version", array('current' => ADROTATE_DB_VERSION, 'previous' => $adrotate_db_version['current']));
|
932 |
}
|
1101 |
if(!wp_next_scheduled('adrotate_delete_transients')) wp_schedule_event($firstrun, 'hourly', 'adrotate_delete_transients');
|
1102 |
}
|
1103 |
|
1104 |
+
// 3.19
|
1105 |
+
if($adrotate_version['current'] < 387) {
|
1106 |
+
delete_option('adrotate_responsive_required');
|
1107 |
+
}
|
1108 |
+
|
1109 |
update_option("adrotate_version", array('current' => ADROTATE_VERSION, 'previous' => $adrotate_version['current']));
|
1110 |
}
|
1111 |
|
1199 |
|
1200 |
$onedayonehour = adrotate_now() - 90000;
|
1201 |
|
1202 |
+
$wpdb->query("DELETE FROM `{$wpdb->prefix}options` WHERE (`option_name` LIKE '\_transient\_timeout\_adrotate\_%' OR `option_name` LIKE '\_transient\_adrotate\_%') AND `option_value` < '$onedayonehour'");
|
1203 |
|
1204 |
}
|
1205 |
|
adrotate.php
CHANGED
@@ -7,7 +7,7 @@ Author URI: http://ajdg.solutions/?utm_campaign=homepage&utm_medium=plugin-info&
|
|
7 |
Description: The popular choice for monetizing your website with adverts while keeping things simple. Start making money today!
|
8 |
Text Domain: adrotate
|
9 |
Domain Path: /languages/
|
10 |
-
Version: 3.
|
11 |
License: GPLv3
|
12 |
*/
|
13 |
|
@@ -22,9 +22,9 @@ License: GPLv3
|
|
22 |
------------------------------------------------------------------------------------ */
|
23 |
|
24 |
/*--- AdRotate values ---------------------------------------*/
|
25 |
-
define("ADROTATE_DISPLAY", '3.
|
26 |
-
define("ADROTATE_VERSION",
|
27 |
-
define("ADROTATE_DB_VERSION",
|
28 |
/*-----------------------------------------------------------*/
|
29 |
|
30 |
/*--- Load Files --------------------------------------------*/
|
7 |
Description: The popular choice for monetizing your website with adverts while keeping things simple. Start making money today!
|
8 |
Text Domain: adrotate
|
9 |
Domain Path: /languages/
|
10 |
+
Version: 3.19
|
11 |
License: GPLv3
|
12 |
*/
|
13 |
|
22 |
------------------------------------------------------------------------------------ */
|
23 |
|
24 |
/*--- AdRotate values ---------------------------------------*/
|
25 |
+
define("ADROTATE_DISPLAY", '3.19');
|
26 |
+
define("ADROTATE_VERSION", 387);
|
27 |
+
define("ADROTATE_DB_VERSION", 61);
|
28 |
/*-----------------------------------------------------------*/
|
29 |
|
30 |
/*--- Load Files --------------------------------------------*/
|
dashboard/adrotatepro.php
CHANGED
@@ -49,7 +49,7 @@
|
|
49 |
<div class="postbox-ajdg">
|
50 |
<div class="inside">
|
51 |
<p><?php _e('I am Arnan de Gans, a digital nomad in the Philippines. Click on the banner to find out more about me and what I am doing!', 'adrotate'); ?></p>
|
52 |
-
<a href="http://www.arnan.me/?pk_campaign=adrotate-free&pk_kwd=propage" title="arnan.me - Nomadic in the Philippines"><img src="<?php echo plugins_url('/images/arnan-credits.jpg', dirname(__FILE__)); ?>" alt="Arnan de Gans" align="center" class="ajdg-photo" /></a>
|
53 |
</div>
|
54 |
</div>
|
55 |
|
49 |
<div class="postbox-ajdg">
|
50 |
<div class="inside">
|
51 |
<p><?php _e('I am Arnan de Gans, a digital nomad in the Philippines. Click on the banner to find out more about me and what I am doing!', 'adrotate'); ?></p>
|
52 |
+
<a href="http://www.arnan.me/?pk_campaign=adrotate-free&pk_kwd=propage" title="arnan.me - Nomadic in the Philippines"><img src="<?php echo plugins_url('/images/arnan-credits.jpg', dirname(__FILE__)); ?>" alt="Arnan de Gans" align="center" class="ajdg-photo" width="100%" /></a>
|
53 |
</div>
|
54 |
</div>
|
55 |
|
dashboard/info.php
CHANGED
@@ -45,11 +45,11 @@ $data = get_option("adrotate_advert_status");
|
|
45 |
<td colspan="2">
|
46 |
<p><strong><?php _e('Support AdRotate', 'adrotate'); ?></strong></p>
|
47 |
<p><?php _e('Consider writing a review if you like AdRotate. Also follow my Facebook page for updates about me and my plugins. Thank you!', 'adrotate'); ?><br />
|
48 |
-
<center><a class="button-primary" href="https://paypal.me/arnandegans/10usd" target="_blank">Donate $10 via Paypal</a> <a class="button" target="_blank" href="https://wordpress.org/support/
|
49 |
-
<a href="http://www.arnan.me/?pk_campaign=adrotate-free&pk_kwd=infopage" title="arnan.me - Nomadic in the Philippines"><img src="<?php echo plugins_url('/images/arnan-credits.jpg', dirname(__FILE__)); ?>" alt="Arnan de Gans" align="center" class="ajdg-photo" /></a></p>
|
50 |
|
51 |
-
<p><strong><?php _e('Get paid as a publisher
|
52 |
-
<p><a href="http://signup.clicksor.com/advertise_here.php?nid=1&srid=&ref=381832" target="_blank"><img alt="Clicksor" height="125"
|
53 |
</td>
|
54 |
</tr>
|
55 |
</tbody>
|
45 |
<td colspan="2">
|
46 |
<p><strong><?php _e('Support AdRotate', 'adrotate'); ?></strong></p>
|
47 |
<p><?php _e('Consider writing a review if you like AdRotate. Also follow my Facebook page for updates about me and my plugins. Thank you!', 'adrotate'); ?><br />
|
48 |
+
<center><a class="button-primary" href="https://paypal.me/arnandegans/10usd" target="_blank">Donate $10 via Paypal</a> <a class="button" target="_blank" href="https://wordpress.org/support/plugin/adrotate/reviews/?rate=5#new-post">Write review on WordPress.org</a></center><br />
|
49 |
+
<a href="http://www.arnan.me/?pk_campaign=adrotate-free&pk_kwd=infopage" title="arnan.me - Nomadic in the Philippines"><img src="<?php echo plugins_url('/images/arnan-credits.jpg', dirname(__FILE__)); ?>" alt="Arnan de Gans" align="center" class="ajdg-photo" width="100%" /></a></p>
|
50 |
|
51 |
+
<p><strong><?php _e('Get paid as a publisher', 'adrotate'); ?></strong></p>
|
52 |
+
<p><a href='http://bit.ly/2leh9sW'><img alt="Media.net" height="125" src="<?php echo plugins_url('/images/medianet.jpg', dirname(__FILE__)); ?>" /></a> <a href="http://signup.clicksor.com/advertise_here.php?nid=1&srid=&ref=381832" target="_blank"><img alt="Clicksor" height="125"src="<?php echo plugins_url('/images/clicksor.png', dirname(__FILE__)); ?>"></a> <a href="https://www.viglink.com/?vgref=2984797&vgtag=banner"><img alt="VigLink" height="125" src="<?php echo plugins_url('/images/viglink.png', dirname(__FILE__)); ?>" /></a></p>
|
53 |
</td>
|
54 |
</tr>
|
55 |
</tbody>
|
dashboard/publisher/adverts-disabled.php
CHANGED
@@ -33,11 +33,13 @@
|
|
33 |
<tr>
|
34 |
<td scope="col" class="manage-column column-cb check-column"><input type="checkbox" /></td>
|
35 |
<th width="2%"><center><?php _e('ID', 'adrotate'); ?></center></th>
|
|
|
36 |
<th width="15%"><?php _e('Start / End', 'adrotate'); ?></th>
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
41 |
</tr>
|
42 |
</thead>
|
43 |
<tbody>
|
@@ -45,9 +47,9 @@
|
|
45 |
foreach($disabled as $banner) {
|
46 |
$stats = adrotate_stats($banner['id']);
|
47 |
$grouplist = adrotate_ad_is_in_groups($banner['id']);
|
48 |
-
|
49 |
-
// Prevent gaps in display
|
50 |
$ctr = adrotate_ctr($stats['clicks'], $stats['impressions']);
|
|
|
|
|
51 |
|
52 |
if($adrotate_debug['publisher'] == true) {
|
53 |
echo "<tr><td> </td><td><strong>[DEBUG]</strong></td><td colspan='9'><pre>";
|
@@ -58,24 +60,19 @@
|
|
58 |
print_r($stats);
|
59 |
echo "</pre></td></tr>";
|
60 |
}
|
61 |
-
|
62 |
-
$grouplist = adrotate_ad_is_in_groups($banner['id']);
|
63 |
-
|
64 |
-
$errorclass = '';
|
65 |
-
if($banner['type'] == 'disabled') $errorclass = ' row_blue';
|
66 |
?>
|
67 |
-
<tr id='adrotateindex' class='<?php echo $
|
68 |
<th class="check-column"><input type="checkbox" name="disabledbannercheck[]" value="<?php echo $banner['id']; ?>" /></th>
|
69 |
<td><center><?php echo $banner['id'];?></center></td>
|
70 |
-
<td><?php echo date_i18n("F d, Y", $banner['firstactive']);?><br /><span style="color: <?php echo adrotate_prepare_color($banner['lastactive']);?>;"><?php echo date_i18n("F d, Y", $banner['lastactive']);?></span></td>
|
71 |
<td><strong><a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=edit&ad='.$banner['id']);?>" title="<?php _e('Edit', 'adrotate'); ?>"><?php echo stripslashes(html_entity_decode($banner['title']));?></a></strong> - <a href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=report&ad='.$disbanner['id']);?>" title="<?php _e('Stats', 'adrotate'); ?>"><?php _e('Stats', 'adrotate'); ?></a><span style="color:#999;"><?php if(strlen($grouplist) > 0) echo '<br /><span style="font-weight:bold;">'.__('Groups:', 'adrotate').'</span> '.$grouplist; ?></td>
|
|
|
72 |
<td><center><?php echo $stats['impressions']; ?></center></td>
|
73 |
<?php if($banner['tracker'] == "Y") { ?>
|
74 |
<td><center><?php echo $stats['clicks']; ?></center></td>
|
75 |
<td><center><?php echo $ctr; ?> %</center></td>
|
76 |
<?php } else { ?>
|
77 |
-
<td><center
|
78 |
-
<td><center
|
79 |
<?php } ?>
|
80 |
</tr>
|
81 |
<?php } ?>
|
33 |
<tr>
|
34 |
<td scope="col" class="manage-column column-cb check-column"><input type="checkbox" /></td>
|
35 |
<th width="2%"><center><?php _e('ID', 'adrotate'); ?></center></th>
|
36 |
+
<th><?php _e('Name', 'adrotate'); ?></th>
|
37 |
<th width="15%"><?php _e('Start / End', 'adrotate'); ?></th>
|
38 |
+
<?php if($adrotate_config['stats'] == 1) { ?>
|
39 |
+
<th width="5%"><center><?php _e('Shown', 'adrotate'); ?></center></th>
|
40 |
+
<th width="5%"><center><?php _e('Clicks', 'adrotate'); ?></center></th>
|
41 |
+
<th width="5%"><center><?php _e('CTR', 'adrotate'); ?></center></th>
|
42 |
+
<?php } ?>
|
43 |
</tr>
|
44 |
</thead>
|
45 |
<tbody>
|
47 |
foreach($disabled as $banner) {
|
48 |
$stats = adrotate_stats($banner['id']);
|
49 |
$grouplist = adrotate_ad_is_in_groups($banner['id']);
|
|
|
|
|
50 |
$ctr = adrotate_ctr($stats['clicks'], $stats['impressions']);
|
51 |
+
|
52 |
+
$class = ($class != 'alternate') ? 'alternate' : '';
|
53 |
|
54 |
if($adrotate_debug['publisher'] == true) {
|
55 |
echo "<tr><td> </td><td><strong>[DEBUG]</strong></td><td colspan='9'><pre>";
|
60 |
print_r($stats);
|
61 |
echo "</pre></td></tr>";
|
62 |
}
|
|
|
|
|
|
|
|
|
|
|
63 |
?>
|
64 |
+
<tr id='adrotateindex' class='<?php echo $class; ?>'>
|
65 |
<th class="check-column"><input type="checkbox" name="disabledbannercheck[]" value="<?php echo $banner['id']; ?>" /></th>
|
66 |
<td><center><?php echo $banner['id'];?></center></td>
|
|
|
67 |
<td><strong><a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=edit&ad='.$banner['id']);?>" title="<?php _e('Edit', 'adrotate'); ?>"><?php echo stripslashes(html_entity_decode($banner['title']));?></a></strong> - <a href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=report&ad='.$disbanner['id']);?>" title="<?php _e('Stats', 'adrotate'); ?>"><?php _e('Stats', 'adrotate'); ?></a><span style="color:#999;"><?php if(strlen($grouplist) > 0) echo '<br /><span style="font-weight:bold;">'.__('Groups:', 'adrotate').'</span> '.$grouplist; ?></td>
|
68 |
+
<td><?php echo date_i18n("F d, Y", $banner['firstactive']);?><br /><span style="color: <?php echo adrotate_prepare_color($banner['lastactive']);?>;"><?php echo date_i18n("F d, Y", $banner['lastactive']);?></span></td>
|
69 |
<td><center><?php echo $stats['impressions']; ?></center></td>
|
70 |
<?php if($banner['tracker'] == "Y") { ?>
|
71 |
<td><center><?php echo $stats['clicks']; ?></center></td>
|
72 |
<td><center><?php echo $ctr; ?> %</center></td>
|
73 |
<?php } else { ?>
|
74 |
+
<td><center>…</center></td>
|
75 |
+
<td><center>…</center></td>
|
76 |
<?php } ?>
|
77 |
</tr>
|
78 |
<?php } ?>
|
dashboard/publisher/adverts-edit.php
CHANGED
@@ -15,7 +15,7 @@ if(!$ad_edit_id) {
|
|
15 |
$wpdb->insert($wpdb->prefix."adrotate", array('title' => '', 'bannercode' => '', 'thetime' => $now, 'updated' => $now, 'author' => $userdata->user_login, 'imagetype' => 'dropdown', 'image' => '', 'paid' => 'U', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'os_other' => 'Y', 'responsive' => 'N', 'type' => 'empty', 'weight' => 6, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
|
16 |
$edit_id = $wpdb->insert_id;
|
17 |
|
18 |
-
$wpdb->insert($wpdb->prefix.'adrotate_schedule', array('name' => 'Schedule for ad '.$edit_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', '
|
19 |
$schedule_id = $wpdb->insert_id;
|
20 |
$wpdb->insert($wpdb->prefix.'adrotate_linkmeta', array('ad' => $edit_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
|
21 |
}
|
@@ -33,12 +33,31 @@ wp_enqueue_script('uploader-hook', plugins_url().'/adrotate/library/uploader-hoo
|
|
33 |
list($sday, $smonth, $syear, $shour, $sminute) = explode(" ", date("d m Y H i", $schedules->starttime));
|
34 |
list($eday, $emonth, $eyear, $ehour, $eminute) = explode(" ", date("d m Y H i", $schedules->stoptime));
|
35 |
|
36 |
-
$meta_array =
|
37 |
foreach($linkmeta as $meta) {
|
38 |
$meta_array[] = $meta->group;
|
39 |
}
|
40 |
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
if($ad_edit_id) {
|
44 |
if($edit_banner->type != 'empty') {
|
@@ -74,6 +93,10 @@ if($ad_edit_id) {
|
|
74 |
|
75 |
if($edit_banner->type == 'disabled')
|
76 |
echo '<div class="updated"><p>'. __('This ad has been disabled and does not rotate on your site!', 'adrotate').'</p></div>';
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
}
|
79 |
|
@@ -122,9 +145,11 @@ if($edit_banner->imagetype == "field") {
|
|
122 |
<p><em><a href="#" onclick="textatcursor('adrotate_bannercode','<iframe src="%asset%" height="250" frameborder="0" style="border:none;"></iframe>');return false;"><iframe src="%asset%" height="250" frameborder="0" style="border:none;"></iframe></a></em></p>
|
123 |
|
124 |
<p><strong><?php _e('Get paid as a publisher:', 'adrotate'); ?></strong></p>
|
125 |
-
<p
|
126 |
-
|
127 |
-
|
|
|
|
|
128 |
</td>
|
129 |
</tr>
|
130 |
<tr>
|
@@ -334,7 +359,7 @@ if($edit_banner->imagetype == "field") {
|
|
334 |
<label for="adrotate_tablet"><center><input disabled type="checkbox" name="adrotate_tablet" checked="1" /><br /><?php _e('Tablets', 'adrotate'); ?></center></label>
|
335 |
</td>
|
336 |
<td colspan="2" rowspan="2">
|
337 |
-
<em><?php _e('Also enable mobile support in the group this advert goes in or these are ignored.', 'adrotate
|
338 |
</td>
|
339 |
</tr>
|
340 |
<tr>
|
15 |
$wpdb->insert($wpdb->prefix."adrotate", array('title' => '', 'bannercode' => '', 'thetime' => $now, 'updated' => $now, 'author' => $userdata->user_login, 'imagetype' => 'dropdown', 'image' => '', 'paid' => 'U', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'os_other' => 'Y', 'responsive' => 'N', 'type' => 'empty', 'weight' => 6, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
|
16 |
$edit_id = $wpdb->insert_id;
|
17 |
|
18 |
+
$wpdb->insert($wpdb->prefix.'adrotate_schedule', array('name' => 'Schedule for ad '.$edit_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', 'daystarttime' => '0000', 'daystoptime' => '0000', 'day_mon' => 'Y', 'day_tue' => 'Y', 'day_wed' => 'Y', 'day_thu' => 'Y', 'day_fri' => 'Y', 'day_sat' => 'Y', 'day_sun' => 'Y'));
|
19 |
$schedule_id = $wpdb->insert_id;
|
20 |
$wpdb->insert($wpdb->prefix.'adrotate_linkmeta', array('ad' => $edit_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
|
21 |
}
|
33 |
list($sday, $smonth, $syear, $shour, $sminute) = explode(" ", date("d m Y H i", $schedules->starttime));
|
34 |
list($eday, $emonth, $eyear, $ehour, $eminute) = explode(" ", date("d m Y H i", $schedules->stoptime));
|
35 |
|
36 |
+
$meta_array = array();
|
37 |
foreach($linkmeta as $meta) {
|
38 |
$meta_array[] = $meta->group;
|
39 |
}
|
40 |
|
41 |
+
// Affiliate Partners
|
42 |
+
$partners = array(
|
43 |
+
"medianet" => array(
|
44 |
+
"url" => "http://bit.ly/2leh9sW",
|
45 |
+
"alt" => "Media.net",
|
46 |
+
"image" => "medianet.jpg"
|
47 |
+
),
|
48 |
+
"clicksor" => array(
|
49 |
+
"url" => "http://signup.clicksor.com/advertise_here.php?nid=1&srid=&ref=381832",
|
50 |
+
"alt" => "Clicksor",
|
51 |
+
"image" => "clicksor.png"
|
52 |
+
),
|
53 |
+
"viglink" => array(
|
54 |
+
"url" => "https://www.viglink.com/?vgref=2984797&vgtag=banner",
|
55 |
+
"alt" => "VigLink",
|
56 |
+
"image" => "viglink.png"
|
57 |
+
),
|
58 |
+
);
|
59 |
+
shuffle($partners);
|
60 |
+
$partners = array_slice($partners, 0, 2);
|
61 |
|
62 |
if($ad_edit_id) {
|
63 |
if($edit_banner->type != 'empty') {
|
93 |
|
94 |
if($edit_banner->type == 'disabled')
|
95 |
echo '<div class="updated"><p>'. __('This ad has been disabled and does not rotate on your site!', 'adrotate').'</p></div>';
|
96 |
+
|
97 |
+
// Depreciated stuff
|
98 |
+
if($edit_banner->responsive == 'Y')
|
99 |
+
echo '<div class="error"><p>'. __('This advert uses the obsolete Responsive feature. Please use the more reliable Mobile feature! Saving the advert will disable the responsive option silently.', 'adrotate').'</p></div>';
|
100 |
}
|
101 |
}
|
102 |
|
145 |
<p><em><a href="#" onclick="textatcursor('adrotate_bannercode','<iframe src="%asset%" height="250" frameborder="0" style="border:none;"></iframe>');return false;"><iframe src="%asset%" height="250" frameborder="0" style="border:none;"></iframe></a></em></p>
|
146 |
|
147 |
<p><strong><?php _e('Get paid as a publisher:', 'adrotate'); ?></strong></p>
|
148 |
+
<p><?php
|
149 |
+
foreach($partners as $partner) {
|
150 |
+
echo "<a href=\"".$partner['url']."\"><img alt=\"".$partner['alt']."\" height=\"125\" src=\"".plugins_url('../images/'.$partner['image'], dirname(__FILE__))."\" /></a> ";
|
151 |
+
}
|
152 |
+
?></p>
|
153 |
</td>
|
154 |
</tr>
|
155 |
<tr>
|
359 |
<label for="adrotate_tablet"><center><input disabled type="checkbox" name="adrotate_tablet" checked="1" /><br /><?php _e('Tablets', 'adrotate'); ?></center></label>
|
360 |
</td>
|
361 |
<td colspan="2" rowspan="2">
|
362 |
+
<em><?php _e('Also enable mobile support in the group this advert goes in or these are ignored.', 'adrotate'); ?><br /><?php _e('Operating system detection only detects iOS/Android/Other or neither.', 'adrotate'); ?></em>
|
363 |
</td>
|
364 |
</tr>
|
365 |
<tr>
|
dashboard/publisher/adverts-error.php
CHANGED
@@ -35,10 +35,10 @@
|
|
35 |
<table class="widefat tablesorter manage-ads-error" style="margin-top: .5em">
|
36 |
<thead>
|
37 |
<tr>
|
38 |
-
<
|
39 |
<th width="2%"><center><?php _e('ID', 'adrotate'); ?></center></th>
|
|
|
40 |
<th width="15%"><?php _e('Start / End', 'adrotate'); ?></th>
|
41 |
-
<th><?php _e('Title', 'adrotate'); ?></th>
|
42 |
</tr>
|
43 |
</thead>
|
44 |
<tbody>
|
@@ -54,22 +54,22 @@
|
|
54 |
|
55 |
$errorclass = '';
|
56 |
if($banner['type'] == 'error') $errorclass = ' row_yellow';
|
57 |
-
if($banner['type'] == 'expired') $errorclass = '
|
58 |
-
if($banner['type'] == '2days') $errorclass = '
|
59 |
?>
|
60 |
<tr id='adrotateindex' class='<?php echo $errorclass; ?>'>
|
61 |
<th class="check-column"><input type="checkbox" name="errorbannercheck[]" value="<?php echo $banner['id']; ?>" /></th>
|
62 |
<td><center><?php echo $banner['id'];?></center></td>
|
63 |
-
<td><?php echo date_i18n("F d, Y", $banner['firstactive']);?><br /><span style="color: <?php echo adrotate_prepare_color($banner['lastactive']);?>;"><?php echo date_i18n("F d, Y", $banner['lastactive']);?></span></td>
|
64 |
<td><strong><a class="row-title" href="<?php echo admin_url("/admin.php?page=adrotate-ads&view=edit&ad=".$banner['id']);?>" title="<?php _e('Edit', 'adrotate'); ?>"><?php echo stripslashes(html_entity_decode($banner['title']));?></a></strong> <?php if($adrotate_config['stats'] == 1 AND $banner['type'] != 'error') { ?>- <a href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=report&ad='.$banner['id']);?>" title="<?php _e('Stats', 'adrotate'); ?>"><?php _e('Stats', 'adrotate'); ?></a><?php } ?><span style="color:#999;"><?php if(strlen($grouplist) > 0) echo '<br /><span style="font-weight:bold;">'.__('Groups:', 'adrotate').'</span> '.$grouplist; ?></span></td>
|
|
|
65 |
</tr>
|
66 |
<?php } ?>
|
67 |
</tbody>
|
68 |
</table>
|
69 |
|
70 |
<p><center>
|
71 |
-
<span style="border: 1px solid #e6db55; height: 12px; width: 12px; background-color: #ffffe0"> </span> <?php _e("Configuration errors
|
72 |
-
<span style="border: 1px solid #
|
73 |
-
<span style="border: 1px solid #
|
74 |
</center></p>
|
75 |
</form>
|
35 |
<table class="widefat tablesorter manage-ads-error" style="margin-top: .5em">
|
36 |
<thead>
|
37 |
<tr>
|
38 |
+
<td scope="col" class="manage-column column-cb check-column"><input type="checkbox" /></td>
|
39 |
<th width="2%"><center><?php _e('ID', 'adrotate'); ?></center></th>
|
40 |
+
<th><?php _e('Name', 'adrotate'); ?></th>
|
41 |
<th width="15%"><?php _e('Start / End', 'adrotate'); ?></th>
|
|
|
42 |
</tr>
|
43 |
</thead>
|
44 |
<tbody>
|
54 |
|
55 |
$errorclass = '';
|
56 |
if($banner['type'] == 'error') $errorclass = ' row_yellow';
|
57 |
+
if($banner['type'] == 'expired') $errorclass = ' row_red';
|
58 |
+
if($banner['type'] == '2days') $errorclass = ' row_orange';
|
59 |
?>
|
60 |
<tr id='adrotateindex' class='<?php echo $errorclass; ?>'>
|
61 |
<th class="check-column"><input type="checkbox" name="errorbannercheck[]" value="<?php echo $banner['id']; ?>" /></th>
|
62 |
<td><center><?php echo $banner['id'];?></center></td>
|
|
|
63 |
<td><strong><a class="row-title" href="<?php echo admin_url("/admin.php?page=adrotate-ads&view=edit&ad=".$banner['id']);?>" title="<?php _e('Edit', 'adrotate'); ?>"><?php echo stripslashes(html_entity_decode($banner['title']));?></a></strong> <?php if($adrotate_config['stats'] == 1 AND $banner['type'] != 'error') { ?>- <a href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=report&ad='.$banner['id']);?>" title="<?php _e('Stats', 'adrotate'); ?>"><?php _e('Stats', 'adrotate'); ?></a><?php } ?><span style="color:#999;"><?php if(strlen($grouplist) > 0) echo '<br /><span style="font-weight:bold;">'.__('Groups:', 'adrotate').'</span> '.$grouplist; ?></span></td>
|
64 |
+
<td><?php echo date_i18n("F d, Y", $banner['firstactive']);?><br /><span style="color: <?php echo adrotate_prepare_color($banner['lastactive']);?>;"><?php echo date_i18n("F d, Y", $banner['lastactive']);?></span></td>
|
65 |
</tr>
|
66 |
<?php } ?>
|
67 |
</tbody>
|
68 |
</table>
|
69 |
|
70 |
<p><center>
|
71 |
+
<span style="border: 1px solid #e6db55; height: 12px; width: 12px; background-color: #ffffe0"> </span> <?php _e("Configuration errors", "adrotate"); ?>
|
72 |
+
<span style="border: 1px solid #c80; height: 12px; width: 12px; background-color: #fdefc3"> </span> <?php _e("Expires soon", "adrotate"); ?>
|
73 |
+
<span style="border: 1px solid #c00; height: 12px; width: 12px; background-color: #ffebe8"> </span> <?php _e("Expired", "adrotate"); ?>
|
74 |
</center></p>
|
75 |
</form>
|
dashboard/publisher/adverts-main.php
CHANGED
@@ -37,9 +37,8 @@
|
|
37 |
<tr>
|
38 |
<td scope="col" class="manage-column column-cb check-column"><input type="checkbox" /></td>
|
39 |
<th width="2%"><center><?php _e('ID', 'adrotate'); ?></center></th>
|
|
|
40 |
<th width="15%"><?php _e('Start / End', 'adrotate'); ?></th>
|
41 |
-
<th><?php _e('Title', 'adrotate'); ?></th>
|
42 |
-
<th width="5%"><center><?php _e('Weight', 'adrotate'); ?></center></th>
|
43 |
<?php if($adrotate_config['stats'] == 1) { ?>
|
44 |
<th width="5%"><center><?php _e('Shown', 'adrotate'); ?></center></th>
|
45 |
<th width="5%"><center><?php _e('Today', 'adrotate'); ?></center></th>
|
@@ -78,9 +77,8 @@
|
|
78 |
<tr id='adrotateindex' class='<?php echo $class; ?>'>
|
79 |
<th class="check-column"><input type="checkbox" name="bannercheck[]" value="<?php echo $banner['id']; ?>" /></th>
|
80 |
<td><center><?php echo $banner['id'];?></center></td>
|
81 |
-
<td><?php echo date_i18n("F d, Y", $banner['firstactive']);?><br /><span style="color: <?php echo adrotate_prepare_color($banner['lastactive']);?>;"><?php echo date_i18n("F d, Y", $banner['lastactive']);?></span></td>
|
82 |
<td><strong><a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=edit&ad='.$banner['id']);?>" title="<?php _e('Edit', 'adrotate'); ?>"><?php echo stripslashes(html_entity_decode($banner['title']));?></a></strong> <?php if($adrotate_config['stats'] == 1) { ?>- <a href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=report&ad='.$banner['id']);?>" title="<?php _e('Stats', 'adrotate'); ?>"><?php _e('Stats', 'adrotate'); ?></a><?php } ?><span style="color:#999;"><?php if(strlen($grouplist) > 0) echo '<br /><span style="font-weight:bold;">'.__('Groups:', 'adrotate').'</span> '.$grouplist; ?></span></td>
|
83 |
-
<td
|
84 |
<?php if($adrotate_config['stats'] == 1) { ?>
|
85 |
<td><center><?php echo $stats['impressions']; ?></center></td>
|
86 |
<td><center><?php echo $stats_today['impressions']; ?></center></td>
|
@@ -89,9 +87,9 @@
|
|
89 |
<td><center><?php echo $stats_today['clicks']; ?></center></td>
|
90 |
<td><center><?php echo $ctr; ?> %</center></td>
|
91 |
<?php } else { ?>
|
92 |
-
<td><center
|
93 |
-
<td><center
|
94 |
-
<td><center
|
95 |
<?php } ?>
|
96 |
<?php } ?>
|
97 |
</tr>
|
37 |
<tr>
|
38 |
<td scope="col" class="manage-column column-cb check-column"><input type="checkbox" /></td>
|
39 |
<th width="2%"><center><?php _e('ID', 'adrotate'); ?></center></th>
|
40 |
+
<th><?php _e('Name', 'adrotate'); ?></th>
|
41 |
<th width="15%"><?php _e('Start / End', 'adrotate'); ?></th>
|
|
|
|
|
42 |
<?php if($adrotate_config['stats'] == 1) { ?>
|
43 |
<th width="5%"><center><?php _e('Shown', 'adrotate'); ?></center></th>
|
44 |
<th width="5%"><center><?php _e('Today', 'adrotate'); ?></center></th>
|
77 |
<tr id='adrotateindex' class='<?php echo $class; ?>'>
|
78 |
<th class="check-column"><input type="checkbox" name="bannercheck[]" value="<?php echo $banner['id']; ?>" /></th>
|
79 |
<td><center><?php echo $banner['id'];?></center></td>
|
|
|
80 |
<td><strong><a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=edit&ad='.$banner['id']);?>" title="<?php _e('Edit', 'adrotate'); ?>"><?php echo stripslashes(html_entity_decode($banner['title']));?></a></strong> <?php if($adrotate_config['stats'] == 1) { ?>- <a href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=report&ad='.$banner['id']);?>" title="<?php _e('Stats', 'adrotate'); ?>"><?php _e('Stats', 'adrotate'); ?></a><?php } ?><span style="color:#999;"><?php if(strlen($grouplist) > 0) echo '<br /><span style="font-weight:bold;">'.__('Groups:', 'adrotate').'</span> '.$grouplist; ?></span></td>
|
81 |
+
<td><?php echo date_i18n("F d, Y", $banner['firstactive']);?><br /><span style="color: <?php echo adrotate_prepare_color($banner['lastactive']);?>;"><?php echo date_i18n("F d, Y", $banner['lastactive']);?></span></td>
|
82 |
<?php if($adrotate_config['stats'] == 1) { ?>
|
83 |
<td><center><?php echo $stats['impressions']; ?></center></td>
|
84 |
<td><center><?php echo $stats_today['impressions']; ?></center></td>
|
87 |
<td><center><?php echo $stats_today['clicks']; ?></center></td>
|
88 |
<td><center><?php echo $ctr; ?> %</center></td>
|
89 |
<?php } else { ?>
|
90 |
+
<td><center>…</center></td>
|
91 |
+
<td><center>…</center></td>
|
92 |
+
<td><center>…</center></td>
|
93 |
<?php } ?>
|
94 |
<?php } ?>
|
95 |
</tr>
|
images/medianet.jpg
ADDED
Binary file
|
images/viglink.png
CHANGED
Binary file
|
library/dashboard.css
CHANGED
@@ -31,7 +31,7 @@
|
|
31 |
/* Dashboard styles */
|
32 |
.postbox-ajdg { margin-bottom:20px; padding:0; min-width:255px; border:#dfdfdf 1px solid; background-color:#fff; -moz-box-shadow:inset 0 1px 0 #fff; -webkit-box-shadow:inset 0 1px 0 #fff; box-shadow:inset 0 1px 0 #fff; }
|
33 |
.postbox-ajdg h3 { margin:0; padding:7px 10px 7px 10px; box-shadow:#ddd 0px 1px 0px 0px; -moz-box-shadow:inset 0 1px 0 #ddd; -webkit-box-shadow:#ddd 0px 1px 0px 0px; line-height:15px; }
|
34 |
-
.postbox-ajdg .inside { margin:10px
|
35 |
.pro-image { padding:0px 3px 0px 0px; }
|
36 |
.ajdg-photo { border-radius: 5px; }
|
37 |
|
31 |
/* Dashboard styles */
|
32 |
.postbox-ajdg { margin-bottom:20px; padding:0; min-width:255px; border:#dfdfdf 1px solid; background-color:#fff; -moz-box-shadow:inset 0 1px 0 #fff; -webkit-box-shadow:inset 0 1px 0 #fff; box-shadow:inset 0 1px 0 #fff; }
|
33 |
.postbox-ajdg h3 { margin:0; padding:7px 10px 7px 10px; box-shadow:#ddd 0px 1px 0px 0px; -moz-box-shadow:inset 0 1px 0 #ddd; -webkit-box-shadow:#ddd 0px 1px 0px 0px; line-height:15px; }
|
34 |
+
.postbox-ajdg .inside { margin:10px 10px 0px 10px; padding:0px 10px 12px 10px; clear:both; min-height:40px; position:relative; }
|
35 |
.pro-image { padding:0px 3px 0px 0px; }
|
36 |
.ajdg-photo { border-radius: 5px; }
|
37 |
|
library/jquery.adrotate.dyngroup.js
CHANGED
@@ -56,15 +56,14 @@ speed : Time each slide is shown [integer: milliseconds, defaults to 3000]
|
|
56 |
} else {
|
57 |
counter++;
|
58 |
}
|
59 |
-
|
60 |
-
$cont.find(".c-" + counter).fadeIn(300);
|
61 |
|
62 |
// Impression tracker (Multiple ads)
|
63 |
var tracker = $cont.find(".c-" + counter + ' a').attr("data-track");
|
64 |
if(typeof tracker !== 'undefined') {
|
65 |
impressiontracker(tracker);
|
66 |
}
|
67 |
-
$cont.find(".c-" + index).
|
68 |
}
|
69 |
|
70 |
function play() {
|
56 |
} else {
|
57 |
counter++;
|
58 |
}
|
59 |
+
$cont.find(".c-" + counter).show();
|
|
|
60 |
|
61 |
// Impression tracker (Multiple ads)
|
62 |
var tracker = $cont.find(".c-" + counter + ' a').attr("data-track");
|
63 |
if(typeof tracker !== 'undefined') {
|
64 |
impressiontracker(tracker);
|
65 |
}
|
66 |
+
$cont.find(".c-" + index).hide();
|
67 |
}
|
68 |
|
69 |
function play() {
|
library/jquery.adrotate.responsive.js
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
/****************************************************************************************
|
2 |
-
* Dynamic responsive adverts for AdRotate *
|
3 |
-
* Arnan de Gans (http://www.arnan.me) *
|
4 |
-
* Version: 0.5 *
|
5 |
-
* With help from: Mathias Joergensen (http://www.moofy.me) *
|
6 |
-
* Original code: N/a *
|
7 |
-
****************************************************************************************/
|
8 |
-
|
9 |
-
/* ------------------------------------------------------------------------------------
|
10 |
-
* COPYRIGHT AND TRADEMARK NOTICE
|
11 |
-
* Copyright 2008-2017 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.
|
15 |
-
* By using this code you agree to indemnify Arnan de Gans from any
|
16 |
-
* liability that might arise from it's use.
|
17 |
-
------------------------------------------------------------------------------------ */
|
18 |
-
|
19 |
-
jQuery(document).ready(function() {
|
20 |
-
var resizeTimer;
|
21 |
-
var $window = jQuery(window);
|
22 |
-
|
23 |
-
function check_file_exists(fileToCheck) {
|
24 |
-
var tmp = new Image;
|
25 |
-
tmp.src = fileToCheck;
|
26 |
-
|
27 |
-
if(!tmp.complete) {
|
28 |
-
fileToCheck = fileToCheck.replace('.320', '.full').replace('.480', '.full').replace('.768', '.full').replace('.1024', '.full');
|
29 |
-
}
|
30 |
-
|
31 |
-
return fileToCheck;
|
32 |
-
}
|
33 |
-
|
34 |
-
function responsive_imageswap() {
|
35 |
-
jQuery('img.responsive').each(function() {
|
36 |
-
var $thisImg = jQuery(this);
|
37 |
-
var newSrc = $thisImg.attr('src');
|
38 |
-
|
39 |
-
if($window.width() <= 320) {
|
40 |
-
// Max 320 viewport
|
41 |
-
newSrc = newSrc.replace('.480', '.320').replace('.768', '.320').replace('.1024', '.320').replace('.full', '.320');
|
42 |
-
} else if($window.width() > 320 && $window.width() <= 480) {
|
43 |
-
// Max 480 viewport
|
44 |
-
newSrc = newSrc.replace('.320', '.480').replace('.768', '.480').replace('.1024', '.480').replace('.full', '.480');
|
45 |
-
} else if($window.width() > 480 && $window.width() <= 768) {
|
46 |
-
// Max 768 viewport
|
47 |
-
newSrc = newSrc.replace('.320', '.768').replace('.480', '.768').replace('.1024', '.768').replace('.full', '.768');
|
48 |
-
} else if($window.width() > 768 && $window.width() <= 1024) {
|
49 |
-
// Max 1024 viewport
|
50 |
-
newSrc = newSrc.replace('.320', '.1024').replace('.480', '.1024').replace('.768', '.1024').replace('.full', '.1024');
|
51 |
-
} else {
|
52 |
-
// Larger than 1024 viewport
|
53 |
-
newSrc = newSrc.replace('.320', '.full').replace('.480', '.full').replace('.768', '.full').replace('.1024', '.full');
|
54 |
-
}
|
55 |
-
|
56 |
-
newSrc = check_file_exists(newSrc);
|
57 |
-
$thisImg.attr('src', newSrc);
|
58 |
-
|
59 |
-
});
|
60 |
-
}
|
61 |
-
responsive_imageswap();
|
62 |
-
|
63 |
-
$window.resize(function() {
|
64 |
-
clearTimeout(resizeTimer);
|
65 |
-
resizeTimer = setTimeout(responsive_imageswap, 150);
|
66 |
-
});
|
67 |
-
|
68 |
-
$window.ready(function() {
|
69 |
-
clearTimeout(resizeTimer);
|
70 |
-
resizeTimer = setTimeout(responsive_imageswap, 150);
|
71 |
-
});
|
72 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/jquery.adrotate.tablesorter.js
CHANGED
@@ -21,7 +21,6 @@ jQuery(function() {
|
|
21 |
headers: {
|
22 |
4: { sorter: false },
|
23 |
5: { sorter: false },
|
24 |
-
6: { sorter: false },
|
25 |
7: { sorter: false },
|
26 |
8: { sorter: false },
|
27 |
}
|
21 |
headers: {
|
22 |
4: { sorter: false },
|
23 |
5: { sorter: false },
|
|
|
24 |
7: { sorter: false },
|
25 |
8: { sorter: false },
|
26 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.arnan.me/donate/?utm_campaign=donations&utm_medium=readm
|
|
4 |
Tags: ads, advert, adverts, banner, monetize, admin, advertise, adrotator, rotator, ad, advertising, advertisement, advertiser, publisher, adsense, chitika, clickbank, geo, geolocation, geotarget, banner manager, advert manager, campaign manager, maxmind, statistics, stats, report, geoselect, geolite, schedules, schedule, monetize, header, widget, html5 advert, javascript advert, tracking, clicks, impressions
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.7.1
|
7 |
-
Stable tag: 3.
|
8 |
License: GPLv3
|
9 |
|
10 |
The popular choice for monetizing your website with adverts while keeping things simple. Start making money today!
|
@@ -97,15 +97,22 @@ You can also post your questions on the [forum](https://ajdg.solutions/forums/?u
|
|
97 |
|
98 |
Be a Pro and go Pro. With [AdRotate Pro](https://ajdg.solutions/products/adrotate-for-wordpress/?utm_campaign=adrotate-page&utm_medium=readme&utm_source=adrotate-free)!
|
99 |
|
100 |
-
= 3.
|
101 |
-
* [fix]
|
102 |
-
* [fix]
|
103 |
-
|
104 |
-
|
105 |
-
* [
|
106 |
-
* [
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
All recent changes are available on the [AdRotate website](https://ajdg.solutions/products/adrotate-for-wordpress/development/?utm_campaign=development&utm_medium=readme&utm_source=adrotate-free).
|
111 |
|
@@ -113,9 +120,13 @@ NOTE: Unsolicited offers, parnterships, job offers, promotional emails or produc
|
|
113 |
|
114 |
== Upgrade Notice ==
|
115 |
|
116 |
-
= 3.
|
117 |
-
* [fix]
|
118 |
-
* [fix]
|
|
|
|
|
|
|
|
|
119 |
|
120 |
All recent changes are available on the [AdRotate website](https://ajdg.solutions/products/adrotate-for-wordpress/development/?utm_campaign=development&utm_medium=readme&utm_source=adrotate-free).
|
121 |
|
4 |
Tags: ads, advert, adverts, banner, monetize, admin, advertise, adrotator, rotator, ad, advertising, advertisement, advertiser, publisher, adsense, chitika, clickbank, geo, geolocation, geotarget, banner manager, advert manager, campaign manager, maxmind, statistics, stats, report, geoselect, geolite, schedules, schedule, monetize, header, widget, html5 advert, javascript advert, tracking, clicks, impressions
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.7.1
|
7 |
+
Stable tag: 3.19
|
8 |
License: GPLv3
|
9 |
|
10 |
The popular choice for monetizing your website with adverts while keeping things simple. Start making money today!
|
97 |
|
98 |
Be a Pro and go Pro. With [AdRotate Pro](https://ajdg.solutions/products/adrotate-for-wordpress/?utm_campaign=adrotate-page&utm_medium=readme&utm_source=adrotate-free)!
|
99 |
|
100 |
+
= 3.19 FREE =
|
101 |
+
* [fix] More clear color coding for adverts with errors
|
102 |
+
* [fix] Database prefix for transient cleanup wrong
|
103 |
+
* [fix] Improved PHP7 compatibility
|
104 |
+
* [change] Dashboard updates
|
105 |
+
* [change] Responsive feature no longer available
|
106 |
+
* [change] Using Responsive feature now causes an error
|
107 |
+
|
108 |
+
= 4.3 PRO =
|
109 |
+
* [fix] Advert renewal works again
|
110 |
+
* [fix] Fairer impression spread for adverts
|
111 |
+
* [fix] Schedules no longer editable for advertisers in some setups
|
112 |
+
* [fix] Improved PHP7 compatibility
|
113 |
+
* [change] Dashboard updates
|
114 |
+
* [change] Responsive feature no longer available
|
115 |
+
* [change] Using Responsive feature now causes an error
|
116 |
|
117 |
All recent changes are available on the [AdRotate website](https://ajdg.solutions/products/adrotate-for-wordpress/development/?utm_campaign=development&utm_medium=readme&utm_source=adrotate-free).
|
118 |
|
120 |
|
121 |
== Upgrade Notice ==
|
122 |
|
123 |
+
= 3.19 =
|
124 |
+
* [fix] More clear color coding for adverts with errors
|
125 |
+
* [fix] Database prefix for transient cleanup wrong
|
126 |
+
* [fix] Improved PHP7 compatibility
|
127 |
+
* [change] Dashboard updates
|
128 |
+
* [change] Responsive feature no longer available
|
129 |
+
* [change] Using Responsive feature now causes an error
|
130 |
|
131 |
All recent changes are available on the [AdRotate website](https://ajdg.solutions/products/adrotate-for-wordpress/development/?utm_campaign=development&utm_medium=readme&utm_source=adrotate-free).
|
132 |
|