Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

Adding java script code

Hello,

I want to add a JS code to my sidebar so I can display ads from ad serving software.


if (!window.AdButler){(function(){var s = document.createElement("script"); s.async = true; s.type = "text/javascript";s.src = 'http://ab167300.adbutler-chargino.com/app.js';var n = document.getElementsByTagName("script")[0]; n.parentNode.insertBefore(s, n);}());}

var AdButler = AdButler || {}; AdButler.ads = AdButler.ads || []; var abkw = window.abkw || ''; var plc194965 = window.plc194965 || 0; document.write('<'+'div id="placement_194965_'+plc194965+'"></'+'div>'); AdButler.ads.push({handler: function(opt){ AdButler.register(167300, 194965, [300,250], 'placement_194965_'+opt.place, opt); }, opt: { place: plc194965++, keywords: abkw, domain: 'ab167300.adbutler-chargino.com' }});

I added this to default.master.tpl -

When I save the file, it give me a Vanilla Forum error saying: Something went wrong

Any ideas on how to make this work?

Thanks!

Comments

Sign In or Register to comment.