Add a script in the Customize/Top zone


Hi !

I come to seek help in a little problem.

I’d like to add an ad script in the Customize area, I have no problem to organize the structure but my script who looks like this :

<script type="text/javascript" src="" title="Classic (IAB)"></script>

does not appear, however it appears in the source code"customHTML",{"top":"\n\n\n<div class=\"ajoutsheader\">\n<div class=\"cit468\"><script type=\"text/javascript\" src=\"\" title=\"Classic (IAB)\"><\/script><\/div>\n<div class=\"instantg\"><p><a href=\"other linke" title=\"blabla\"><img src=\"some image link\" width=\"452\" height=\"90\" alt=\"bla\" /><\/a><\/p>\n<div class=\"nomjeu\">The Witcher III : Wild Hunt<\/div>\n<div class=\"reduc\">-44%<\/div>\n<div class=\"prix\">33.50€<\/div><\/div>\n<\/div>\n\n","footer":"\n\n\n\n\n"});

My css class are ok, any simple images or text can be seen.

If I only put the script code, it appears partially on the left side of the page.

I wonder if script codes are tolerated on this area. If not, how can I correct this ?

I saw the adsense plugin but I don’t have google adsense anymore (they banned me for some obscure reason ^^)

My plan is to have something like this :

Thanks !

PS : pardon my english i understand it pretty well but i write it and speak it like a French (maybe it’s because I’m french) :stuck_out_tongue_winking_eye:


You want make ads on header ?


Yes between the header bar (logo, search, etc) and the nav bars (latest, new, etc)


Try this code in top

 <div class="ads">
 <a href="" target="_blank"><img src="baner.gif"></a>

you can add css class and style it

like this

.ads {
float: right;
width: 100%;
text-align: center;
margin: 10px 0 ;
.ads img {
max-width: 100%;
background: white;
border: 1px solid gainsboro;
margin: 6px 0;
display: inline-block;


Thanks a lot for helping me, but I don’t think it’ll work. In the script that click in text give me :

<script type="text/javascript" src="" title="Classic (IAB)"></script>

It’s a code that generates banners, it’s not a fixed image


you can change this with your fixid image link

<img src="baner.gif">


I suck in english, i must not be clear, I’m sorry about that.

I have no problem to integrate some fixed image, I did this with a banner on the right part. But I have to add this script

<script type="text/javascript" src="" title="Classic (IAB)"></script>

The link in src is not an image, there’s no extansion, it’s a code generated and it adds a different add every time.

It’s a lot like adsense, but not adsense :stuck_out_tongue:


Can you give a live demo of


Yes of course, on my other forum (not discourse) :

2 ads from click in text

(Kane York) #10

You’re using a location-relative URL.

Try this…

<script type="text/javascript" src="" title="Classic (IAB)"></script>

However, the script is responding as // #1.101 for my domain. Check that it’s configured right on the ad provider.


It doesn’t seem to work for now, i’ll wait a few minutes :

In my ad provider, it says that this script will work on these domains :

<script type="text/javascript" src="" title="Classic (IAB)"></script>


A message appeared in the customize code :

*!* Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>

I don’t think I made a mistake in my code

<div class="ajoutsheader"><div class="cit468"><script type="text/javascript" src="" title="Classic (IAB)"></script></div><div class="instantg"><p><a href="" title="Acheter Football Manager 2015 pas cher chez Instant-Gaming"><img src="" width="452" height="90" alt="Instant-Gaming" /></a></p><div class="nomjeu">The Witcher III : Wild Hunt</div><div class="reduc">-44%</div><div class="prix">33.50€</div></div></div>

(I tried with http or https)


This is a your ads code in forum
this it in <header> and header

<div style="float:left; width:468px; height:60px; text-align:center;">
<script type="text/javascript" src="" title="Classic (IAB)"></script>
<div style="float:right; width:502px; height:60px; text-align:center;">
<script type="text/javascript" src="" title="Classic (IAB)"></script>


This code is on my phpBB forum, they work fine. But I can’t use the same click in text script on discourse, it’s linked to a specific domain.

My scripts for iunctis (on discourse) doesn’t appear


@riking you can see ads in this forum

(Kane York) #15

Mmmm, that’s a no. I looked at the network inspector and I’m not being served any ads.


	var iframe = document.getElementById('frameCIT6f052d57a6b852a2aa6565b17b621004i');
	if (!iframe) return;
	var dociframe;
		dociframe = iframe.contentDocument;
	else if(iframe.contentWindow)
		dociframe = iframe.contentWindow.document;
	else if(iframe.document)
		dociframe = iframe.document;
	 try {
		if (!dociframe.antiReload)
			dociframe.write('<html><head><script>document.antiReload = true;</script></head><body style="margin: 0; padding: 0">' + '' + '</body></html>');
			iframe.onload = function(){};




I have another script

<script type="text/javascript" src="" title="Classic (IAB)"></script>

This script appears if i put it in the Header part.
But when i put it in the Top part, nothing happens. I don’t think scripts works ont that area.

To be clearer, I made an image. As you can see, the script works fine. But I would want the ad in the red zone