Skip to content

Commit bfc694d

Browse files
Merge pull request #597 from JeromeMartinez/Ads
Use another web advertiser, revert
2 parents 944dbef + 48f7a9b commit bfc694d

4 files changed

Lines changed: 18 additions & 33 deletions

File tree

app/Resources/views/base.html.twig

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,6 @@
77
<html{% if rtl is defined and true == rtl %} dir="rtl"{% endif %} lang="{{ app.request.locale }}">
88
<head>
99
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10-
{% if ads %}
11-
<script async src='https://securepubads.g.doubleclick.net/tag/js/gpt.js'></script>
12-
<script async src="https://vertex-cdn.relevant-digital.com/static/tags/69272294e5bf2fc30d50f89e.js"></script>
13-
<script>
14-
function loadAds() {
15-
window.relevantDigital = window.relevantDigital || {};
16-
relevantDigital.cmd = relevantDigital.cmd || [];
17-
relevantDigital.cmd.push(function () {
18-
relevantDigital.loadPrebid({
19-
configId: '69272d28f64d523c9b50f90d',
20-
manageAdserver: true,
21-
collapseEmptyDivs: true,
22-
collapseBeforeAdFetch: false,
23-
allowedDivIds: null,
24-
noSlotReload: true,
25-
noGpt: true
26-
});
27-
});
28-
};
29-
</script>
30-
{% endif %}
3110
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
3211
<meta name="viewport" content="width=device-width, initial-scale=1" />
3312
<title>{% block title %}MediaInfo{% endblock %}</title>
@@ -108,8 +87,7 @@
10887
{% endfor %}
10988

11089
{% if ads %}
111-
{{ include('@App/adSlot.html.twig', { adSlotId: 'desktop_leaderboard_atf_ros' }, with_context = false) }}
112-
{{ include('@App/adSlot.html.twig', { adSlotId: 'mobile_leaderboard_atf_ros' }, with_context = false) }}
90+
{{ include('@App/adSlot.html.twig', { adSlotId: 5930355910 }, with_context = false) }}
11391
{% endif %}
11492

11593
{% block body %}{% endblock %}
@@ -120,8 +98,7 @@
12098
<div class="clearfix"></div>
12199
{% if ads %}
122100
<div class="container">
123-
{{ include('@App/adSlot.html.twig', { adSlotId: 'desktop_fixedfooter_ros' }, with_context = false) }}
124-
{{ include('@App/adSlot.html.twig', { adSlotId: 'Mobile_fixedfooter_ros' }, with_context = false) }}
101+
{{ include('@App/adSlot.html.twig', { adSlotId: 8744221512 }, with_context = false) }}
125102
</div>
126103
{% endif %}
127104
<footer id="footer">
@@ -151,9 +128,7 @@
151128
{{ include('@App/socialShare.html.twig') }}
152129
{% block javascripts %}{% endblock %}
153130
{% if ads %}
154-
<script>
155-
loadAds();
156-
</script>
131+
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
157132
{% endif %}
158133
</body>
159134
</html>

src/AppBundle/Resources/public/js/sidebar.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ var sidebar = (function () {
4747

4848
var ads = function() {
4949
if (1 == $('#sidebar .sidebar-ads').length) {
50-
var slot = '<div id="placement" data-ad-unit-id="/78655843/Mediaarea/mediaarea.net_desktop_sticky_side_left"></div>';
50+
var slot = '<ins class="adsbygoogle"\
51+
style="display:block;"\
52+
data-ad-client="ca-pub-8386011224798635"\
53+
data-ad-slot="3057614716"\
54+
data-ad-format="auto"></ins>';
5155

5256
$('#sidebar .sidebar-ads').append(slot);
5357
(adsbygoogle = window.adsbygoogle || []).push({});
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
<div id="placement" data-ad-unit-id="/78655843/Mediaarea/mediaarea.net_{{ adSlotId }}"></div>
1+
<div>
2+
<ins class="adsbygoogle"
3+
style="display:block;"
4+
data-ad-client="ca-pub-8386011224798635"
5+
data-ad-slot="{{ adSlotId }}"
6+
data-ad-format="horizontal"></ins>
7+
<script>
8+
(adsbygoogle = window.adsbygoogle || []).push({});
9+
</script>
10+
</div>

src/MediaInfoBundle/Resources/views/Default/about.html.twig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@
154154
<br>
155155
You can also use <a href="{{ path('mi_online') }}" target="_blank">MediaInfoOnline</a> to test MediaInfo without installing any software on your computer.
156156
</div>
157-
{% if ads %}
158-
{{ include('@App/adSlot.html.twig', { adSlotId: 'mediaarea.net_mobile-square-btf-ros' }, with_context = false) }}
159-
{% endif %}
160157
<div class="alert alert-info text-center">
161158
{% trans with {'%donateRoute%': path('supportUs_individual')} %}about.what.donate{% endtrans %}
162159
</div>

0 commit comments

Comments
 (0)