Firefox PHP

Trouble getting ads to show

Posted by ToddUGA 
Trouble getting ads to show
June 12, 2018 09:08PM
For the life of me I can't get my Chitika ads to show on my forum. They show just fine on my standard HTML pages when I insert the code there. But on my phorum page nothing. The code has been pasted into my header.tpl file right after the <head> tag. Anybody have any ideas? Here's a link...

My page link where the ads aren't showing...

Thanks.
Re: Trouble getting ads to show
June 13, 2018 08:24PM
Here's the Chitika code I'm inserting:

<script type="text/javascript">
( function() {
if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
var unit = {"calltype":"async[2]","publisher":"todduga","width":728,"height":90,"sid":"Chitika Default"};
var placement_id = window.CHITIKA.units.length;
window.CHITIKA.units.push(unit);
document.write('<div id="chitikaAdBlock-' + placement_id + '"></div>');
}());
</script>
<script type="text/javascript" src="//cdn.chitika.net/getads.js" async></script>

But when I look at the source of my phorum index it is missing the info after var unit:

<script type="text/javascript">
( function() {
if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
var unit = ;
var placement_id = window.CHITIKA.units.length;
window.CHITIKA.units.push(unit);
document.write('<div id="chitikaAdBlock-' + placement_id + '"></div>');
}());
</script>
<script type="text/javascript" src="//cdn.chitika.net/getads.js" async></script>

But if I add it to a regular page on my site it works perfectly fine.
Re: Trouble getting ads to show
June 13, 2018 11:03PM
Figured it out. Had to add a space before and after every { and } in the Chitika code. Working like a charm.



Edited 1 time(s). Last edit at 06/13/2018 11:04PM by ToddUGA.
Sorry, only registered users may post in this forum.

Click here to login