XF 1.5 problem banner type

i need support for this type banner
<!-- BEGIN ADVERTSERVE CODE -->
<script type="text/javascript">
var _avp = _avp || [];
(function() {
var s = document.createElement('script');
s.type = 'text/javascript'; s.async = true; s.src = window.location.protocol + '//tc.trafficscenter.net/js/libcode3.js';
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
})();
</script>
<!-- END ADVERTSERVE CODE -->
i try put between the <HEAD> and </HEAD> tags. but is not working .

i need to put this code ?

<script type="text/javascript">
var avp = avp || [];
(function() {
var s = document.createElement('script');
s.type = 'text/javascript'; s.async = true; s.src = window.location.protocol + '//tc.trafficscenter.net/js/libcode3.js';
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
})();
</script>

if yes where?
 
I need to know with exactitude where do I put this code to make the banner function. I have a client waiting for me if I can have a more clear answer thanks
 

Chris D

XenForo developer
Staff member
Did you read the FAQ that was linked to?

5. Where can additional JavaScript be placed?
Additional JavaScript can be placed in the PAGE_CONTAINER, page_container_js_head or page_container_js_body templates. If PAGE_CONTAINER is used, it can be placed anywhere in the template. If page_container_js_head is used, it will be included in the head section of PAGE_CONTAINER. If page_container_js_body is used, it will be included in the body section of PAGE_CONTAINER, after the footer. It depends on the JavaScript to a large extent; some require to be placed in the head, some in the body.
With this in mind the page_container_js_head template would be most suitable.

If it still doesn't work after that, you will have to debug that with the provider of the code.
 
<script type="text/javascript">
var avp = avp || [];
(function() {
var s = document.createElement('script');
s.type = 'text/javascript'; s.async = true; s.src = window.location.protocol + '//tc.trafficscenter.net/js/libcode3.js';
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
})();
</script>


this code i need put on page_container_js_head right?

and the banner where?
<div id="avp_zid_85">
<script type="text/javascript">
_avp.push({ tagid: 'avp_zid_85', alias: '/', type: 'banner', zid: 85, pid: 50 });
</script>
</div>
this is the code of banner
 
my client send me this :

Header Code
Copy and paste this code into your page between the <HEAD> and </HEAD> tags. Do not duplicate.

<!-- BEGIN ADVERTSERVE CODE -->
<script type="text/javascript">
var _avp = _avp || [];
(function() {
var s = document.createElement('script');
s.type = 'text/javascript'; s.async = true; s.src = window.location.protocol + '//tc.trafficscenter.net/js/libcode3.js';
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
})();
</script>
<!-- END ADVERTSERVE CODE -->



======


Display Code
Copy and paste this code into your page in the position where you would like the ad to be displayed.
Note that this code will not function without the above header code being placed in the page as well.
May be duplicated in multiple positions, however, each additional copy of the code must be changed to
have a unique id and tagid pair (i.e. change avp_zid_123 to avp_zid_123b, avp_zid_123c, and so on).


<!-- BEGIN ADVERTSERVE CODE -->
<div id="avp_zid_85">
<script type="text/javascript">
_avp.push({ tagid: 'avp_zid_85', alias: '/', type: 'banner', zid: 85, pid: 50 });
</script>
</div>
<!-- END ADVERTSERVE CODE -->
 

Chris D

XenForo developer
Staff member
From the instructions it seems like you just place that banner code in whatever location you like.

You can search templates in the Admin CP where you will find templates that start with "ad_" these are all reserved for advertisements so you pick the one you want and place your code in there.

Though, really, you can put the code in whatever template you like. It just depends where you want it showing.
 
the problem is that to make this banner I have to enter this code

<Script type = "text / javascript">
var = _avp _avp || [];
(Function () {
var s = document.createElement ('script');
s.type = 'text / javascript'; s.async = true; s.src = window.location.protocol + '//tc.trafficscenter.net/js/libcode3.js';
var x = document.getElementsByTagName ('script') [0];
x.parentNode.insertBefore (s, x);
}) ();
</ Script>

but where because I already tried on page_container_js_head without results
 

Chris D

XenForo developer
Staff member
page_container_js_head is placed within the <head> tags as the instructions you have been given stipulate. If that doesn't work, you will need to take that up with whoever provides the code in case it is faulty, or there's some other issue.

I guess also make sure you have any ad blocking software switched off first :)
 
Top