Version Description
FREE = * [new] Support Dashboard * [new] Facebook Support Group widget * [update] No longer render dynamic CSS for groups on pageload * [update] Menu labels * [update] 150ms fading effect for adverts in dynamic groups * [fix] Graphs showing wrong date ranges for some users * [i18n] Updated all translation files
Download this release
Release Info
Developer | adegans |
Plugin | ![]() |
Version | 5.1 |
Comparing to | |
See all releases |
Code changes from version 5.0.1 to 5.1
- adrotate-manage-publisher.php +84 -97
- adrotate-output.php +24 -83
- adrotate-setup.php +83 -477
- adrotate-statistics.php +1 -1
- adrotate.php +45 -11
- dashboard/adrotatepro.php +8 -8
- dashboard/info.php +27 -19
- dashboard/publisher/adverts-generator.php +58 -60
- dashboard/support.php +86 -0
- images/icon-contact.png +0 -0
- images/icon-services.png +0 -0
- images/icon-support.png +0 -0
- language/adrotate-bg_BG.mo +0 -0
- language/adrotate-bg_BG.po +861 -585
- language/adrotate-el.mo +0 -0
- language/adrotate-el.po +863 -598
- language/adrotate-en_US.mo +0 -0
- language/adrotate-en_US.po +738 -521
- language/adrotate-es_ES.mo +0 -0
- language/adrotate-es_ES.po +854 -586
- language/adrotate-fr_FR.mo +0 -0
- language/adrotate-fr_FR.po +851 -574
- language/adrotate-id_ID.mo +0 -0
- language/adrotate-id_ID.po +908 -598
- language/adrotate-ja.mo +0 -0
- language/adrotate-ja.po +848 -606
- language/adrotate-pl_PL.mo +0 -0
- language/adrotate-pl_PL.po +858 -590
- language/adrotate-sr_RS.mo +0 -0
- language/adrotate-sr_RS.po +855 -598
- language/adrotate-sv_SV.mo +0 -0
- language/adrotate-sv_SV.po +860 -596
- library/dashboard.css +10 -0
- library/jquery.adrotate.dyngroup.js +8 -8
- readme.txt +24 -11
adrotate-manage-publisher.php
CHANGED
@@ -23,109 +23,37 @@ function adrotate_generate_input() {
|
|
23 |
if(isset($_POST['adrotate_id'])) $id = $_POST['adrotate_id'];
|
24 |
|
25 |
// Basic advert
|
26 |
-
$
|
27 |
-
if(isset($_POST['
|
28 |
if(isset($_POST['adrotate_targeturl'])) $targeturl = strip_tags(trim($_POST['adrotate_targeturl'], "\t\n "));
|
|
|
|
|
29 |
if(isset($_POST['adrotate_newwindow'])) $new_window = strip_tags(trim($_POST['adrotate_newwindow'], "\t\n "));
|
30 |
-
if(isset($_POST['adrotate_nofollow'])) $nofollow = strip_tags(trim($_POST['adrotate_nofollow'], "\t\n "));
|
31 |
-
if(isset($_POST['adrotate_image'])) $basic_field = strip_tags(trim($_POST['adrotate_image'], "\t\n "));
|
32 |
-
if(isset($_POST['adrotate_basic_dropdown'])) $basic_dropdown = strip_tags(trim($_POST['adrotate_basic_dropdown'], "\t\n "));
|
33 |
-
if(isset($_POST['adrotate_width'])) $adwidth = strip_tags(trim($_POST['adrotate_width'], "\t\n "));
|
34 |
-
if(isset($_POST['adrotate_height'])) $adheight = strip_tags(trim($_POST['adrotate_height'], "\t\n "));
|
35 |
-
|
36 |
-
// HTML5/Flash advert
|
37 |
-
$html5_dropdown = $$html5_adwidth = $html5_adheight = $html5_clicktag = $html5_targeturl = '';
|
38 |
-
if(isset($_POST['adrotate_html5_dropdown'])) $html5_dropdown = strip_tags(trim($_POST['adrotate_html5_dropdown'], "\t\n "));
|
39 |
-
if(isset($_POST['adrotate_html5_width'])) $html5_adwidth = strip_tags(trim($_POST['adrotate_html5_width'], "\t\n "));
|
40 |
-
if(isset($_POST['adrotate_html5_height'])) $html5_adheight = strip_tags(trim($_POST['adrotate_html5_height'], "\t\n "));
|
41 |
-
if(isset($_POST['adrotate_html5_clicktag'])) $html5_clicktag = strip_tags(trim($_POST['adrotate_html5_clicktag'], "\t\n "));
|
42 |
-
if(isset($_POST['adrotate_html5_targeturl'])) $html5_targeturl = strip_tags(trim(strtolower($_POST['adrotate_html5_targeturl']), "\t\n "));
|
43 |
|
44 |
if(current_user_can('adrotate_ad_manage')) {
|
45 |
-
//
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
if((is_numeric($adheight) AND $adheight < 1 OR $adheight > 9999) OR $adheight == '' OR !is_numeric($adheight)) {
|
54 |
-
$adheight = '';
|
55 |
-
} else {
|
56 |
-
$adheight = ' height="'.$adheight.'"';
|
57 |
-
}
|
58 |
-
|
59 |
-
// Determine image settings ($basic_field has priority!)
|
60 |
-
if(strlen($basic_field) > 1) {
|
61 |
-
$imagetype = "field";
|
62 |
-
$image = $basic_field;
|
63 |
-
$asset = "<img src=\"%asset%\"".$adwidth.$adheight." />";
|
64 |
-
} else if(strlen($basic_dropdown) > 1) {
|
65 |
-
$imagetype = "dropdown";
|
66 |
-
$image = WP_CONTENT_URL."/%folder%/".$basic_dropdown;
|
67 |
-
$asset = "<img src=\"%asset%\"".$adwidth.$adheight." />";
|
68 |
-
} else {
|
69 |
-
$imagetype = $image = "";
|
70 |
-
$asset = $advert_text; // Text advert
|
71 |
-
}
|
72 |
-
|
73 |
-
// Open in a new window?
|
74 |
-
if(isset($new_window) AND strlen($new_window) != 0) {
|
75 |
-
$new_window = ' target="_blank"';
|
76 |
-
} else {
|
77 |
-
$new_window = '';
|
78 |
-
}
|
79 |
-
|
80 |
-
// Set nofollow?
|
81 |
-
if(isset($nofollow) AND strlen($nofollow) != 0) {
|
82 |
-
$nofollow = ' rel="nofollow"';
|
83 |
-
} else {
|
84 |
-
$nofollow = '';
|
85 |
-
}
|
86 |
-
|
87 |
-
// Generate code
|
88 |
-
$bannercode = "<a href=\"".$targeturl."\"".$new_window.$nofollow.">".$asset."</a>";
|
89 |
-
}
|
90 |
-
|
91 |
-
// HTML5/FLASH advert
|
92 |
-
if(strlen($html5_dropdown) > 0) {
|
93 |
-
$imagetype = "dropdown";
|
94 |
-
$image = WP_CONTENT_URL."/%folder%/".$html5_dropdown;
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
if((is_numeric($html5_adheight) AND $html5_adheight < 1 OR $html5_adheight > 9999) OR $html5_adheight == '' OR !is_numeric($html5_adheight)) {
|
103 |
-
$adheight = '90';
|
104 |
-
} else {
|
105 |
-
$adheight = $html5_adheight;
|
106 |
-
}
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
$clicktag = '';
|
113 |
-
}
|
114 |
-
|
115 |
-
// Determine advert type
|
116 |
-
$extension = explode(".", $html5_dropdown);
|
117 |
-
$extension = end($extension);
|
118 |
-
|
119 |
-
// Generate HTML5 code
|
120 |
-
if($extension == "html" OR $extension == "htm") {
|
121 |
-
$bannercode = "<iframe src=\"%asset%\" width=\"".$html5_adwidth."\" height=\"".$html5_adheight."\" frameborder=\"0\" style=\"border:none;\"></iframe>";
|
122 |
-
}
|
123 |
|
124 |
-
|
125 |
-
|
126 |
-
$bannercode = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\" width=\"".$adwidth."\" height=\"".$adheight."\" id=\"ajdg-flash-".$id."\"><param name=\"movie\" value=\"%asset%\"><param name=\"quality\" value=\"high\"><embed src=\"%asset%".$clicktag."\" quality=\"high\" width=\"".$adwidth."\" height=\"".$adheight."\" name=\"ajdg-flash-".$id."\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed></object>";
|
127 |
-
}
|
128 |
-
}
|
129 |
|
130 |
// Save the ad to the DB
|
131 |
$wpdb->update($wpdb->prefix.'adrotate', array('bannercode' => $bannercode, 'imagetype' => $imagetype, 'image' => $image), array('id' => $id));
|
@@ -294,6 +222,66 @@ function adrotate_insert_input() {
|
|
294 |
adrotate_prepare_evaluate_ads(false);
|
295 |
}
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
adrotate_return('adrotate-ads', 200);
|
298 |
exit;
|
299 |
} else {
|
@@ -758,7 +746,6 @@ function adrotate_options_submit() {
|
|
758 |
|
759 |
$config['widgetalign'] = (isset($_POST['adrotate_widgetalign'])) ? 'Y' : 'N';
|
760 |
$config['widgetpadding'] = (isset($_POST['adrotate_widgetpadding'])) ? 'Y' : 'N';
|
761 |
-
$config['adminbar'] = (isset($_POST['adrotate_adminbar'])) ? 'Y' : 'N';
|
762 |
$config['hide_schedules'] = (isset($_POST['adrotate_hide_schedules'])) ? 'Y' : 'N';
|
763 |
$config['w3caching'] = (isset($_POST['adrotate_w3caching'])) ? 'Y' : 'N';
|
764 |
$config['borlabscache'] = (isset($_POST['adrotate_borlabscache'])) ? 'Y' : 'N';
|
23 |
if(isset($_POST['adrotate_id'])) $id = $_POST['adrotate_id'];
|
24 |
|
25 |
// Basic advert
|
26 |
+
$fullsize_image = $targeturl = $nofollow = $basic_dropdown = $adwidth = $adheight = '';
|
27 |
+
if(isset($_POST['adrotate_fullsize_dropdown'])) $fullsize_image = strip_tags(trim($_POST['adrotate_fullsize_dropdown'], "\t\n "));
|
28 |
if(isset($_POST['adrotate_targeturl'])) $targeturl = strip_tags(trim($_POST['adrotate_targeturl'], "\t\n "));
|
29 |
+
|
30 |
+
$new_window = '';
|
31 |
if(isset($_POST['adrotate_newwindow'])) $new_window = strip_tags(trim($_POST['adrotate_newwindow'], "\t\n "));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
if(current_user_can('adrotate_ad_manage')) {
|
34 |
+
// Fullsize Image & figure out adwidth and adheight
|
35 |
+
$fullsize_size = @getimagesize(WP_CONTENT_URL."/".$adrotate_config['banner_folder']."/".$fullsize_image);
|
36 |
+
if($fullsize_size){
|
37 |
+
$adwidth = ' width="'.$fullsize_size[0].'"';
|
38 |
+
$adheight = ' height="'.$fullsize_size[1].'"';
|
39 |
+
} else {
|
40 |
+
$adwidth = $adheight = '';
|
41 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
+
// Open in a new window?
|
44 |
+
if(isset($new_window) AND strlen($new_window) != 0) {
|
45 |
+
$new_window = ' target="_blank"';
|
46 |
+
} else {
|
47 |
+
$new_window = '';
|
48 |
+
}
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
// Determine image settings
|
51 |
+
$imagetype = "dropdown";
|
52 |
+
$image = WP_CONTENT_URL."/%folder%/".$fullsize_image;
|
53 |
+
$asset = "<img src=\"%asset%\"".$adwidth.$adheight." />";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
+
// Generate code
|
56 |
+
$bannercode = "<a href=\"".$targeturl."\"".$new_window.">".$asset."</a>";
|
|
|
|
|
|
|
57 |
|
58 |
// Save the ad to the DB
|
59 |
$wpdb->update($wpdb->prefix.'adrotate', array('bannercode' => $bannercode, 'imagetype' => $imagetype, 'image' => $image), array('id' => $id));
|
222 |
adrotate_prepare_evaluate_ads(false);
|
223 |
}
|
224 |
|
225 |
+
// Generate CSS for group
|
226 |
+
if($align == 0) { // None
|
227 |
+
$group_align = '';
|
228 |
+
} else if($align == 1) { // Left
|
229 |
+
$group_align = ' float:left; clear:left;';
|
230 |
+
} else if($align == 2) { // Right
|
231 |
+
$group_align = ' float:right; clear:right;';
|
232 |
+
} else if($align == 3) { // Center
|
233 |
+
$group_align = ' margin: 0 auto;';
|
234 |
+
}
|
235 |
+
|
236 |
+
$output_css = "";
|
237 |
+
if($modus == 0 AND ($admargin_top > 0 OR $admargin_right > 0 OR $admargin_bottom > 0 OR $admargin_left > 0 OR $align > 0)) { // Single ad group
|
238 |
+
if($align < 3) {
|
239 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { margin:".$admargin_top."px ".$admargin_right."px ".$admargin_bottom."px ".$admargin_left."px;".$group_align." }\n";
|
240 |
+
} else {
|
241 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { ".$group_align." }\n";
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
if($modus == 1) { // Dynamic group
|
246 |
+
if($adwidth != 'auto') {
|
247 |
+
$width = "width:100%; max-width:".$adwidth."px;";
|
248 |
+
} else {
|
249 |
+
$width = "width:auto;";
|
250 |
+
}
|
251 |
+
|
252 |
+
if($adheight != 'auto') {
|
253 |
+
$height = "height:100%; max-height:".$adheight."px;";
|
254 |
+
} else {
|
255 |
+
$height = "height:auto;";
|
256 |
+
}
|
257 |
+
|
258 |
+
if($align < 3) {
|
259 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { margin:".$admargin_top."px ".$admargin_right."px ".$admargin_bottom."px ".$admargin_left."px;".$width." ".$height.$group_align." }\n";
|
260 |
+
} else {
|
261 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { ".$width." ".$height.$group_align." }\n";
|
262 |
+
}
|
263 |
+
|
264 |
+
unset($width_sum, $width, $height_sum, $height);
|
265 |
+
}
|
266 |
+
|
267 |
+
if($modus == 2) { // Block group
|
268 |
+
if($adwidth != 'auto') {
|
269 |
+
$width_sum = $columns * ($admargin_left + $adwidth + $admargin_right);
|
270 |
+
$grid_width = "min-width:".$admargin_left."px; max-width:".$width_sum."px;";
|
271 |
+
} else {
|
272 |
+
$grid_width = "width:auto;";
|
273 |
+
}
|
274 |
+
|
275 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { ".$grid_width.$group_align." }\n";
|
276 |
+
$output_css .= "\t.b".$adrotate_config['adblock_disguise']."-".$id." { margin:".$admargin_top."px ".$admargin_right."px ".$admargin_bottom."px ".$admargin_left."px; }\n";
|
277 |
+
unset($width_sum, $grid_width, $height_sum, $grid_height);
|
278 |
+
}
|
279 |
+
|
280 |
+
$group_css = get_option('adrotate_group_css');
|
281 |
+
$group_css[$id] = $output_css;
|
282 |
+
update_option('adrotate_group_css', $group_css);
|
283 |
+
// end CSS
|
284 |
+
|
285 |
adrotate_return('adrotate-ads', 200);
|
286 |
exit;
|
287 |
} else {
|
746 |
|
747 |
$config['widgetalign'] = (isset($_POST['adrotate_widgetalign'])) ? 'Y' : 'N';
|
748 |
$config['widgetpadding'] = (isset($_POST['adrotate_widgetpadding'])) ? 'Y' : 'N';
|
|
|
749 |
$config['hide_schedules'] = (isset($_POST['adrotate_hide_schedules'])) ? 'Y' : 'N';
|
750 |
$config['w3caching'] = (isset($_POST['adrotate_w3caching'])) ? 'Y' : 'N';
|
751 |
$config['borlabscache'] = (isset($_POST['adrotate_borlabscache'])) ? 'Y' : 'N';
|
adrotate-output.php
CHANGED
@@ -467,11 +467,11 @@ function adrotate_ad_output($id, $group = 0, $name, $bannercode, $tracker, $imag
|
|
467 |
}
|
468 |
|
469 |
/*-------------------------------------------------------------
|
470 |
-
Name:
|
471 |
Purpose: Add required scripts to site head
|
472 |
Since: 3.6
|
473 |
-------------------------------------------------------------*/
|
474 |
-
function
|
475 |
global $adrotate_config;
|
476 |
|
477 |
$in_footer = false;
|
@@ -523,96 +523,37 @@ function adrotate_custom_javascript() {
|
|
523 |
}
|
524 |
|
525 |
/*-------------------------------------------------------------
|
526 |
-
Name:
|
527 |
Purpose: Add required CSS to site head
|
528 |
Since: 3.8
|
529 |
-------------------------------------------------------------*/
|
530 |
-
function
|
531 |
global $wpdb, $adrotate_config;
|
532 |
|
533 |
-
$
|
534 |
-
|
535 |
-
$groups = $wpdb->get_results("SELECT `id`, `modus`, `gridrows`, `gridcolumns`, `adwidth`, `adheight`, `admargin`, `align` FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' ORDER BY `id` ASC;");
|
536 |
-
if($groups) {
|
537 |
-
$output_css = "\t.g { margin:0px; padding:0px; overflow:hidden; line-height:1; zoom:1; }\n";
|
538 |
-
$output_css .= "\t.g img { height:auto; }\n";
|
539 |
-
$output_css .= "\t.g-col { position:relative; float:left; }\n";
|
540 |
-
$output_css .= "\t.g-col:first-child { margin-left: 0; }\n";
|
541 |
-
$output_css .= "\t.g-col:last-child { margin-right: 0; }\n";
|
542 |
-
|
543 |
-
foreach($groups as $group) {
|
544 |
-
if($group->align == 0) { // None
|
545 |
-
$group_align = '';
|
546 |
-
} else if($group->align == 1) { // Left
|
547 |
-
$group_align = ' float:left; clear:left;';
|
548 |
-
} else if($group->align == 2) { // Right
|
549 |
-
$group_align = ' float:right; clear:right;';
|
550 |
-
} else if($group->align == 3) { // Center
|
551 |
-
$group_align = ' margin: 0 auto;';
|
552 |
-
}
|
553 |
-
|
554 |
-
if($group->modus == 0 AND ($group->admargin > 0 OR $group->align > 0)) { // Single ad group
|
555 |
-
if($group->align < 3) {
|
556 |
-
$output_css .= "\t.g-".$group->id." { margin:".$group->admargin."px;".$group_align." }\n";
|
557 |
-
} else {
|
558 |
-
$output_css .= "\t.g-".$group->id." { ".$group_align." }\n";
|
559 |
-
}
|
560 |
-
}
|
561 |
-
|
562 |
-
if($group->modus == 1) { // Dynamic group
|
563 |
-
if($group->adwidth != 'auto') {
|
564 |
-
$width = "width:100%; max-width:".$group->adwidth."px;";
|
565 |
-
} else {
|
566 |
-
$width = "width:auto;";
|
567 |
-
}
|
568 |
-
|
569 |
-
if($group->adheight != 'auto') {
|
570 |
-
$height = "height:100%; max-height:".$group->adheight."px;";
|
571 |
-
} else {
|
572 |
-
$height = "height:auto;";
|
573 |
-
}
|
574 |
-
|
575 |
-
if($group->align < 3) {
|
576 |
-
$output_css .= "\t.g-".$group->id." { margin:".$group->admargin."px;".$width." ".$height.$group_align." }\n";
|
577 |
-
} else {
|
578 |
-
$output_css .= "\t.g-".$group->id." { ".$width." ".$height.$group_align." }\n";
|
579 |
-
}
|
580 |
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
$output_css .= "\t.g-".$group->id." { ".$grid_width.$group_align." }\n";
|
593 |
-
$output_css .= "\t.b-".$group->id." { margin:".$group->admargin."px; }\n";
|
594 |
-
unset($width_sum, $grid_width, $height_sum, $grid_height);
|
595 |
-
}
|
596 |
}
|
597 |
-
$output_css .= "\t@media only screen and (max-width: 480px) {\n";
|
598 |
-
$output_css .= "\t\t.g-col, .g-dyn, .g-single { width:100%; margin-left:0; margin-right:0; }\n";
|
599 |
-
$output_css .= "\t}\n";
|
600 |
-
unset($groups);
|
601 |
}
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
unset($output_css);
|
609 |
-
}
|
610 |
-
if($adrotate_config['widgetpadding'] == "Y") {
|
611 |
-
$output .= ".adrotate_widgets { overflow:hidden; padding:0; }\n";
|
612 |
-
}
|
613 |
-
$output .= "</style>\n";
|
614 |
-
$output .= "<!-- /AdRotate CSS -->\n\n";
|
615 |
}
|
|
|
|
|
616 |
|
617 |
echo $output;
|
618 |
}
|
467 |
}
|
468 |
|
469 |
/*-------------------------------------------------------------
|
470 |
+
Name: adrotate_scripts
|
471 |
Purpose: Add required scripts to site head
|
472 |
Since: 3.6
|
473 |
-------------------------------------------------------------*/
|
474 |
+
function adrotate_scripts() {
|
475 |
global $adrotate_config;
|
476 |
|
477 |
$in_footer = false;
|
523 |
}
|
524 |
|
525 |
/*-------------------------------------------------------------
|
526 |
+
Name: adrotate_header
|
527 |
Purpose: Add required CSS to site head
|
528 |
Since: 3.8
|
529 |
-------------------------------------------------------------*/
|
530 |
+
function adrotate_header() {
|
531 |
global $wpdb, $adrotate_config;
|
532 |
|
533 |
+
$generated_css = get_option( 'adrotate_group_css', array() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
|
535 |
+
$output = "\n<!-- This site is using AdRotate v".ADROTATE_DISPLAY." to display their advertisements - https://ajdg.solutions/products/adrotate-for-wordpress/ -->\n";
|
536 |
+
$output .= "<!-- AdRotate CSS -->\n";
|
537 |
+
$output .= "<style type=\"text/css\" media=\"screen\">\n";
|
538 |
+
$output .= "\t.g".$adrotate_config['adblock_disguise']." { margin:0px; padding:0px; overflow:hidden; line-height:1; zoom:1; }\n";
|
539 |
+
$output .= "\t.g".$adrotate_config['adblock_disguise']." img { height:auto; }\n";
|
540 |
+
$output .= "\t.g".$adrotate_config['adblock_disguise']."-col { position:relative; float:left; }\n";
|
541 |
+
$output .= "\t.g".$adrotate_config['adblock_disguise']."-col:first-child { margin-left: 0; }\n";
|
542 |
+
$output .= "\t.g".$adrotate_config['adblock_disguise']."-col:last-child { margin-right: 0; }\n";
|
543 |
+
foreach($generated_css as $group_id => $css) {
|
544 |
+
if(strlen($css) > 0) {
|
545 |
+
$output .= $css;
|
|
|
|
|
|
|
|
|
546 |
}
|
|
|
|
|
|
|
|
|
547 |
}
|
548 |
+
unset($generated_css);
|
549 |
+
$output .= "\t@media only screen and (max-width: 480px) {\n";
|
550 |
+
$output .= "\t\t.g".$adrotate_config['adblock_disguise']."-col, .g".$adrotate_config['adblock_disguise']."-dyn, .g".$adrotate_config['adblock_disguise']."-single { width:100%; margin-left:0; margin-right:0; }\n";
|
551 |
+
$output .= "\t}\n";
|
552 |
+
if($adrotate_config['widgetpadding'] == "Y") {
|
553 |
+
$output .= ".adrotate_widgets, .ajdg_bnnrwidgets, .ajdg_grpwidgets { overflow:hidden; padding:0; }\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
}
|
555 |
+
$output .= "</style>\n";
|
556 |
+
$output .= "<!-- /AdRotate CSS -->\n\n";
|
557 |
|
558 |
echo $output;
|
559 |
}
|
adrotate-setup.php
CHANGED
@@ -260,7 +260,6 @@ function adrotate_check_config() {
|
|
260 |
if(!isset($config['enable_geo_advertisers'])) $config['enable_geo_advertisers'] = 0;
|
261 |
if(!isset($config['adblock_disguise'])) $config['adblock_disguise'] = '';
|
262 |
if(!isset($config['banner_folder'])) $config['banner_folder'] = "banners";
|
263 |
-
if(!isset($config['adminbar']) OR ($config['adminbar'] != 'Y' AND $config['adminbar'] != 'N')) $config['adminbar'] = 'Y';
|
264 |
if(!isset($config['impression_timer']) OR $config['impression_timer'] < 10 OR $config['impression_timer'] > 3600) $config['impression_timer'] = 60;
|
265 |
if(!isset($config['click_timer']) OR $config['click_timer'] < 60 OR $config['click_timer'] > 86400) $config['click_timer'] = 86400;
|
266 |
if(!isset($config['hide_schedules']) OR ($config['hide_schedules'] != 'Y' AND $config['hide_schedules'] != 'N')) $config['hide_schedules'] = 'N';
|
@@ -618,319 +617,6 @@ function adrotate_database_upgrade() {
|
|
618 |
|
619 |
$adrotate_db_version = get_option("adrotate_db_version");
|
620 |
|
621 |
-
// Database: 24
|
622 |
-
// AdRotate: 3.8b412
|
623 |
-
if($adrotate_db_version['current'] < 24) {
|
624 |
-
if($wpdb->get_var("SHOW TABLES LIKE '{$wpdb->prefix}adrotate_stats_tracker'")) {
|
625 |
-
$wpdb->query("RENAME TABLE `{$wpdb->prefix}adrotate_stats_tracker` TO `{$wpdb->prefix}adrotate_stats`;");
|
626 |
-
}
|
627 |
-
}
|
628 |
-
|
629 |
-
// Database: 25
|
630 |
-
// AdRotate: 3.8b413
|
631 |
-
if($adrotate_db_version['current'] < 25) {
|
632 |
-
$wpdb->query("CREATE INDEX `timer` ON `{$wpdb->prefix}adrotate_tracker` (timer);");
|
633 |
-
$wpdb->query("CREATE INDEX `ipaddress` ON `{$wpdb->prefix}adrotate_tracker` (ipaddress);");
|
634 |
-
$wpdb->query("CREATE INDEX `ad` ON `{$wpdb->prefix}adrotate_stats` (ad);");
|
635 |
-
$wpdb->query("CREATE INDEX `thetime` ON `{$wpdb->prefix}adrotate_stats` (thetime);");
|
636 |
-
}
|
637 |
-
|
638 |
-
// Database: 26
|
639 |
-
// AdRotate: 3.8.1
|
640 |
-
if($adrotate_db_version['current'] < 26) {
|
641 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'budget', 'double NOT NULL default \'0\' AFTER `sortorder`');
|
642 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'crate', 'double NOT NULL default \'0\' AFTER `budget`');
|
643 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'irate', 'double NOT NULL default \'0\' AFTER `crate`');
|
644 |
-
}
|
645 |
-
|
646 |
-
// Database: 30
|
647 |
-
// AdRotate: 3.8.3.4
|
648 |
-
if($adrotate_db_version['current'] < 30) {
|
649 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'wrapper_before', 'longtext NOT NULL AFTER `page_loc`');
|
650 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'wrapper_after', 'longtext NOT NULL AFTER `wrapper_before`');
|
651 |
-
}
|
652 |
-
|
653 |
-
// Database: 32
|
654 |
-
// AdRotate: 3.8.4.4
|
655 |
-
if($adrotate_db_version['current'] < 32) {
|
656 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'cities', 'text NOT NULL AFTER `irate`');
|
657 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'countries', 'text NOT NULL AFTER `cities`');
|
658 |
-
$geo_array = serialize(array());
|
659 |
-
$wpdb->query("UPDATE `{$wpdb->prefix}adrotate` SET `cities` = '$geo_array' WHERE `cities` = '';");
|
660 |
-
$wpdb->query("UPDATE `{$wpdb->prefix}adrotate` SET `countries` = '$geo_array' WHERE `countries` = '';");
|
661 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'geo', 'tinyint(1) NOT NULL default \'0\' AFTER `page_loc`');
|
662 |
-
}
|
663 |
-
|
664 |
-
// Database: 33
|
665 |
-
// AdRotate: 3.8.6
|
666 |
-
if($adrotate_db_version['current'] < 33) {
|
667 |
-
adrotate_del_column("{$wpdb->prefix}adrotate_groups", 'token');
|
668 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'modus', 'tinyint(1) NOT NULL default \'0\' AFTER `name`');
|
669 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'gridrows', 'int(3) NOT NULL default \'2\' AFTER `wrapper_after`');
|
670 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'gridcolumns', 'int(3) NOT NULL default \'2\' AFTER `gridrows`');
|
671 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'admargin', 'int(3) NOT NULL default \'1\' AFTER `gridcolumns`');
|
672 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'adwidth', 'varchar(4) NOT NULL default \'125\' AFTER `admargin`');
|
673 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'adheight', 'varchar(4) NOT NULL default \'125\' AFTER `adwidth`');
|
674 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'adspeed', 'int(5) NOT NULL default \'6000\' AFTER `adheight`');
|
675 |
-
}
|
676 |
-
|
677 |
-
// Database: 36
|
678 |
-
// AdRotate: 3.8.10
|
679 |
-
if($adrotate_db_version['current'] < 36) {
|
680 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'admargin_bottom', 'int(3) NOT NULL default \'1\' AFTER `admargin`');
|
681 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'admargin_left', 'int(3) NOT NULL default \'1\' AFTER `admargin_bottom`');
|
682 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'admargin_right', 'int(3) NOT NULL default \'1\' AFTER `admargin_left`');
|
683 |
-
}
|
684 |
-
|
685 |
-
// Database: 38
|
686 |
-
// AdRotate: 3.9
|
687 |
-
if($adrotate_db_version['current'] < 38) {
|
688 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_linkmeta", 'schedule', 'int(5) NOT NULL default \'0\' AFTER `user`');
|
689 |
-
$schedules = $wpdb->get_results("SELECT `id`, `ad` FROM {$wpdb->prefix}adrotate_schedule ORDER BY `id` ASC;");
|
690 |
-
foreach($schedules as $schedule) {
|
691 |
-
$wpdb->insert("{$wpdb->prefix}adrotate_linkmeta", array('ad' => $schedule->ad, 'group' => 0, 'user' => 0, 'schedule' => $schedule->id), array('%d', '%d', '%d', '%d', '%d'));
|
692 |
-
unset($schedule);
|
693 |
-
}
|
694 |
-
unset($schedules);
|
695 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'name', 'varchar(255) NOT NULL default \'\' AFTER `id`');
|
696 |
-
adrotate_del_column("{$wpdb->prefix}adrotate_schedule", 'ad');
|
697 |
-
|
698 |
-
$schedules = $wpdb->get_results("SELECT `id` FROM {$wpdb->prefix}adrotate_schedule WHERE `name` = '' ORDER BY `id` ASC;");
|
699 |
-
foreach($schedules as $schedule) {
|
700 |
-
$wpdb->update("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule '.$schedule->id), array('id' => $schedule->id));
|
701 |
-
unset($schedule);
|
702 |
-
}
|
703 |
-
unset($schedules);
|
704 |
-
}
|
705 |
-
|
706 |
-
// Database: 39
|
707 |
-
// AdRotate: 3.9.1
|
708 |
-
if($adrotate_db_version['current'] < 39) {
|
709 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_tracker", 'country', 'text NOT NULL AFTER `useragent`');
|
710 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_tracker", 'city', 'text NOT NULL AFTER `country`');
|
711 |
-
}
|
712 |
-
|
713 |
-
// Database: 40
|
714 |
-
// AdRotate: 3.9.9
|
715 |
-
if($adrotate_db_version['current'] < 40) {
|
716 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'responsive', 'varchar(5) NOT NULL default \'N\' AFTER `tracker`');
|
717 |
-
}
|
718 |
-
|
719 |
-
// Database: 41
|
720 |
-
// AdRotate: 3.9.12
|
721 |
-
if($adrotate_db_version['current'] < 41) {
|
722 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'page_par', 'tinyint(1) NOT NULL default \'0\' AFTER `page_loc`');
|
723 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'cat_par', 'tinyint(1) NOT NULL default \'0\' AFTER `cat_loc`');
|
724 |
-
}
|
725 |
-
|
726 |
-
// Database: 42
|
727 |
-
// AdRotate: 3.10
|
728 |
-
if($adrotate_db_version['current'] < 42) {
|
729 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'spread', 'varchar(5) NOT NULL default \'N\' AFTER `maximpressions`');
|
730 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'hourimpressions', 'int(15) NOT NULL default \'0\' AFTER `spread`');
|
731 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_groups` CHANGE `page_par` `page_par` tinyint(2) NOT NULL default '0';");
|
732 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_groups` CHANGE `cat_par` `cat_par` tinyint(2) NOT NULL default '0';");
|
733 |
-
}
|
734 |
-
|
735 |
-
// Database: 43
|
736 |
-
// AdRotate: 3.10.7
|
737 |
-
if($adrotate_db_version['current'] < 43) {
|
738 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_groups` CHANGE `admargin` `admargin` int(2) NOT NULL default '0';");
|
739 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_groups` CHANGE `admargin_bottom` `admargin_bottom` int(2) NOT NULL default '0';");
|
740 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_groups` CHANGE `admargin_left` `admargin_left` int(2) NOT NULL default '0';");
|
741 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_groups` CHANGE `admargin_right` `admargin_right` int(2) NOT NULL default '0';");
|
742 |
-
}
|
743 |
-
|
744 |
-
// Database: 44
|
745 |
-
// AdRotate: 3.10.8
|
746 |
-
if($adrotate_db_version['current'] < 44) {
|
747 |
-
adrotate_del_column("{$wpdb->prefix}adrotate", 'timeframe');
|
748 |
-
adrotate_del_column("{$wpdb->prefix}adrotate", 'timeframelength');
|
749 |
-
adrotate_del_column("{$wpdb->prefix}adrotate", 'timeframeclicks');
|
750 |
-
adrotate_del_column("{$wpdb->prefix}adrotate", 'timeframeimpressions');
|
751 |
-
}
|
752 |
-
|
753 |
-
// Database: 46
|
754 |
-
// AdRotate: 3.10.13
|
755 |
-
if($adrotate_db_version['current'] < 46) {
|
756 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_schedule` CHANGE `hourimpressions` `hourimpressions` int(15) NOT NULL default '0';");
|
757 |
-
}
|
758 |
-
|
759 |
-
// Database: 47
|
760 |
-
// AdRotate: 3.10.18
|
761 |
-
if($adrotate_db_version['current'] < 47) {
|
762 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'align', 'tinyint(1) NOT NULL default \'0\' AFTER `wrapper_after`');
|
763 |
-
}
|
764 |
-
|
765 |
-
// Database: 48
|
766 |
-
// AdRotate: 3.11.2b2
|
767 |
-
if($adrotate_db_version['current'] < 48) {
|
768 |
-
if($wpdb->get_var("SHOW INDEX FROM `{$wpdb->prefix}adrotate_tracker` WHERE Key_name = 'bannerid';") !== null) {
|
769 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_tracker` DROP KEY `bannerid`;");
|
770 |
-
}
|
771 |
-
if($wpdb->get_var("SHOW INDEX FROM `{$wpdb->prefix}adrotate_schedule` WHERE Key_name = 'stoptime';") !== null) {
|
772 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_schedule` DROP KEY `stoptime`;");
|
773 |
-
}
|
774 |
-
if($wpdb->get_var("SHOW INDEX FROM `{$wpdb->prefix}adrotate_schedule` WHERE Key_name = 'ad';") !== null) {
|
775 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_schedule` DROP KEY `ad`;");
|
776 |
-
}
|
777 |
-
adrotate_del_column("{$wpdb->prefix}adrotate_stats", 'block');
|
778 |
-
adrotate_del_column("{$wpdb->prefix}adrotate_linkmeta", 'block');
|
779 |
-
}
|
780 |
-
|
781 |
-
// Database: 49
|
782 |
-
// AdRotate: 3.11.2b3
|
783 |
-
if($adrotate_db_version['current'] < 49) {
|
784 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_stats` CHANGE `ad` `ad` INT(5) UNSIGNED NOT NULL DEFAULT '0';");
|
785 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_stats` CHANGE `group` `group` INT(5) UNSIGNED NOT NULL DEFAULT '0';");
|
786 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_stats` CHANGE `thetime` `thetime` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
787 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_stats` CHANGE `clicks` `clicks` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
788 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_stats` CHANGE `impressions` `impressions` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
789 |
-
|
790 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_tracker` CHANGE `timer` `timer` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
791 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_tracker` CHANGE `bannerid` `bannerid` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
792 |
-
|
793 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_schedule` CHANGE `starttime` `starttime` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
794 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_schedule` CHANGE `stoptime` `stoptime` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
795 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_schedule` CHANGE `maxclicks` `maxclicks` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
796 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_schedule` CHANGE `maximpressions` `maximpressions` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
797 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_schedule` CHANGE `dayimpressions` `dayimpressions` INT(15) UNSIGNED NOT NULL DEFAULT '0';");
|
798 |
-
|
799 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_linkmeta` CHANGE `ad` `ad` INT(5) UNSIGNED NOT NULL DEFAULT '0';");
|
800 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_linkmeta` CHANGE `group` `group` INT(5) UNSIGNED NOT NULL DEFAULT '0';");
|
801 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_linkmeta` CHANGE `user` `user` INT(5) UNSIGNED NOT NULL DEFAULT '0';");
|
802 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_linkmeta` CHANGE `schedule` `schedule` INT(5) UNSIGNED NOT NULL DEFAULT '0';");
|
803 |
-
}
|
804 |
-
|
805 |
-
// Database: 50
|
806 |
-
// AdRotate: 3.11.3b1
|
807 |
-
if($adrotate_db_version['current'] < 50) {
|
808 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_tracker` CHANGE `ipaddress` `ipaddress` varchar(15) NOT NULL DEFAULT '';");
|
809 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate` CHANGE `cbudget` `budget` double NOT NULL default '0';");
|
810 |
-
adrotate_del_column("{$wpdb->prefix}adrotate", 'ibudget');
|
811 |
-
}
|
812 |
-
|
813 |
-
// Database: 51
|
814 |
-
// AdRotate: 3.12.5b2
|
815 |
-
if($adrotate_db_version['current'] < 51) {
|
816 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'mobile', 'varchar(5) NOT NULL default \'N\' AFTER `tracker`');
|
817 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_groups", 'mobile', 'tinyint(1) NOT NULL default \'0\' AFTER `page_par`');
|
818 |
-
}
|
819 |
-
|
820 |
-
// Database: 52
|
821 |
-
// AdRotate: 3.13
|
822 |
-
if($adrotate_db_version['current'] < 52) {
|
823 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'tablet', 'varchar(2) NOT NULL default \'N\' AFTER `mobile`');
|
824 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate` CHANGE `tracker` `tracker` varchar(2) NOT NULL default 'N';");
|
825 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate` CHANGE `mobile` `mobile` varchar(2) NOT NULL default 'N';");
|
826 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate` CHANGE `responsive` `responsive` varchar(2) NOT NULL default 'N';");
|
827 |
-
}
|
828 |
-
|
829 |
-
// Database: 53
|
830 |
-
// AdRotate: 3.13.1
|
831 |
-
if($adrotate_db_version['current'] < 53) {
|
832 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'daystarttime', 'char(4) NOT NULL default \'0000\' AFTER `dayimpressions`');
|
833 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'daystoptime', 'char(4) NOT NULL default \'0000\' AFTER `daystarttime`');
|
834 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'day_mon', 'char(1) NOT NULL default \'Y\' AFTER `daystoptime`');
|
835 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'day_tue', 'char(1) NOT NULL default \'Y\' AFTER `day_mon`');
|
836 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'day_wed', 'char(1) NOT NULL default \'Y\' AFTER `day_tue`');
|
837 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'day_thu', 'char(1) NOT NULL default \'Y\' AFTER `day_wed`');
|
838 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'day_fri', 'char(1) NOT NULL default \'Y\' AFTER `day_thu`');
|
839 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'day_sat', 'char(1) NOT NULL default \'Y\' AFTER `day_fri`');
|
840 |
-
adrotate_add_column("{$wpdb->prefix}adrotate_schedule", 'day_sun', 'char(1) NOT NULL default \'Y\' AFTER `day_sat`');
|
841 |
-
}
|
842 |
-
|
843 |
-
// Database: 54
|
844 |
-
// AdRotate: 3.14
|
845 |
-
if($adrotate_db_version['current'] < 54) {
|
846 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'desktop', 'varchar(2) NOT NULL default \'Y\' AFTER `tracker`');
|
847 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate` CHANGE `mobile` `mobile` varchar(2) NOT NULL default 'Y';");
|
848 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate` CHANGE `tablet` `tablet` varchar(2) NOT NULL default 'Y';");
|
849 |
-
}
|
850 |
-
|
851 |
-
// Database: 55
|
852 |
-
// AdRotate: 3.14.1
|
853 |
-
if($adrotate_db_version['current'] < 55) {
|
854 |
-
$adverts = $wpdb->get_results("SELECT `id`, `bannercode`, `link` FROM {$wpdb->prefix}adrotate WHERE `link` != '' ORDER BY `id` ASC;");
|
855 |
-
foreach($adverts as $advert) {
|
856 |
-
$bannercode = $advert->bannercode;
|
857 |
-
$bannercode = str_replace('%link%', $advert->link, $bannercode);
|
858 |
-
$wpdb->update("{$wpdb->prefix}adrotate", array('bannercode' => $bannercode), array('id' => $advert->id));
|
859 |
-
unset($advert, $bannercode);
|
860 |
-
}
|
861 |
-
adrotate_del_column("{$wpdb->prefix}adrotate", 'link');
|
862 |
-
}
|
863 |
-
|
864 |
-
// Database: 56
|
865 |
-
// AdRotate: 3.14.2
|
866 |
-
if($adrotate_db_version['current'] < 56) {
|
867 |
-
adrotate_del_column("{$wpdb->prefix}adrotate_tracker", 'useragent');
|
868 |
-
}
|
869 |
-
|
870 |
-
// Database: 57
|
871 |
-
// AdRotate: 3.15
|
872 |
-
if($adrotate_db_version['current'] < 57) {
|
873 |
-
if(!in_array("{$wpdb->prefix}adrotate_stats_archive", $found_tables)) {
|
874 |
-
dbDelta("CREATE TABLE `{$wpdb->prefix}adrotate_stats_archive` (
|
875 |
-
`id` bigint(9) unsigned NOT NULL auto_increment,
|
876 |
-
`ad` int(5) unsigned NOT NULL default '0',
|
877 |
-
`group` int(5) unsigned NOT NULL default '0',
|
878 |
-
`thetime` int(15) unsigned NOT NULL default '0',
|
879 |
-
`clicks` int(15) unsigned NOT NULL default '0',
|
880 |
-
`impressions` int(15) unsigned NOT NULL default '0',
|
881 |
-
PRIMARY KEY (`id`),
|
882 |
-
INDEX `ad` (`ad`),
|
883 |
-
INDEX `thetime` (`thetime`)
|
884 |
-
) ".$charset_collate.$engine.";");
|
885 |
-
}
|
886 |
-
}
|
887 |
-
|
888 |
-
// Database: 58
|
889 |
-
// AdRotate: 3.15.5b1
|
890 |
-
if($adrotate_db_version['current'] < 58) {
|
891 |
-
$wpdb->query("ALTER TABLE `{$wpdb->prefix}adrotate_schedule` CHANGE `dayimpressions` `hourimpressions` int(15) NOT NULL default '0';");
|
892 |
-
}
|
893 |
-
|
894 |
-
// Database: 59
|
895 |
-
// AdRotate: 3.16
|
896 |
-
if($adrotate_db_version['current'] < 59) {
|
897 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'paid', 'char(1) NOT NULL default \'U\' AFTER `image`');
|
898 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'os_ios', 'char(1) NOT NULL default \'Y\' AFTER `tablet`');
|
899 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'os_android', 'char(1) NOT NULL default \'Y\' AFTER `os_ios`');
|
900 |
-
adrotate_add_column("{$wpdb->prefix}adrotate", 'os_other', 'char(1) NOT NULL default \'Y\' AFTER `os_android`');
|
901 |
-
|
902 |
-
adrotate_del_column("{$wpdb->prefix}adrotate", 'sortorder');
|
903 |
-
adrotate_del_column("{$wpdb->prefix}adrotate_groups", 'sortorder');
|
904 |
-
|
905 |
-
if(!in_array("{$wpdb->prefix}adrotate_transactions", $found_tables)) {
|
906 |
-
dbDelta("CREATE TABLE `{$wpdb->prefix}adrotate_transactions` (
|
907 |
-
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
908 |
-
`ad` mediumint(8) unsigned NOT NULL default '0',
|
909 |
-
`user` mediumint(8) unsigned NOT NULL default '0',
|
910 |
-
`reference` varchar(100) NOT NULL,
|
911 |
-
`note` longtext NOT NULL,
|
912 |
-
`billed` int(15) unsigned NOT NULL default '0',
|
913 |
-
`paid` int(15) unsigned NOT NULL default '0',
|
914 |
-
`amount` double NOT NULL default '0',
|
915 |
-
`budget` char(1) NOT NULL default 'U',
|
916 |
-
PRIMARY KEY (`id`),
|
917 |
-
KEY `ad` (`ad`)
|
918 |
-
) ".$charset_collate.$engine.";");
|
919 |
-
}
|
920 |
-
}
|
921 |
-
|
922 |
-
// Database: 60
|
923 |
-
// AdRotate: 3.17
|
924 |
-
if($adrotate_db_version['current'] < 60) {
|
925 |
-
$wpdb->query("DROP TABLE IF EXISTS `{$wpdb->prefix}adrotate_tracker`");
|
926 |
-
}
|
927 |
-
|
928 |
-
// Database: 61
|
929 |
-
// AdRotate: 3.18.2
|
930 |
-
if($adrotate_db_version['current'] < 61) {
|
931 |
-
adrotate_del_column("{$wpdb->prefix}adrotate_schedule", 'hourimpressions');
|
932 |
-
}
|
933 |
-
|
934 |
// Database: 62
|
935 |
// AdRotate: 4.0
|
936 |
if($adrotate_db_version['current'] < 62) {
|
@@ -975,172 +661,11 @@ function adrotate_database_upgrade() {
|
|
975 |
Since: 3.5
|
976 |
-------------------------------------------------------------*/
|
977 |
function adrotate_core_upgrade() {
|
978 |
-
global $wp_roles;
|
979 |
|
980 |
$firstrun = date('U') + 3600;
|
981 |
$adrotate_version = get_option("adrotate_version");
|
982 |
-
|
983 |
-
if($adrotate_version['current'] < 323) {
|
984 |
-
delete_option('adrotate_notification_timer');
|
985 |
-
}
|
986 |
-
|
987 |
-
if($adrotate_version['current'] < 340) {
|
988 |
-
add_option('adrotate_db_timer', date('U'));
|
989 |
-
}
|
990 |
-
|
991 |
-
if($adrotate_version['current'] < 350) {
|
992 |
-
update_option('adrotate_debug', array('general' => false, 'stats' => false));
|
993 |
-
}
|
994 |
-
|
995 |
-
if($adrotate_version['current'] < 351) {
|
996 |
-
wp_clear_scheduled_hook('adrotate_prepare_cache_statistics');
|
997 |
-
delete_option('adrotate_stats');
|
998 |
-
}
|
999 |
-
|
1000 |
-
if($adrotate_version['current'] < 352) {
|
1001 |
-
adrotate_remove_capability("adrotate_userstatistics"); // OBSOLETE IN 3.5
|
1002 |
-
adrotate_remove_capability("adrotate_globalstatistics"); // OBSOLETE IN 3.5
|
1003 |
-
$role = get_role('administrator');
|
1004 |
-
$role->add_cap("adrotate_advertiser_report"); // NEW IN 3.5
|
1005 |
-
$role->add_cap("adrotate_global_report"); // NEW IN 3.5
|
1006 |
-
}
|
1007 |
-
|
1008 |
-
if($adrotate_version['current'] < 353) {
|
1009 |
-
if(!is_dir(dirname(__FILE__).'/language')) {
|
1010 |
-
mkdir(dirname(__FILE__).'/language', 0755);
|
1011 |
-
}
|
1012 |
-
}
|
1013 |
-
|
1014 |
-
if($adrotate_version['current'] < 354) {
|
1015 |
-
$crawlers = array("Teoma", "alexa", "froogle", "Gigabot", "inktomi","looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory","Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot","www.galaxy.com", "Googlebot", "Scooter", "Slurp","msnbot", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz","Baiduspider", "Feedfetcher-Google", "TechnoratiSnoop", "Rankivabot","Mediapartners-Google", "Sogou web spider", "WebAlta Crawler","bot", "crawler", "yahoo", "msn", "ask", "ia_archiver");
|
1016 |
-
update_option('adrotate_crawlers', $crawlers);
|
1017 |
-
}
|
1018 |
-
|
1019 |
-
if($adrotate_version['current'] < 355) {
|
1020 |
-
if(!is_dir(ABSPATH.'/wp-content/reports')) {
|
1021 |
-
mkdir(ABSPATH.'/wp-content/reports', 0755);
|
1022 |
-
}
|
1023 |
-
}
|
1024 |
-
|
1025 |
-
if($adrotate_version['current'] < 356) {
|
1026 |
-
adrotate_remove_capability("adrotate_advertiser_report");
|
1027 |
-
$role = get_role('administrator');
|
1028 |
-
$role->add_cap("adrotate_advertiser");
|
1029 |
-
}
|
1030 |
-
|
1031 |
-
if($adrotate_version['current'] < 357) {
|
1032 |
-
$role = get_role('administrator');
|
1033 |
-
$role->add_cap("adrotate_moderate");
|
1034 |
-
$role->add_cap("adrotate_moderate_approve");
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
// 3.8.3.3
|
1038 |
-
if($adrotate_version['current'] < 363) {
|
1039 |
-
// Set defaults for internal versions
|
1040 |
-
$adrotate_db_version = get_option("adrotate_db_version");
|
1041 |
-
if(empty($adrotate_db_version)) update_option('adrotate_db_version', array('current' => ADROTATE_DB_VERSION, 'previous' => $adrotate_db_version['current']));
|
1042 |
-
}
|
1043 |
-
|
1044 |
-
// 3.8.4
|
1045 |
-
if($adrotate_version['current'] < 364) {
|
1046 |
-
// Reset wp-cron tasks
|
1047 |
-
wp_clear_scheduled_hook('adrotate_ad_notification');
|
1048 |
-
wp_clear_scheduled_hook('adrotate_prepare_cache_statistics'); // OBSOLETE IN 3.6 - REMOVE IN 4.0
|
1049 |
-
wp_clear_scheduled_hook('adrotate_clean_trackerdata');
|
1050 |
-
wp_clear_scheduled_hook('adrotate_evaluate_ads');
|
1051 |
-
|
1052 |
-
if(!wp_next_scheduled('adrotate_clean_trackerdata')) wp_schedule_event($firstrun, 'twicedaily', 'adrotate_clean_trackerdata');
|
1053 |
-
}
|
1054 |
-
|
1055 |
-
// 3.8.5.1
|
1056 |
-
if($adrotate_version['current'] < 367) {
|
1057 |
-
if(!wp_next_scheduled('adrotate_evaluate_ads')) wp_schedule_event($firstrun, 'twicedaily', 'adrotate_evaluate_ads');
|
1058 |
-
}
|
1059 |
-
|
1060 |
-
// 3.8.9
|
1061 |
-
if($adrotate_version['current'] < 368) {
|
1062 |
-
if(!is_dir(ABSPATH.'/wp-content/banners')) mkdir(ABSPATH.'/wp-content/banners', 0755);
|
1063 |
-
if(!is_dir(ABSPATH.'/wp-content/reports')) mkdir(ABSPATH.'/wp-content/reports', 0755);
|
1064 |
-
}
|
1065 |
-
|
1066 |
-
// 3.9.9
|
1067 |
-
if($adrotate_version['current'] < 371) {
|
1068 |
-
// Reset wp-cron tasks
|
1069 |
-
if(!wp_next_scheduled('adrotate_clean_trackerdata')) wp_schedule_event($firstrun + 1800, 'twicedaily', 'adrotate_clean_trackerdata');
|
1070 |
-
if(!wp_next_scheduled('adrotate_evaluate_ads')) wp_schedule_event($firstrun + 3600, 'twicedaily', 'adrotate_evaluate_ads');
|
1071 |
-
}
|
1072 |
-
|
1073 |
-
// 3.10
|
1074 |
-
if($adrotate_version['current'] < 373) {
|
1075 |
-
add_option('adrotate_responsive_required', 0);
|
1076 |
-
}
|
1077 |
-
|
1078 |
-
// 3.10.10 (Pro 3.11)
|
1079 |
-
if($adrotate_version['current'] < 374) {
|
1080 |
-
add_option('adrotate_dynamic_required', 1);
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
// 3.10.13
|
1084 |
-
if($adrotate_version['current'] < 375) {
|
1085 |
-
wp_clear_scheduled_hook('adrotate_clean_trackerdata');
|
1086 |
-
}
|
1087 |
-
|
1088 |
-
// 3.10.14
|
1089 |
-
if($adrotate_version['current'] < 376) {
|
1090 |
-
adrotate_check_config();
|
1091 |
-
}
|
1092 |
-
|
1093 |
-
// 3.11.1
|
1094 |
-
if($adrotate_version['current'] < 377) {
|
1095 |
-
delete_option('adrotate_server');
|
1096 |
-
delete_option('adrotate_server_hide');
|
1097 |
-
}
|
1098 |
-
|
1099 |
-
// 3.11.2
|
1100 |
-
if($adrotate_version['current'] < 378) {
|
1101 |
-
// Reset wp-cron tasks
|
1102 |
-
if(!wp_next_scheduled('adrotate_clean_trackerdata')) wp_schedule_event($firstrun, 'twicedaily', 'adrotate_clean_trackerdata');
|
1103 |
-
if(!wp_next_scheduled('adrotate_evaluate_ads')) wp_schedule_event($firstrun + 900, 'twicedaily', 'adrotate_evaluate_ads');
|
1104 |
-
}
|
1105 |
-
|
1106 |
-
// 3.11.4
|
1107 |
-
if($adrotate_version['current'] < 379) {
|
1108 |
-
$config379 = get_option('adrotate_config');
|
1109 |
-
if($config379['enable_stats'] == 'Y') {
|
1110 |
-
$config379['stats'] = 1;
|
1111 |
-
} else {
|
1112 |
-
$config379['stats'] = 0;
|
1113 |
-
}
|
1114 |
-
unset($config379['enable_stats']);
|
1115 |
-
update_option('adrotate_config', $config379);
|
1116 |
-
}
|
1117 |
-
|
1118 |
-
// 3.12
|
1119 |
-
if($adrotate_version['current'] < 380) {
|
1120 |
-
delete_option('adrotate_roles');
|
1121 |
-
update_option('adrotate_debug', array('general' => false, 'publisher' => false, 'timers' => false, 'track' => false));
|
1122 |
-
}
|
1123 |
-
|
1124 |
-
// 3.16
|
1125 |
-
if($adrotate_version['current'] < 384) {
|
1126 |
-
if(!wp_next_scheduled('adrotate_clean_trackerdata')) wp_schedule_event($firstrun, 'twicedaily', 'adrotate_clean_trackerdata');
|
1127 |
-
if(!wp_next_scheduled('adrotate_evaluate_ads')) wp_schedule_event($firstrun + 900, 'twicedaily', 'adrotate_evaluate_ads');
|
1128 |
-
}
|
1129 |
-
|
1130 |
-
// 3.17
|
1131 |
-
if($adrotate_version['current'] < 385) {
|
1132 |
-
wp_clear_scheduled_hook('adrotate_clean_trackerdata');
|
1133 |
-
}
|
1134 |
-
|
1135 |
-
// 3.18
|
1136 |
-
if($adrotate_version['current'] < 386) {
|
1137 |
-
if(!wp_next_scheduled('adrotate_delete_transients')) wp_schedule_event($firstrun, 'hourly', 'adrotate_delete_transients');
|
1138 |
-
}
|
1139 |
-
|
1140 |
-
// 3.19
|
1141 |
-
if($adrotate_version['current'] < 387) {
|
1142 |
-
delete_option('adrotate_responsive_required');
|
1143 |
-
}
|
1144 |
|
1145 |
// 4.0
|
1146 |
if($adrotate_version['current'] < 388) {
|
@@ -1176,6 +701,87 @@ function adrotate_core_upgrade() {
|
|
1176 |
delete_option('adrotate_hide_banner');
|
1177 |
}
|
1178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1179 |
update_option("adrotate_version", array('current' => ADROTATE_VERSION, 'previous' => $adrotate_version['current']));
|
1180 |
}
|
1181 |
|
260 |
if(!isset($config['enable_geo_advertisers'])) $config['enable_geo_advertisers'] = 0;
|
261 |
if(!isset($config['adblock_disguise'])) $config['adblock_disguise'] = '';
|
262 |
if(!isset($config['banner_folder'])) $config['banner_folder'] = "banners";
|
|
|
263 |
if(!isset($config['impression_timer']) OR $config['impression_timer'] < 10 OR $config['impression_timer'] > 3600) $config['impression_timer'] = 60;
|
264 |
if(!isset($config['click_timer']) OR $config['click_timer'] < 60 OR $config['click_timer'] > 86400) $config['click_timer'] = 86400;
|
265 |
if(!isset($config['hide_schedules']) OR ($config['hide_schedules'] != 'Y' AND $config['hide_schedules'] != 'N')) $config['hide_schedules'] = 'N';
|
617 |
|
618 |
$adrotate_db_version = get_option("adrotate_db_version");
|
619 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
// Database: 62
|
621 |
// AdRotate: 4.0
|
622 |
if($adrotate_db_version['current'] < 62) {
|
661 |
Since: 3.5
|
662 |
-------------------------------------------------------------*/
|
663 |
function adrotate_core_upgrade() {
|
664 |
+
global $wp_roles, $wpdb;
|
665 |
|
666 |
$firstrun = date('U') + 3600;
|
667 |
$adrotate_version = get_option("adrotate_version");
|
668 |
+
$adrotate_config = get_option('adrotate_config');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
669 |
|
670 |
// 4.0
|
671 |
if($adrotate_version['current'] < 388) {
|
701 |
delete_option('adrotate_hide_banner');
|
702 |
}
|
703 |
|
704 |
+
// 5.1
|
705 |
+
if($adrotate_version['current'] < 393) {
|
706 |
+
$groups = $wpdb->get_results("SELECT `id`, `modus`, `gridcolumns`, `adwidth`, `adheight`, `admargin`, `admargin_bottom`, `admargin_left`, `admargin_right`, `align` FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' ORDER BY `id` ASC;", ARRAY_A);
|
707 |
+
|
708 |
+
if(count($groups) > 0) {
|
709 |
+
foreach($groups as $group) {
|
710 |
+
$output_css = "";
|
711 |
+
if($group['align'] == 0) { // None
|
712 |
+
$group_align = '';
|
713 |
+
} else if($group['align'] == 1) { // Left
|
714 |
+
$group_align = ' float:left; clear:left;';
|
715 |
+
} else if($group['align'] == 2) { // Right
|
716 |
+
$group_align = ' float:right; clear:right;';
|
717 |
+
} else if($group['align'] == 3) { // Center
|
718 |
+
$group_align = ' margin: 0 auto;';
|
719 |
+
}
|
720 |
+
|
721 |
+
if($group['modus'] == 0 AND ($group['admargin'] > 0 OR $group['admargin_right'] > 0 OR $group['admargin_bottom'] > 0 OR $group['admargin_left'] > 0 OR $group['align'] > 0)) { // Single ad group
|
722 |
+
if($group['align'] < 3) {
|
723 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$group['id']." { margin:".$group['admargin']."px ".$group['admargin_right']."px ".$group['admargin_bottom']."px ".$group['admargin_left']."px;".$group_align." }\n";
|
724 |
+
} else {
|
725 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$group['id']." { ".$group_align." }\n";
|
726 |
+
}
|
727 |
+
}
|
728 |
+
|
729 |
+
if($group['modus'] == 1) { // Dynamic group
|
730 |
+
if($group['adwidth'] != 'auto') {
|
731 |
+
$width = "width:100%; max-width:".$group['adwidth']."px;";
|
732 |
+
} else {
|
733 |
+
$width = "width:auto;";
|
734 |
+
}
|
735 |
+
|
736 |
+
if($group['adheight'] != 'auto') {
|
737 |
+
$height = "height:100%; max-height:".$group['adheight']."px;";
|
738 |
+
} else {
|
739 |
+
$height = "height:auto;";
|
740 |
+
}
|
741 |
+
|
742 |
+
if($group['align'] < 3) {
|
743 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$group['id']." { margin:".$group['admargin']."px ".$group['admargin_right']."px ".$group['admargin_bottom']."px ".$group['admargin_left']."px;".$width." ".$height.$group_align." }\n";
|
744 |
+
} else {
|
745 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$group['id']." { ".$width." ".$height.$group_align." }\n";
|
746 |
+
}
|
747 |
+
|
748 |
+
unset($width_sum, $width, $height_sum, $height);
|
749 |
+
}
|
750 |
+
|
751 |
+
if($group['modus'] == 2) { // Block group
|
752 |
+
if($group['adwidth'] != 'auto') {
|
753 |
+
$width_sum = $group['gridcolumns'] * ($group['admargin_left'] + $group['adwidth'] + $group['admargin_right']);
|
754 |
+
$grid_width = "min-width:".$group['admargin_left']."px; max-width:".$width_sum."px;";
|
755 |
+
} else {
|
756 |
+
$grid_width = "width:auto;";
|
757 |
+
}
|
758 |
+
|
759 |
+
$output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$group['id']." { ".$grid_width.$group_align." }\n";
|
760 |
+
$output_css .= "\t.b".$adrotate_config['adblock_disguise']."-".$group['id']." { margin:".$group['admargin']."px ".$group['admargin_right']."px ".$group['admargin_bottom']."px ".$group['admargin_left']."px; }\n";
|
761 |
+
unset($width_sum, $grid_width, $height_sum, $grid_height);
|
762 |
+
}
|
763 |
+
$generated_css[$group['id']] = $output_css;
|
764 |
+
}
|
765 |
+
unset($groups);
|
766 |
+
|
767 |
+
// Check/Merge existing CSS
|
768 |
+
$group_css = get_option('adrotate_group_css');
|
769 |
+
if(is_array($group_css)) {
|
770 |
+
$keys = array_keys($group_css);
|
771 |
+
foreach($keys as $i => $key) {
|
772 |
+
if (array_key_exists($key, $generated_css)) {
|
773 |
+
unset($generated_css[$key]);
|
774 |
+
}
|
775 |
+
}
|
776 |
+
$group_css = array_merge($group_css, $generated_css);
|
777 |
+
} else {
|
778 |
+
$group_css = $generated_css;
|
779 |
+
}
|
780 |
+
|
781 |
+
update_option('adrotate_group_css', $group_css);
|
782 |
+
}
|
783 |
+
}
|
784 |
+
|
785 |
update_option("adrotate_version", array('current' => ADROTATE_VERSION, 'previous' => $adrotate_version['current']));
|
786 |
}
|
787 |
|
adrotate-statistics.php
CHANGED
@@ -442,7 +442,7 @@ function adrotate_count_impression($ad, $group = 0, $blog_id = 0) {
|
|
442 |
if(($adrotate_config['enable_loggedin_impressions'] == 'Y' AND is_user_logged_in()) OR !is_user_logged_in()) {
|
443 |
$now = adrotate_now();
|
444 |
$today = adrotate_date_start('day');
|
445 |
-
$remote_ip
|
446 |
|
447 |
if($blog_id > 0 AND adrotate_is_networked()) {
|
448 |
$current_blog = $wpdb->blogid;
|
442 |
if(($adrotate_config['enable_loggedin_impressions'] == 'Y' AND is_user_logged_in()) OR !is_user_logged_in()) {
|
443 |
$now = adrotate_now();
|
444 |
$today = adrotate_date_start('day');
|
445 |
+
$remote_ip = adrotate_get_remote_ip();
|
446 |
|
447 |
if($blog_id > 0 AND adrotate_is_networked()) {
|
448 |
$current_blog = $wpdb->blogid;
|
adrotate.php
CHANGED
@@ -7,7 +7,7 @@ Author URI: https://www.arnan.me/
|
|
7 |
Description: AdRotate Banner Manager - Monetise your website with adverts while keeping things simple. Start making money today!
|
8 |
Text Domain: adrotate
|
9 |
Domain Path: /languages/
|
10 |
-
Version: 5.
|
11 |
License: GPLv3
|
12 |
*/
|
13 |
|
@@ -22,8 +22,8 @@ License: GPLv3
|
|
22 |
------------------------------------------------------------------------------------ */
|
23 |
|
24 |
/*--- AdRotate values ---------------------------------------*/
|
25 |
-
define("ADROTATE_DISPLAY", '5.
|
26 |
-
define("ADROTATE_VERSION",
|
27 |
define("ADROTATE_DB_VERSION", 64);
|
28 |
$plugin_folder = plugin_dir_path(__FILE__);
|
29 |
/*-----------------------------------------------------------*/
|
@@ -60,8 +60,8 @@ add_filter('adrotate_apply_photon','adrotate_apply_jetpack_photon');
|
|
60 |
/*--- Front end ---------------------------------------------*/
|
61 |
if(!is_admin()) {
|
62 |
add_shortcode('adrotate', 'adrotate_shortcode');
|
63 |
-
add_action(
|
64 |
-
add_action(
|
65 |
add_filter('the_content', 'adrotate_inject_posts', 12);
|
66 |
}
|
67 |
|
@@ -105,11 +105,12 @@ function adrotate_dashboard() {
|
|
105 |
add_menu_page('AdRotate', 'AdRotate', 'adrotate_ad_manage', 'adrotate', 'adrotate_info', plugins_url('/images/icon-menu.png', __FILE__), '25.8');
|
106 |
$adrotate_page = add_submenu_page('adrotate', 'AdRotate · '.__('General Info', 'adrotate'), __('General Info', 'adrotate'), 'adrotate_ad_manage', 'adrotate', 'adrotate_info');
|
107 |
$adrotate_pro = add_submenu_page('adrotate', 'AdRotate · '.__('AdRotate Pro', 'adrotate'), __('AdRotate Pro', 'adrotate'), 'adrotate_ad_manage', 'adrotate-pro', 'adrotate_pro');
|
108 |
-
$adrotate_adverts = add_submenu_page('adrotate', 'AdRotate · '.__('Adverts', 'adrotate'), __('Adverts', 'adrotate'), 'adrotate_ad_manage', 'adrotate-ads', 'adrotate_manage');
|
109 |
-
$adrotate_groups = add_submenu_page('adrotate', 'AdRotate · '.__('Groups', 'adrotate'), __('Groups', 'adrotate'), 'adrotate_group_manage', 'adrotate-groups', 'adrotate_manage_group');
|
110 |
-
$adrotate_schedules = add_submenu_page('adrotate', 'AdRotate · '.__('Schedules', 'adrotate'), __('Schedules', 'adrotate'), 'adrotate_ad_manage', 'adrotate-schedules', 'adrotate_manage_schedules');
|
111 |
$adrotate_statistics = add_submenu_page('adrotate', 'AdRotate · '.__('Statistics', 'adrotate'), __('Statistics', 'adrotate'), 'adrotate_ad_manage', 'adrotate-statistics', 'adrotate_statistics');
|
112 |
-
$adrotate_media = add_submenu_page('adrotate', 'AdRotate · '.__('Media', 'adrotate'), __('Media', 'adrotate'), 'adrotate_ad_manage', 'adrotate-media', 'adrotate_manage_media');
|
|
|
113 |
$adrotate_settings = add_submenu_page('adrotate', 'AdRotate · '.__('Settings', 'adrotate'), __('Settings', 'adrotate'), 'manage_options', 'adrotate-settings', 'adrotate_options');
|
114 |
|
115 |
// Add help tabs
|
@@ -382,8 +383,8 @@ function adrotate_statistics() {
|
|
382 |
$month = date("m");
|
383 |
$year = date("Y");
|
384 |
}
|
385 |
-
$monthstart =
|
386 |
-
$monthend =
|
387 |
$today = adrotate_date_start('day');
|
388 |
?>
|
389 |
<div class="wrap">
|
@@ -447,6 +448,39 @@ function adrotate_manage_media() {
|
|
447 |
<?php
|
448 |
}
|
449 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
/*-------------------------------------------------------------
|
451 |
Name: adrotate_options
|
452 |
Purpose: Admin options page
|
7 |
Description: AdRotate Banner Manager - Monetise your website with adverts while keeping things simple. Start making money today!
|
8 |
Text Domain: adrotate
|
9 |
Domain Path: /languages/
|
10 |
+
Version: 5.1
|
11 |
License: GPLv3
|
12 |
*/
|
13 |
|
22 |
------------------------------------------------------------------------------------ */
|
23 |
|
24 |
/*--- AdRotate values ---------------------------------------*/
|
25 |
+
define("ADROTATE_DISPLAY", '5.1');
|
26 |
+
define("ADROTATE_VERSION", 393);
|
27 |
define("ADROTATE_DB_VERSION", 64);
|
28 |
$plugin_folder = plugin_dir_path(__FILE__);
|
29 |
/*-----------------------------------------------------------*/
|
60 |
/*--- Front end ---------------------------------------------*/
|
61 |
if(!is_admin()) {
|
62 |
add_shortcode('adrotate', 'adrotate_shortcode');
|
63 |
+
add_action('wp_head', 'adrotate_header');
|
64 |
+
add_action("wp_enqueue_scripts", 'adrotate_scripts');
|
65 |
add_filter('the_content', 'adrotate_inject_posts', 12);
|
66 |
}
|
67 |
|
105 |
add_menu_page('AdRotate', 'AdRotate', 'adrotate_ad_manage', 'adrotate', 'adrotate_info', plugins_url('/images/icon-menu.png', __FILE__), '25.8');
|
106 |
$adrotate_page = add_submenu_page('adrotate', 'AdRotate · '.__('General Info', 'adrotate'), __('General Info', 'adrotate'), 'adrotate_ad_manage', 'adrotate', 'adrotate_info');
|
107 |
$adrotate_pro = add_submenu_page('adrotate', 'AdRotate · '.__('AdRotate Pro', 'adrotate'), __('AdRotate Pro', 'adrotate'), 'adrotate_ad_manage', 'adrotate-pro', 'adrotate_pro');
|
108 |
+
$adrotate_adverts = add_submenu_page('adrotate', 'AdRotate · '.__('Manage Adverts', 'adrotate'), __('Manage Adverts', 'adrotate'), 'adrotate_ad_manage', 'adrotate-ads', 'adrotate_manage');
|
109 |
+
$adrotate_groups = add_submenu_page('adrotate', 'AdRotate · '.__('Manage Groups', 'adrotate'), __('Manage Groups', 'adrotate'), 'adrotate_group_manage', 'adrotate-groups', 'adrotate_manage_group');
|
110 |
+
$adrotate_schedules = add_submenu_page('adrotate', 'AdRotate · '.__('Manage Schedules', 'adrotate'), __('Manage Schedules', 'adrotate'), 'adrotate_ad_manage', 'adrotate-schedules', 'adrotate_manage_schedules');
|
111 |
$adrotate_statistics = add_submenu_page('adrotate', 'AdRotate · '.__('Statistics', 'adrotate'), __('Statistics', 'adrotate'), 'adrotate_ad_manage', 'adrotate-statistics', 'adrotate_statistics');
|
112 |
+
$adrotate_media = add_submenu_page('adrotate', 'AdRotate · '.__('Manage Media', 'adrotate'), __('Manage Media', 'adrotate'), 'adrotate_ad_manage', 'adrotate-media', 'adrotate_manage_media');
|
113 |
+
$adrotate_support = add_submenu_page('adrotate', 'AdRotate · '.__('Support', 'adrotate-pro'), __('Support', 'adrotate-pro'), 'manage_options', 'adrotate-support', 'adrotate_support');
|
114 |
$adrotate_settings = add_submenu_page('adrotate', 'AdRotate · '.__('Settings', 'adrotate'), __('Settings', 'adrotate'), 'manage_options', 'adrotate-settings', 'adrotate_options');
|
115 |
|
116 |
// Add help tabs
|
383 |
$month = date("m");
|
384 |
$year = date("Y");
|
385 |
}
|
386 |
+
$monthstart = gmmktime(0, 0, 0, $month, 1, $year);
|
387 |
+
$monthend = gmmktime(0, 0, 0, $month+1, 0, $year);
|
388 |
$today = adrotate_date_start('day');
|
389 |
?>
|
390 |
<div class="wrap">
|
448 |
<?php
|
449 |
}
|
450 |
|
451 |
+
/*-------------------------------------------------------------
|
452 |
+
Name: adrotate_support
|
453 |
+
Purpose: Get help
|
454 |
+
-------------------------------------------------------------*/
|
455 |
+
function adrotate_support() {
|
456 |
+
global $wpdb, $adrotate_config;
|
457 |
+
|
458 |
+
$status = $file = '';
|
459 |
+
if(isset($_GET['status'])) $status = esc_attr($_GET['status']);
|
460 |
+
if(isset($_GET['file'])) $file = esc_attr($_GET['file']);
|
461 |
+
|
462 |
+
$current_user = wp_get_current_user();
|
463 |
+
|
464 |
+
if(adrotate_is_networked()) {
|
465 |
+
$a = get_site_option('adrotate_activate');
|
466 |
+
} else {
|
467 |
+
$a = get_option('adrotate_activate');
|
468 |
+
}
|
469 |
+
?>
|
470 |
+
|
471 |
+
<div class="wrap">
|
472 |
+
<h1><?php _e('Support', 'adrotate-pro'); ?></h1>
|
473 |
+
|
474 |
+
<?php if($status > 0) adrotate_status($status); ?>
|
475 |
+
|
476 |
+
<?php
|
477 |
+
include("dashboard/support.php");
|
478 |
+
?>
|
479 |
+
|
480 |
+
</div>
|
481 |
+
<?php
|
482 |
+
}
|
483 |
+
|
484 |
/*-------------------------------------------------------------
|
485 |
Name: adrotate_options
|
486 |
Purpose: Admin options page
|
dashboard/adrotatepro.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
|
14 |
<div id="dashboard-widgets-wrap">
|
15 |
<div id="dashboard-widgets" class="metabox-holder">
|
16 |
-
<div id="left-column" class="postbox-container">
|
17 |
|
18 |
<div class="ajdg-postbox">
|
19 |
<h2 class="ajdg-postbox-title"><?php _e('Satisfy your advertisers', 'adrotate'); ?></h2>
|
@@ -52,7 +52,7 @@
|
|
52 |
</div>
|
53 |
|
54 |
</div>
|
55 |
-
<div id="right-column" class="postbox-container">
|
56 |
|
57 |
<div class="ajdg-postbox">
|
58 |
<h2 class="ajdg-postbox-title"><?php _e('Schedule all campaigns with ease', 'adrotate'); ?></h2>
|
@@ -78,13 +78,13 @@
|
|
78 |
<div class="ajdg-postbox">
|
79 |
<h2 class="ajdg-postbox-title"><?php _e('Buy AdRotate Professional', 'adrotate'); ?></h2>
|
80 |
<div id="get-pro" class="ajdg-postbox-content">
|
81 |
-
<p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><img src="<?php echo plugins_url('/images/logo-60x60.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /></a><?php _e('AdRotate Pro has a whole lote more functions for even better advertising management.
|
82 |
<a href="https://ajdg.solutions/products/adrotate-for-wordpress/"><img src="<?php echo plugins_url('/images/adrotate-product.png', dirname(__FILE__)); ?>" alt="adrotate-product" width="150" height="150" align="right" style="padding: 0 0 10px 10px;" /></a>
|
83 |
-
<p><
|
84 |
-
<p><
|
85 |
-
<p><
|
86 |
-
<p><
|
87 |
-
<p><
|
88 |
</div>
|
89 |
</div>
|
90 |
<!--
|
13 |
|
14 |
<div id="dashboard-widgets-wrap">
|
15 |
<div id="dashboard-widgets" class="metabox-holder">
|
16 |
+
<div id="left-column" class="ajdg-postbox-container">
|
17 |
|
18 |
<div class="ajdg-postbox">
|
19 |
<h2 class="ajdg-postbox-title"><?php _e('Satisfy your advertisers', 'adrotate'); ?></h2>
|
52 |
</div>
|
53 |
|
54 |
</div>
|
55 |
+
<div id="right-column" class="ajdg-postbox-container">
|
56 |
|
57 |
<div class="ajdg-postbox">
|
58 |
<h2 class="ajdg-postbox-title"><?php _e('Schedule all campaigns with ease', 'adrotate'); ?></h2>
|
78 |
<div class="ajdg-postbox">
|
79 |
<h2 class="ajdg-postbox-title"><?php _e('Buy AdRotate Professional', 'adrotate'); ?></h2>
|
80 |
<div id="get-pro" class="ajdg-postbox-content">
|
81 |
+
<p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><img src="<?php echo plugins_url('/images/logo-60x60.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /></a><?php _e('AdRotate Pro has a whole lote more functions for even better advertising management. Check out the feature comparison page to see what AdRotate Pro has to offer for you!', 'adrotate'); ?></p>
|
82 |
<a href="https://ajdg.solutions/products/adrotate-for-wordpress/"><img src="<?php echo plugins_url('/images/adrotate-product.png', dirname(__FILE__)); ?>" alt="adrotate-product" width="150" height="150" align="right" style="padding: 0 0 10px 10px;" /></a>
|
83 |
+
<p><a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><strong><?php _e('Single License', 'adrotate'); ?> (€ 29.00)</strong></a><br /><em><?php _e('One WordPress installation.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1124" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></em></p>
|
84 |
+
<p><a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><strong><?php _e('Duo License', 'adrotate'); ?> (€ 39.00)</strong></a><br /><em><?php _e('Two WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1126" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></em></p>
|
85 |
+
<p><a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><strong><?php _e('Multi License', 'adrotate'); ?> (€ 89.00)</strong></a><br /><em><?php _e('Five WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1128" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></em></p>
|
86 |
+
<p><a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><strong><?php _e('Developer License', 'adrotate'); ?> (€ 199.00)</strong></a><br /><em><?php _e('Unlimited WordPress installations and/or networks.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1130" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></em></p>
|
87 |
+
<p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><strong><?php _e('Compare licenses', 'adrotate'); ?></strong></a><br /><em><?php _e('Not sure which license is for you? Compare them...', 'adrotate'); ?> <a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><?php _e('All Licenses', 'adrotate'); ?> »</a></em></p>
|
88 |
</div>
|
89 |
</div>
|
90 |
<!--
|
dashboard/info.php
CHANGED
@@ -19,7 +19,7 @@ $partner = mt_rand(1,3);
|
|
19 |
?>
|
20 |
<div id="dashboard-widgets-wrap">
|
21 |
<div id="dashboard-widgets" class="metabox-holder">
|
22 |
-
<div id="left-column" class="postbox-container">
|
23 |
|
24 |
<div class="ajdg-postbox">
|
25 |
<h2 class="ajdg-postbox-title"><?php _e('Currently', 'adrotate'); ?></h2>
|
@@ -45,7 +45,13 @@ $partner = mt_rand(1,3);
|
|
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/
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
</td>
|
50 |
</tr>
|
51 |
</tbody>
|
@@ -53,21 +59,8 @@ $partner = mt_rand(1,3);
|
|
53 |
</div>
|
54 |
</div>
|
55 |
|
56 |
-
<div class="ajdg-postbox">
|
57 |
-
<h2 class="ajdg-postbox-title"><?php _e('Buy AdRotate Professional', 'adrotate'); ?></h2>
|
58 |
-
<div id="get-pro" class="ajdg-postbox-content">
|
59 |
-
<p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><img src="<?php echo plugins_url('/images/logo-60x60.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /></a><?php _e('AdRotate Pro has a whole lote more functions for even better advertising management. Check out the feature comparison page to see what AdRotate Pro has to offer for you!', 'adrotate'); ?></p>
|
60 |
-
<a href="https://ajdg.solutions/products/adrotate-for-wordpress/"><img src="<?php echo plugins_url('/images/adrotate-product.png', dirname(__FILE__)); ?>" alt="adrotate-product" width="150" height="150" align="right" style="padding: 0 0 10px 10px;" /></a>
|
61 |
-
<p><h4><?php _e('Single License', 'adrotate'); ?> (€ 29.00)</h4><?php _e('One WordPress installation.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1124" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></p>
|
62 |
-
<p><h4><?php _e('Duo License', 'adrotate'); ?> (€ 39.00)</h4><?php _e('Two WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1126" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></p>
|
63 |
-
<p><h4><?php _e('Multi License', 'adrotate'); ?> (€ 89.00)</h4><?php _e('Five WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1128" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></p>
|
64 |
-
<p><h4><?php _e('Developer License', 'adrotate'); ?> (€ 199.00)</h4><?php _e('Unlimited WordPress installations and/or networks.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1130" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></p>
|
65 |
-
<p><h4><?php _e('Compare licenses', 'adrotate'); ?></h4> <?php _e('Not sure which license is for you? Compare them...', 'adrotate'); ?> <a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><?php _e('All Licenses', 'adrotate'); ?> »</a></p>
|
66 |
-
</div>
|
67 |
-
</div>
|
68 |
-
|
69 |
</div>
|
70 |
-
<div id="right-column" class="postbox-container">
|
71 |
|
72 |
<div class="ajdg-postbox">
|
73 |
<h2 class="ajdg-postbox-title"><?php _e('News & Updates', 'adrotate'); ?></h2>
|
@@ -75,7 +68,7 @@ $partner = mt_rand(1,3);
|
|
75 |
<p><center><a href="https://www.arnan.me" title="Visit Arnan's website" target="_blank"><img src="<?php echo plugins_url("/images/buttons/1.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/buttons/2.png", dirname(__FILE__)); ?>" alt="AJdG Solutions website" /></a><a href="https://www.facebook.com/ajdgsolutions/" title="AJdG Solutions on Facebook" target="_blank"><img src="<?php echo plugins_url("/images/buttons/4.png", dirname(__FILE__)); ?>" alt="AJdG Solutions on Facebook" /></a></center></p>
|
76 |
<?php wp_widget_rss_output(array(
|
77 |
'url' => 'http://ajdg.solutions/feed/',
|
78 |
-
'items' =>
|
79 |
'show_summary' => 1,
|
80 |
'show_author' => 0,
|
81 |
'show_date' => 1)
|
@@ -83,6 +76,19 @@ $partner = mt_rand(1,3);
|
|
83 |
</div>
|
84 |
</div>
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
</div>
|
87 |
</div>
|
88 |
</div>
|
@@ -95,7 +101,7 @@ $partner = mt_rand(1,3);
|
|
95 |
|
96 |
<div id="dashboard-widgets-wrap">
|
97 |
<div id="dashboard-widgets" class="metabox-holder">
|
98 |
-
<div id="left-column" class="postbox-container">
|
99 |
|
100 |
<div class="ajdg-postbox">
|
101 |
<h2 class="ajdg-postbox-title"><?php _e('Join the Media.net advertising network', 'adrotate'); ?></h2>
|
@@ -112,6 +118,7 @@ $partner = mt_rand(1,3);
|
|
112 |
</div>
|
113 |
</div>
|
114 |
|
|
|
115 |
<div class="ajdg-postbox">
|
116 |
<h2 class="ajdg-postbox-title"><?php _e('DropBox online storage solutions', 'adrotate'); ?></h2>
|
117 |
<div id="dropbox" class="ajdg-postbox-content">
|
@@ -119,9 +126,10 @@ $partner = mt_rand(1,3);
|
|
119 |
<p><center><a rel="nofollow" href="https://ajdg.solutions/go/dropbox/"><img src="<?php echo plugins_url("/images/offers/dropbox.jpg", dirname(__FILE__)); ?>" width="440" alt="Dropbox.com"></a></center></p>
|
120 |
</div>
|
121 |
</div>
|
|
|
122 |
|
123 |
</div>
|
124 |
-
<div id="right-column" class="postbox-container">
|
125 |
|
126 |
<div class="ajdg-postbox">
|
127 |
<h2 class="ajdg-postbox-title"><?php _e('Sign up with Blind Ferret', 'adrotate'); ?></h2>
|
19 |
?>
|
20 |
<div id="dashboard-widgets-wrap">
|
21 |
<div id="dashboard-widgets" class="metabox-holder">
|
22 |
+
<div id="left-column" class="ajdg-postbox-container">
|
23 |
|
24 |
<div class="ajdg-postbox">
|
25 |
<h2 class="ajdg-postbox-title"><?php _e('Currently', 'adrotate'); ?></h2>
|
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/10eur" 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></p>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
<tr>
|
52 |
+
<td colspan="2">
|
53 |
+
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.3&appId=819007458455318"></script>
|
54 |
+
<p><center><div class="fb-group" data-href="https://www.facebook.com/groups/ajdg.wordpress.help/" data-width="500" data-show-social-context="false" data-show-metadata="true"></div></center></p>
|
55 |
</td>
|
56 |
</tr>
|
57 |
</tbody>
|
59 |
</div>
|
60 |
</div>
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
</div>
|
63 |
+
<div id="right-column" class="ajdg-postbox-container">
|
64 |
|
65 |
<div class="ajdg-postbox">
|
66 |
<h2 class="ajdg-postbox-title"><?php _e('News & Updates', 'adrotate'); ?></h2>
|
68 |
<p><center><a href="https://www.arnan.me" title="Visit Arnan's website" target="_blank"><img src="<?php echo plugins_url("/images/buttons/1.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/buttons/2.png", dirname(__FILE__)); ?>" alt="AJdG Solutions website" /></a><a href="https://www.facebook.com/ajdgsolutions/" title="AJdG Solutions on Facebook" target="_blank"><img src="<?php echo plugins_url("/images/buttons/4.png", dirname(__FILE__)); ?>" alt="AJdG Solutions on Facebook" /></a></center></p>
|
69 |
<?php wp_widget_rss_output(array(
|
70 |
'url' => 'http://ajdg.solutions/feed/',
|
71 |
+
'items' => 2,
|
72 |
'show_summary' => 1,
|
73 |
'show_author' => 0,
|
74 |
'show_date' => 1)
|
76 |
</div>
|
77 |
</div>
|
78 |
|
79 |
+
<div class="ajdg-postbox">
|
80 |
+
<h2 class="ajdg-postbox-title"><?php _e('Buy AdRotate Professional', 'adrotate'); ?></h2>
|
81 |
+
<div id="get-pro" class="ajdg-postbox-content">
|
82 |
+
<p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><img src="<?php echo plugins_url('/images/logo-60x60.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /></a><?php _e('AdRotate Pro has a whole lote more functions for even better advertising management. Check out the feature comparison page to see what AdRotate Pro has to offer for you!', 'adrotate'); ?></p>
|
83 |
+
<a href="https://ajdg.solutions/products/adrotate-for-wordpress/"><img src="<?php echo plugins_url('/images/adrotate-product.png', dirname(__FILE__)); ?>" alt="adrotate-product" width="150" height="150" align="right" style="padding: 0 0 10px 10px;" /></a>
|
84 |
+
<p><a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><strong><?php _e('Single License', 'adrotate'); ?> (€ 29.00)</strong></a><br /><em><?php _e('One WordPress installation.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1124" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></em></p>
|
85 |
+
<p><a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><strong><?php _e('Duo License', 'adrotate'); ?> (€ 39.00)</strong></a><br /><em><?php _e('Two WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1126" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></em></p>
|
86 |
+
<p><a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><strong><?php _e('Multi License', 'adrotate'); ?> (€ 89.00)</strong></a><br /><em><?php _e('Five WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1128" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></em></p>
|
87 |
+
<p><a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><strong><?php _e('Developer License', 'adrotate'); ?> (€ 199.00)</strong></a><br /><em><?php _e('Unlimited WordPress installations and/or networks.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1130" target="_blank"><?php _e('Buy now', 'adrotate'); ?> »</a></em></p>
|
88 |
+
<p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><strong><?php _e('Compare licenses', 'adrotate'); ?></strong></a><br /><em><?php _e('Not sure which license is for you? Compare them...', 'adrotate'); ?> <a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><?php _e('All Licenses', 'adrotate'); ?> »</a></em></p>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
|
92 |
</div>
|
93 |
</div>
|
94 |
</div>
|
101 |
|
102 |
<div id="dashboard-widgets-wrap">
|
103 |
<div id="dashboard-widgets" class="metabox-holder">
|
104 |
+
<div id="left-column" class="ajdg-postbox-container">
|
105 |
|
106 |
<div class="ajdg-postbox">
|
107 |
<h2 class="ajdg-postbox-title"><?php _e('Join the Media.net advertising network', 'adrotate'); ?></h2>
|
118 |
</div>
|
119 |
</div>
|
120 |
|
121 |
+
<!--
|
122 |
<div class="ajdg-postbox">
|
123 |
<h2 class="ajdg-postbox-title"><?php _e('DropBox online storage solutions', 'adrotate'); ?></h2>
|
124 |
<div id="dropbox" class="ajdg-postbox-content">
|
126 |
<p><center><a rel="nofollow" href="https://ajdg.solutions/go/dropbox/"><img src="<?php echo plugins_url("/images/offers/dropbox.jpg", dirname(__FILE__)); ?>" width="440" alt="Dropbox.com"></a></center></p>
|
127 |
</div>
|
128 |
</div>
|
129 |
+
-->
|
130 |
|
131 |
</div>
|
132 |
+
<div id="right-column" class="ajdg-postbox-container">
|
133 |
|
134 |
<div class="ajdg-postbox">
|
135 |
<h2 class="ajdg-postbox-title"><?php _e('Sign up with Blind Ferret', 'adrotate'); ?></h2>
|
dashboard/publisher/adverts-generator.php
CHANGED
@@ -37,110 +37,108 @@ wp_enqueue_script('uploader-hook', plugins_url().'/adrotate-pro/library/uploader
|
|
37 |
|
38 |
<p><?php _e('If you have a complete and working ad code / ad tag you do not use the Generator. You can simply paste that code in the AdCode field when creating your advert. For example as provided by Media.net or Google AdSense among others.', 'adrotate'); ?></p>
|
39 |
|
40 |
-
<h2><?php _e('
|
41 |
<em><?php _e('This is a regular advert consisting of an image and a link, made up from HTML code.', 'adrotate'); ?></em>
|
42 |
<table class="widefat" style="margin-top: .5em">
|
43 |
|
44 |
<thead>
|
45 |
<tr>
|
46 |
-
<th colspan="2"><strong><?php _e('Required', 'adrotate
|
47 |
</tr>
|
48 |
</thead>
|
49 |
|
50 |
<tbody>
|
51 |
<tr>
|
52 |
-
<th valign="top"><?php _e('Banner
|
53 |
<td>
|
54 |
-
<label for="
|
55 |
-
<select tabindex="1" id="
|
56 |
-
<option value=""><?php _e('
|
57 |
<?php echo adrotate_folder_contents('', 'image'); ?>
|
58 |
-
</select> <?php _e('Is your file not listed? Upload it via the AdRotate Media Manager.', 'adrotate');
|
59 |
-
|
60 |
-
<label for="adrotate_text"><input tabindex="2" id="adrotate_text" name="adrotate_text" type="text" size="60" class="ajdg-inputfield" value="" autocomplete="off" /> <?php _e('Visible text if this is a text link banner.', 'adrotate'); ?><br /><em><?php _e('Use either the dropdown or the text field. If the dropdown is used, that field has priority.', 'adrotate'); ?></em></label>
|
61 |
-
|
62 |
</td>
|
63 |
</tr>
|
64 |
<tr>
|
65 |
<th width="15%" valign="top"><?php _e('Target website', 'adrotate'); ?></th>
|
66 |
<td>
|
67 |
-
|
68 |
</td>
|
69 |
</tr>
|
70 |
-
|
71 |
|
72 |
<thead>
|
73 |
<tr>
|
74 |
-
<th colspan="2"><strong><?php _e('
|
75 |
</tr>
|
76 |
</thead>
|
77 |
|
78 |
<tbody>
|
79 |
-
|
80 |
-
<th valign="top"><?php _e('
|
81 |
-
<td>
|
82 |
-
<label for="adrotate_newwindow_disabled"><input tabindex="4" type="checkbox" name="adrotate_newwindow_disabled" disabled="1" /></label> <?php _e('Available in AdRotate Pro.', 'adrotate'); ?> <?php _e('Open the target website in a new window?', 'adrotate'); ?>
|
83 |
-
</td>
|
84 |
-
</tr>
|
85 |
-
<tr>
|
86 |
-
<th valign="top"><?php _e('NoFollow', 'adrotate'); ?></th>
|
87 |
-
<td>
|
88 |
-
<label for="adrotate_nofollow_disabled"><input tabindex="5" type="checkbox" name="adrotate_nofollow_disabled" disabled="1"/></label> <?php _e('Available in AdRotate Pro.', 'adrotate'); ?> <?php _e('Tell crawlers and search engines not to follow the target website url?', 'adrotate'); ?>
|
89 |
-
</td>
|
90 |
-
</tr>
|
91 |
-
<tr>
|
92 |
-
<th valign="top"><?php _e('Advert size', 'adrotate'); ?></strong></th>
|
93 |
<td>
|
94 |
-
<label for="
|
95 |
-
|
96 |
-
|
|
|
|
|
97 |
</td>
|
98 |
</tr>
|
99 |
-
</tbody>
|
100 |
-
|
101 |
-
</table>
|
102 |
-
|
103 |
-
<h2><?php _e('HTML5 or Flash Advert', 'adrotate'); ?></h2>
|
104 |
-
<em><?php _e('These are more advanced adverts, using a Flash file or HTML5 files. Try to avoid Flash. HTML5 is the new and better standard.', 'adrotate'); ?><br />
|
105 |
-
<?php _e('If your HTML5 advert consists of multiple files, upload all files using the AdRotate Media Manager and select the HTML file here.', 'adrotate'); ?></em>
|
106 |
-
<table class="widefat" style="margin-top: .5em">
|
107 |
-
|
108 |
-
<tbody>
|
109 |
<tr>
|
110 |
-
<th valign="top"
|
111 |
<td>
|
112 |
-
<label for="
|
113 |
-
<select tabindex="
|
114 |
<option value=""><?php _e('No file selected', 'adrotate'); ?></option>
|
115 |
-
|
116 |
-
|
117 |
-
</label>
|
118 |
</td>
|
119 |
</tr>
|
120 |
-
|
121 |
-
|
122 |
<td>
|
123 |
-
<label for="
|
124 |
-
|
125 |
-
|
|
|
|
|
126 |
</td>
|
127 |
</tr>
|
128 |
<tr>
|
129 |
-
<
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
</label>
|
136 |
-
</td>
|
137 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
</tbody>
|
139 |
|
140 |
</table>
|
141 |
|
142 |
<p class="submit">
|
143 |
-
<input tabindex="
|
144 |
<a href="admin.php?page=adrotate-ads&view=manage" class="button"><?php _e('Cancel', 'adrotate'); ?></a> <?php _e('Always test your adverts before activating them.', 'adrotate'); ?>
|
145 |
</p>
|
146 |
|
37 |
|
38 |
<p><?php _e('If you have a complete and working ad code / ad tag you do not use the Generator. You can simply paste that code in the AdCode field when creating your advert. For example as provided by Media.net or Google AdSense among others.', 'adrotate'); ?></p>
|
39 |
|
40 |
+
<h2><?php _e('Create your advert', 'adrotate'); ?></h2>
|
41 |
<em><?php _e('This is a regular advert consisting of an image and a link, made up from HTML code.', 'adrotate'); ?></em>
|
42 |
<table class="widefat" style="margin-top: .5em">
|
43 |
|
44 |
<thead>
|
45 |
<tr>
|
46 |
+
<th colspan="2"><strong><?php _e('Required', 'adrotate'); ?></strong></th>
|
47 |
</tr>
|
48 |
</thead>
|
49 |
|
50 |
<tbody>
|
51 |
<tr>
|
52 |
+
<th valign="top"><?php _e('Banner image', 'adrotate'); ?></th>
|
53 |
<td>
|
54 |
+
<label for="adrotate_fullsize_dropdown">
|
55 |
+
<select tabindex="1" id="adrotate_fullsize_dropdown" name="adrotate_fullsize_dropdown" style="min-width: 300px;">
|
56 |
+
<option value=""><?php _e('Select advert image', 'adrotate'); ?></option>
|
57 |
<?php echo adrotate_folder_contents('', 'image'); ?>
|
58 |
+
</select> <?php _e('Is your file not listed? Upload it via the AdRotate Media Manager.', 'adrotate'); ?>
|
59 |
+
</label>
|
|
|
|
|
60 |
</td>
|
61 |
</tr>
|
62 |
<tr>
|
63 |
<th width="15%" valign="top"><?php _e('Target website', 'adrotate'); ?></th>
|
64 |
<td>
|
65 |
+
<label for="adrotate_targeturl"><input tabindex="2" id="adrotate_targeturl" name="adrotate_targeturl" type="text" size="60" class="ajdg-inputfield" value="" autocomplete="off" /> <?php _e('Where does the person clicking the advert go?', 'adrotate'); ?></label>
|
66 |
</td>
|
67 |
</tr>
|
68 |
+
</tbody>
|
69 |
|
70 |
<thead>
|
71 |
<tr>
|
72 |
+
<th colspan="2"><strong><?php _e('Viewports', 'adrotate'); ?> - <?php _e('Available in AdRotate Pro', 'adrotate'); ?></strong></th>
|
73 |
</tr>
|
74 |
</thead>
|
75 |
|
76 |
<tbody>
|
77 |
+
<tr>
|
78 |
+
<th valign="top"><?php _e('Smaller Devices', 'adrotate'); ?></th>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
<td>
|
80 |
+
<label for="adrotate_small_dropdown">
|
81 |
+
<select tabindex="3" id="adrotate_small_dropdown" name="adrotate_small_dropdown" style="min-width: 300px;" disabled>
|
82 |
+
<option value=""><?php _e('No file selected', 'adrotate'); ?></option>
|
83 |
+
</select> <em><?php _e('Smaller smartphones and tablets with a viewport of up to 480px wide (up-to 1440px resolution).', 'adrotate'); ?></em>
|
84 |
+
</label>
|
85 |
</td>
|
86 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
<tr>
|
88 |
+
<th valign="top"><?php _e('Medium sized Devices', 'adrotate'); ?></th>
|
89 |
<td>
|
90 |
+
<label for="adrotate_medium_dropdown">
|
91 |
+
<select tabindex="4" id="adrotate_medium_dropdown" name="adrotate_medium_dropdown" style="min-width: 300px;" disabled>
|
92 |
<option value=""><?php _e('No file selected', 'adrotate'); ?></option>
|
93 |
+
</select> <em><?php _e('Larger smartphones or Small tablets with a viewport of up to 960px wide (up-to 1536px resolution).', 'adrotate'); ?></em>
|
94 |
+
</label>
|
|
|
95 |
</td>
|
96 |
</tr>
|
97 |
+
<tr>
|
98 |
+
<th valign="top"><?php _e('Larger Devices', 'adrotate'); ?></th>
|
99 |
<td>
|
100 |
+
<label for="adrotate_large_dropdown">
|
101 |
+
<select tabindex="5" id="adrotate_large_dropdown" name="adrotate_large_dropdown" style="min-width: 300px;" disabled>
|
102 |
+
<option value=""><?php _e('No file selected', 'adrotate'); ?></option>
|
103 |
+
</select> <em><?php _e('Small laptops and Larger tablets with a viewport of up to 1280px wide (up-to 2048px resolution).', 'adrotate'); ?></em>
|
104 |
+
</label>
|
105 |
</td>
|
106 |
</tr>
|
107 |
<tr>
|
108 |
+
<td colspan="2"><strong><?php _e('Important:', 'adrotate'); ?></strong> <?php _e('All sizes are optional, but it is highly recommended to use at least the small and medium size. Devices with viewports greater than 1280px will use the full sized banner.', 'adrotate'); ?><br /><?php _e('Are your files not listed? Upload them via the AdRotate Media Manager. For your convenience, use easy to use filenames.', 'adrotate'); ?></td>
|
109 |
+
</tr>
|
110 |
+
|
111 |
+
<thead>
|
112 |
+
<tr>
|
113 |
+
<th colspan="2"><strong><?php _e('Optional', 'adrotate'); ?></strong></th>
|
|
|
|
|
114 |
</tr>
|
115 |
+
</thead>
|
116 |
+
|
117 |
+
<tbody>
|
118 |
+
<tr>
|
119 |
+
<th valign="top"><?php _e('Target window', 'adrotate'); ?></th>
|
120 |
+
<td>
|
121 |
+
<label for="adrotate_newwindow"><input tabindex="6" type="checkbox" name="adrotate_newwindow" checked="1" /></label> <?php _e('Open the advert in a new window?', 'adrotate'); ?> <?php _e('(Recommended)', 'adrotate'); ?>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<tr>
|
125 |
+
<th valign="top"><?php _e('NoFollow', 'adrotate'); ?></th>
|
126 |
+
<td>
|
127 |
+
<label for="adrotate_nofollow"><input tabindex="7" type="checkbox" name="adrotate_nofollow" disabled /></label> <?php _e('Tell crawlers and search engines not to follow the target website url?', 'adrotate'); ?> <?php _e('(Available in AdRotate Pro)', 'adrotate'); ?><br /><em><?php _e('Letting bots (Such as Googlebot) index paid links may negatively affect your SEO and PageRank.', 'adrotate'); ?></em>
|
128 |
+
</td>
|
129 |
+
</tr>
|
130 |
+
<tr>
|
131 |
+
<th valign="top"><?php _e('Alt and Title', 'adrotate'); ?></th>
|
132 |
+
<td>
|
133 |
+
<label for="adrotate_title_attr"><input tabindex="8" type="checkbox" name="adrotate_title_attr" disabled /></label> <?php _e('Add an alt and title attribute based on the asset name?', 'adrotate'); ?> <?php _e('(Available in AdRotate Pro)', 'adrotate'); ?><br /><em><?php _e('Some bots/crawlers use them as a descriptive measure to see what the code is about.', 'adrotate'); ?></em>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
</tbody>
|
137 |
|
138 |
</table>
|
139 |
|
140 |
<p class="submit">
|
141 |
+
<input tabindex="8" type="submit" name="adrotate_generate_submit" class="button-primary" value="<?php _e('Generate and Configure Advert', 'adrotate'); ?>" />
|
142 |
<a href="admin.php?page=adrotate-ads&view=manage" class="button"><?php _e('Cancel', 'adrotate'); ?></a> <?php _e('Always test your adverts before activating them.', 'adrotate'); ?>
|
143 |
</p>
|
144 |
|
dashboard/support.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* ------------------------------------------------------------------------------------
|
3 |
+
* COPYRIGHT AND TRADEMARK NOTICE
|
4 |
+
* Copyright 2008-2019 Arnan de Gans. All Rights Reserved.
|
5 |
+
* ADROTATE is a registered trademark of Arnan de Gans.
|
6 |
+
|
7 |
+
* COPYRIGHT NOTICES AND ALL THE COMMENTS SHOULD REMAIN INTACT.
|
8 |
+
* By using this code you agree to indemnify Arnan de Gans from any
|
9 |
+
* liability that might arise from it's use.
|
10 |
+
------------------------------------------------------------------------------------ */
|
11 |
+
|
12 |
+
$banners = $groups = $schedules = $queued = $unpaid = 0;
|
13 |
+
$banners = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}adrotate` WHERE `type` != 'empty' AND `type` != 'a_empty';");
|
14 |
+
$groups = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '';");
|
15 |
+
$schedules = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}adrotate_schedule` WHERE `name` != '';");
|
16 |
+
$queued = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}adrotate` WHERE `type` = 'queue' OR `type` = 'reject';");
|
17 |
+
$data = get_option("adrotate_advert_status");
|
18 |
+
|
19 |
+
// Random banner for Media.net
|
20 |
+
$partner = mt_rand(1,3);
|
21 |
+
?>
|
22 |
+
|
23 |
+
<div id="dashboard-widgets-wrap">
|
24 |
+
<div id="dashboard-widgets" class="metabox-holder">
|
25 |
+
<div id="left-column" class="ajdg-postbox-container">
|
26 |
+
|
27 |
+
<div class="ajdg-postbox">
|
28 |
+
<h2 class="ajdg-postbox-title"><?php _e('Support Forums', 'adrotate'); ?></h2>
|
29 |
+
<div id="news" class="ajdg-postbox-content">
|
30 |
+
<p><img src="<?php echo plugins_url('/images/icon-support.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /><?php _e('When you are stuck with AdRotate or AdRotate Pro, check the forums first. Chances are your question has already been asked and answered!', 'adrotate'); ?> <?php _e('Next to the forum there are many manuals and guides available for almost every function and feature in the plugin.', 'adrotate'); ?> <a href="https://ajdg.solutions/support/adrotate-manuals/" target="_blank"><?php _e('Take a look at the AdRotate Manuals', 'adrotate'); ?></a>.</p>
|
31 |
+
|
32 |
+
<p><a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/general-support/" target="_blank"><strong>General Support</strong></a><br /><em>Ask anything about AdRotate and AdRotate Pro here. <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/general-support/" target="_blank"><?php _e('View topics', 'adrotate'); ?> »</a></em></p>
|
33 |
+
<p><a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/installation-and-setup/" target="_blank"><strong>Installation and Setup</strong></a><br /><em>Having trouble installing AdRotate (Pro) or not sure how to get started? <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/installation-and-setup/" target="_blank"><?php _e('View topics', 'adrotate'); ?> »</a></em></p>
|
34 |
+
<p><a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/adverts-and-banners/" target="_blank"><strong>Adverts and Banners</strong></a><br /><em>The moneymaker! Your adverts. <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/adverts-and-banners/" target="_blank"><?php _e('View topics', 'adrotate'); ?> »</a></em></p>
|
35 |
+
<p><a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/groups/" target="_blank"><strong>Groups</strong></a><br /><em>All about groups. <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/groups/" target="_blank"><?php _e('View topics', 'adrotate'); ?> »</a></em></p>
|
36 |
+
<p><a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/advert-statistics/" target="_blank"><strong>Advert Statistics</strong></a><br /><em>Graphs, impressions and clicks! <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/advert-statistics/" target="_blank"><?php _e('View topics', 'adrotate'); ?> »</a></em></p>
|
37 |
+
<p><a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/bug-reports/" target="_blank"><strong>Bug Reports</strong></a><br /><em>Found a bug? Or something odd? Let me know! <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/bug-reports/" target="_blank"><?php _e('View topics', 'adrotate'); ?> »</a></em></p>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
<div class="ajdg-postbox">
|
42 |
+
<h2 class="ajdg-postbox-title"><?php _e('Additional Services', 'adrotate'); ?></h2>
|
43 |
+
<div id="get-pro" class="ajdg-postbox-content">
|
44 |
+
<p><img src="<?php echo plugins_url('/images/icon-services.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /><?php _e('Have stuff done for you, by AJdG Solutions. If you need HTML5 Adverts set up. Or do not know how to update the plugin. Get me to do it for you! These professional services are available for every AdRotate and AdRotate Pro user and are usually handled in less than 2 business days.', 'adrotate'); ?></p>
|
45 |
+
|
46 |
+
<p><a href="https://ajdg.solutions/product/adrotate-update/" target="_blank"><strong><?php _e('Update AdRotate Pro', 'adrotate'); ?> (€ 22.50)</strong></a><br /><em><?php _e('Get a newer version of AdRotate Pro installed.', 'adrotate'); ?> <a href="https://ajdg.solutions/product/adrotate-update/" target="_blank"><?php _e('Order now', 'adrotate'); ?> »</a></em></p>
|
47 |
+
<p><a href="https://ajdg.solutions/product/adrotate-html5-setup-service/" target="_blank"><strong><?php _e('HTML5 Advert setup', 'adrotate'); ?> (€ 22.50/advert)</strong></strong></a><br /><em><?php _e('Got a HTML5 advert that needs to be set up?', 'adrotate'); ?> <a href="https://ajdg.solutions/product/adrotate-html5-setup-service/" target="_blank"><?php _e('Order now', 'adrotate'); ?> »</a></em></p>
|
48 |
+
<p><strong><?php _e('AdRotate setup', 'adrotate'); ?> (€ 45/hr)</strong></strong><br /><em><?php _e('Contact AJdG Solutions and inquire about the possibilities to set up AdRotate for you.', 'adrotate'); ?></em></p>
|
49 |
+
</div>
|
50 |
+
|