Skip to content

Commit c665169

Browse files
author
valeriiiiiia
committed
Commit Plugin Version 1.8.2
Bug fixing: creative delivery now working properly with https
1 parent b25f829 commit c665169

File tree

5 files changed

+70
-36
lines changed

5 files changed

+70
-36
lines changed

classes/PerformanceAds.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ public static function getAdCode($size)
7878
}
7979

8080
$html = '<script language="javascript" type="text/javascript" src="' .
81-
'http://' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&type=html&hnb=' . $hnb . '&js=1&subid='.$subId.
81+
'//' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&type=html&hnb=' . $hnb . '&js=1&subid='.$subId.
8282
'"></script><noscript><a href="' .
83-
'http://' . $clickUrl . '/click.asp?ref=' . $publisherId . '&site=' . $programId . '&type=b1&bnb=1&subid='.$subId.
83+
'//' . $clickUrl . '/click.asp?ref=' . $publisherId . '&site=' . $programId . '&type=b1&bnb=1&subid='.$subId.
8484
'" target="_blank"><img src="' .
85-
'http://' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&b=1&subid='.$subId.
85+
'//' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&b=1&subid='.$subId.
8686
'" border="0"/></a><br /></noscript>';
8787

8888
return $html;

classes/Plugin.php

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,27 @@ public function __construct()
1010
add_action('widgets_init', array($this, 'register_widget'));
1111

1212
add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
13-
add_action('admin_enqueue_scripts', array('Affilinet_View', 'settings_script') );
1413

15-
add_action('admin_head', array($this, 'editor_add_buttons'));
16-
add_action('plugins_loaded', array($this, 'load_textdomain'));
14+
// the script for settings page is currently not needed
15+
//add_action('admin_enqueue_scripts', array('Affilinet_View', 'settings_script') );
1716

17+
add_action('plugins_loaded', array($this, 'load_textdomain'));
1818
add_shortcode('affilinet_performance_ad', array($this, 'performance_ad_shortcode'));
1919

2020
/**
2121
* Disable YieldKit functionality in Version 1
2222
*
2323
if (get_option('affilinet_text_monetization') === '1'
24-
||
25-
get_option('affilinet_link_replacement') === '1'
26-
||
27-
get_option('affilinet_text_widget') === '1'
24+
||
25+
get_option('affilinet_link_replacement') === '1'
26+
||
27+
get_option('affilinet_text_widget') === '1'
2828
) {
29-
add_action('wp_footer', array($this, 'yielkit_code'));
29+
add_action('wp_footer', array($this, 'yielkit_code'));
3030
}
3131
3232
* End Disable YieldKit in Version 1
3333
*/
34-
foreach ( array('post.php','post-new.php') as $hook ) {
35-
add_action( "admin_head-$hook",array($this, 'affilinet_adminScript') );
36-
}
3734

3835
}
3936

@@ -86,14 +83,27 @@ public function register_widget()
8683
}
8784

8885
/**
89-
* Load jquery.flot.js for reporting page
86+
* Load Admin scripts
87+
* @param $hook string
9088
*/
91-
public function admin_enqueue_scripts()
89+
public function admin_enqueue_scripts($hook)
9290
{
93-
wp_register_script('flot', plugin_dir_url( plugin_basename( dirname(__FILE__) ) ).'js/jquery-flot/jquery.flot.js', array('jquery'));
94-
wp_register_script('flot.time', plugin_dir_url( plugin_basename( dirname(__FILE__) ) ).'js/jquery-flot/jquery.flot.time.js', array('jquery', 'flot'));
95-
wp_enqueue_script('flot');
96-
wp_enqueue_script('flot.time');
91+
// on post page add the editor button for affilinet plugin
92+
if ($hook === 'post.php' || $hook == 'post-new.php') {
93+
94+
add_action('admin_head', array($this, 'editor_add_buttons'));
95+
add_action( "admin_head-$hook",array($this, 'affilinet_adminScript') );
96+
}
97+
98+
// on reporting page add jquery.flot
99+
if ($hook === 'affilinet_page_affilinet_reporting') {
100+
wp_register_script('flot', plugin_dir_url( plugin_basename( dirname(__FILE__) ) ).'js/jquery-flot/jquery.flot.js', array('jquery'));
101+
wp_register_script('flot.time', plugin_dir_url( plugin_basename( dirname(__FILE__) ) ).'js/jquery-flot/jquery.flot.time.js', array('jquery', 'flot'));
102+
wp_enqueue_script('flot');
103+
wp_enqueue_script('flot.time');
104+
}
105+
106+
97107
}
98108

