PDA

View Full Version : Trouble adding ads


leegun
04-01-2014, 09:47 PM
Hi guys
My web designer is MIA so have been trying to figure this out.
I have an ads container but when I replace the words with code or even other words it kills the whole page
I have highlighted the bit of code below. Hope you guys can help
function shorten(line, length){
var parts = Math.round(length / 11);
size = 2*parts;
return line.substring(0, size);
}

function load_ads(){
//$(".results").append("<div class='result ads2' style='height: 200px;'></div>");
$(".results").append("<div class='result ads2' style='height: 200px;'><p>ADS CONTAINER</p></div>");
}
</script>
</html>

edbr
04-02-2014, 05:06 AM
The results are defined out side of this. What is the URL?

edbr
04-02-2014, 07:56 AM
this might help https://api.jquery.com/append/

leegun
04-02-2014, 08:30 AM
The results are defined out side of this. What is the URL?

the URL is http://www.zidify.com and the issue is on the 'search' page, after you have made a search request. You will clearly see the 'ads container' box at the top of the results..

what part should I be looking at?

edbr
04-02-2014, 09:52 AM
what are you trying to do? you are breaking the code that calls the ads results

leegun
04-02-2014, 09:36 PM
what are you trying to do? you are breaking the code that calls the ads results


I am trying to find within the whole code, where to put the ads that will appear in that container.

leegun
04-05-2014, 03:07 AM
what are you trying to do? you are breaking the code that calls the ads results

I really am stumped why I cannot find/change the code that would let be change or even delete this ads container. Any ideas from the source code?

edbr
04-05-2014, 05:03 AM
on your search page you are calling

<div class="ads">
<script type="text/javascript">
( function() {
if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
var unit = {"publisher":"Zidify","width":300,"height":"auto","sid":"Chitika Default","color_bg":"f2f2f2","nump":"9","fluidH":true};
var placement_id = window.CHITIKA.units.length;
window.CHITIKA.units.push(unit);
document.write('<div id="chitikaAdBlock-' + placement_id + '"></div>');
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = '//cdn.chitika.net/getads.js';
try { document.getElementsByTagName('head')[0].appendChild(s); } catch(e) { document.write(s.outerHTML); }
}());
</script>
</div>

but this might be part of the deal with chikita, i dont know but that seems to be the engine behind this search

edbr
04-05-2014, 05:07 AM
if you are trying to use them but substitute your own ads i would be surprised that will happen . you can contact them or sign up for a new account and see what you can do.

leegun
04-07-2014, 11:04 PM
on your search page you are calling

<div class="ads">
<script type="text/javascript">
( function() {
if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
var unit = {"publisher":"Zidify","width":300,"height":"auto","sid":"Chitika Default","color_bg":"f2f2f2","nump":"9","fluidH":true};
var placement_id = window.CHITIKA.units.length;
window.CHITIKA.units.push(unit);
document.write('<div id="chitikaAdBlock-' + placement_id + '"></div>');
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = '//cdn.chitika.net/getads.js';
try { document.getElementsByTagName('head')[0].appendChild(s); } catch(e) { document.write(s.outerHTML); }
}());
</script>
</div>but this might be part of the deal with chikita, i dont know but that seems to be the engine behind this search


I have 2 ads containers within the php page. I can find the 1st one (the one with the ads code already within it)
the 2nd ads container, I cannot even find where this is created. I would even delete it if I could find it.
(fyi - I didnt write/create the site.)

I really appreciate your help so far

Ricky55
04-08-2014, 08:09 AM
Like Ed said I'd be careful what you delete if this is the company providing the search. You don't want to break the search.

Not a long term fix but couldn't you just hide the ads with CSS?

div.ads {
display: none !important;
}

Just until your web guy gets back from where ever he was lost in action.

HTH