Add a script in the Customize/Top zone


#1

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="http://tags.clickintext.net/00000" title="Classic (IAB)"></script>

does not appear, however it appears in the source code

PreloadStore.store("customHTML",{"top":"\n\n\n<div class=\"ajoutsheader\">\n<div class=\"cit468\"><script type=\"text/javascript\" src=\"http://tags.clickintext.net/000000\" 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:


#2

You want make ads on header ?


#3

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


#4

Try this code in top

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

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;
}


#5

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="http://tags.clickintext.net/00000" title="Classic (IAB)"></script>

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


#6

you can change this with your fixid image link

<img src="baner.gif">

#7

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="tags.clickintext.net/Q7FjmPLRiqic" 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:


#8

Can you give a live demo of clickintext.net


#9

Yes of course, on my other forum (not discourse) : http://www.manager-online.fr/

2 ads from click in text


(Kane York) #10

You’re using a location-relative URL.

Try this…

<script type="text/javascript" src="https://tags.clickintext.net/Q7FjmPLRiqic" 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.


#11

It doesn’t seem to work for now, i’ll wait a few minutes : http://iunctis.fr/

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

<script type="text/javascript" src="http://tags.clickintext.net/Q7FjmPLRiIqic" title="Classic (IAB)"></script>


*.iunctis.fr

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="http://tags.clickintext.net/Q7FjmPLRiqic" title="Classic (IAB)"></script></div><div class="instantg"><p><a href="https://www.instant-gaming.com/fr/268-acheter-cle-the-witcher-3-traque-sauvage/?igr=209245" title="Acheter Football Manager 2015 pas cher chez Instant-Gaming"><img src="http://iunctis.fr/uploads/ig/ig-witcher.png" 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)


#12

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="http://tags.clickintext.net/wiNcSjELcblO8" title="Classic (IAB)"></script>
</div>
<div style="float:right; width:502px; height:60px; text-align:center;">
<script type="text/javascript" src="http://tags.clickintext.net/BUwZ9wW1DRQ4l" title="Classic (IAB)"></script>
</div>

#13

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


#14

@riking you can see ads in this forum http://www.manager-online.fr/


(Kane York) #15

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

(function(){

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

	}

})();
	

#16

I have another script

<script type="text/javascript" src="http://tags.clickintext.net/Q7rx7Oz0IPayj" 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