99109
/**
@@ -151,7 +161,7 @@ public function affilinet_adminScript()
151161
};
152162
</script>
153163
<!-- TinyMCE Shortcode Plugin -->
154-
<?php
164+
<?php
155165
}
156166

157167
public function add_buttons($plugin_array)
@@ -170,7 +180,7 @@ public function register_buttons($buttons)
170180

171181
public function yielkit_code()
172182
{
173-
echo Affilinet_Yieldkit::getAdCode();
183+
echo Affilinet_Yieldkit::getAdCode();
174184
}
175185

176186
}

classes/View.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,16 @@ function euroFormatter(v, axis)
7272
], options);
7373

7474
</script>
75-
<?php
75+
<?php
7676
}
7777

78-
public static function settings_script($hook_suffix)
78+
public static function settings_script($hook)
7979
{
80+
// this js is only needed on settings page
81+
if ($hook !== 'affilinet_page_affilinet_settings') {
82+
return;
83+
}
84+
8085
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
8186
/** @var String $wp_version */
8287
if ($wp_version < 3.5) {

classes/Yieldkit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function getAdCode()
8282
$ywcolor = str_replace('#','',$ywcolor);
8383
$hnb = 1;
8484

85-
$scriptUrl = 'http://' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&type=html&hnb=' . $hnb . '&js=1' .
85+
$scriptUrl = '//' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&type=html&hnb=' . $hnb . '&js=1' .
8686
'&yword='. $yword.
8787
'&ylink='.$ylink
8888
.'&ywidget='.$ywidget
@@ -92,7 +92,7 @@ public static function getAdCode()
9292
.'&ywcolor='.$ywcolor
9393
.'&ywcid=content&ywcclass=site-content';
9494

95-
$noScriptUrl = 'http://' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&type=b1&bnb=1' .
95+
$noScriptUrl = '//' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&type=b1&bnb=1' .
9696
'&yword='. $yword.
9797
'&ylink='.$ylink
9898
.'&ywidget='.$ywidget
@@ -107,7 +107,7 @@ public static function getAdCode()
107107
.'"></script><noscript><a href="'
108108
.$noScriptUrl
109109
.'" target="_blank"><img title="1x1" alt="1x1" src="'
110-
.'http://' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&b=1'
110+
.'//' . $viewUrl . '/view.asp?ref=' . $publisherId . '&site=' . $programId . '&b=1'
111111
.'" border="0"/></a><br /></noscript>';
112112

113113
return $html;

readme.txt

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,48 @@
11
=== Affilinet Performance Ads ===
22
Contributors: Affilinet, teraone
3-
Tags: advertising, affilinet, affiliate marketing, display, advertisement, vermarktung, geld verdienen, online marketing, marketing, performance
3+
Tags: affiliate marketing, online marketing, performance marketing, marketing, advertisement, advertising, advertise, affilinet, Affiliate, performance, Display, earn money, monetization, monetize, Monetarisierung, performance, Vermarktung, Banner, Geld verdienen, werbeintegration, Werbung
44
Requires at least: 3.0.1
5-
Tested up to: 4.4
6-
Stable tag: 1.8.1
5+
Tested up to: 4.5
6+
Stable tag: 1.8.2
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

1010
Integrate our data driven and automated performance display plugin into your WordPress platform and serve your users targeted ads in real time.
1111

1212
== Description ==
13-
13+
= English =
1414
Integrate affilinet's data driven advertising technology and automated ad display services seamlessly into your WordPress platform and serve the right message, at the right time, to the right person. Dont't worry about ad codes. This plugin will handle all technical details for you.
1515

16-
You can easily add display ads to any sidebar of your blog. This plugin also enhances your WYSIWYG editor, thus its possible to integrate display ads in your content with just one click.
17-
1816
This plugin comes with a statistic page where you can see your daily earnings. You will just have to enter your affilinet Webservice Password.
1917

2018
The benefits at a glance:
2119

22-
* Quick and simple sign up to the affilinet platform
2320
* Easy integration of intelligent display ad units into your site
21+
* Quick and simple sign up to the affilinet platform
2422
* Targeted adverts mean more relevancy for your readers and ultimately more earnings from your website
2523

26-
We’ve made it really easy to get started.
24+
We’ve made it really easy to get started. If you need integration support, please watch our tutorial on Youtube: https://www.youtube.com/watch?v=AtZHeD1CK-E
2725

2826
If you have any questions or need support please contact us at affilinet@teraone.de
2927

3028
= German =
31-
Nutzen Sie die neue Data-Driven Advertising Technologie mit automatisierter Werbemittelausspielung, die Ihre User in Echtzeit anspricht.
29+
Nutzen Sie die neue Data-Driven Advertising Technologie mit automatisierter Werbemittelausspielung von affilinet, die Ihre User in Echtzeit anspricht! Mithilfe dieses Plugins wird Ihren Besuchern die richtige Werbebotschaft zur richtigen Zeit angezeigt – und das ohne jeglichen Programmieraufwand! Eine manuelle Integration des Ad Codes ist nicht erforderlich.
30+
31+
Das affilinet Plugin für WordPress bietet Ihnen die Möglichkeit, zielgruppenadäquate Werbung ganz einfach auf der eigenen Webseite zu integrieren und so Ihren Blog oder Ihre Content-Website gezielt zu monetarisieren. Das Plugin bietet zahlreiche Auswahloptionen zur Platzierung der Banner auf der Seite. Die Werbeanzeigen lassen sich dabei ganz einfach in die Sidebar und in den Content-Bereich Ihres Blogs integrieren. Darüber hinaus bietet das Plugin eine Statistik- Funktionalität, die eine Übersicht über Ihre täglichen Einnahmen liefert.
32+
33+
Ihre Vorteile im Überblick:
34+
35+
* Einfache Integration von Werbung auf Ihrer Seite
36+
* Intelligente Werbemittelausspielung dank innovativer Data-Driven Advertising Technologie
37+
* Schnelle und einfache Registrierung bei affilinet
38+
* Mehr Relevanz für Ihre Besucher durch gezielte Werbeanzeigen
39+
40+
So können Sie Ihren Besuchern in kürzester Zeit und ohne großen Aufwand profildatenbasierte Werbung anzeigen und mehr Sales durch höhere Relevanz der Werbeinhalte erreichen!
41+
42+
Falls Sie noch Fragen zur genauen Integration haben, schauen Sie sich gerne unser dazugehöriges Tutorial auf Youtube an: https://www.youtube.com/watch?v=AtZHeD1CK-E
43+
44+
Oder wenden Sie sich einfach an Ihren Ansprechpartner bei affilinet oder senden Sie eine Email an affilinet@teraone.de.
45+
3246

3347
= French =
3448
Profitez des avantages de notre nouvelle technologie publicitaire! Diffusez en temps réel des publicités ciblées selon le profil des internautes.
@@ -88,6 +102,11 @@ It may take up to 90 minutes for ads to show, additionally all publisher account
88102

89103
== Changelog ==
90104

105+
= 1.8.2 =
106+
* Release Date: June 22, 2016
107+
* Supporting pages under https
108+
* Enhanced compatibility with other plugins
109+
91110
= 1.8.1 =
92111
* Release Date: August 26, 2015
93112
* enhanced installation docs

0 commit comments

Comments
 (0)