• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Regarding ad_* templates

#1
I am unable to figure out what some of the ad_* templates are doing.

I tried to put in my ad code in these templates, but nothing shows up on the forums.

Can someone please post some screenshots of where each of these ad_* templates would show up on the frontend?

They only seem to show up on ForumHome and not on ForumDisplay or ShowThread pages.

Thanks
 
#4
make sure you are using the style of which the template you're adding stuff to.
I am using only 1 style "Default" that came with the XF installation. And yes, the ads are showing on the ForumHome page ... but not showing anywhere else ..

ad_above_top_breadcrumb -- this thing for eg. I would expect it to show up every page where breadcrumb is .. but it shows up only on forumhome
 

Mike

XenForo developer
Staff member
#5
What template are you putting your modification in? Can we see this on a live board?
 
#10
I guess I did not make myself clear.

The new 1.0.0 that was released today has extra templates that start with ad_

I believe these are provided so that we can put ads in the site. When I am putting my ad code (eg. google adsense), it is not showing up in the front end on "Froumdisplay" and "showthread" pages, whereas it is showing up on "forumhome" page. Is there any thing I need to add like template hooks into forumdisplay and showthread templates? If yes, what and to which template?

Mike, mine is an adult website, and I do not feel it appropriate to post it here.
 

Mike

XenForo developer
Staff member
#11
Well, the question about the template(s) that you put the ads into stands.

If you're comfortable with it, PM me the URL so I can confirm what's being outputted.
 

cmeinck

Well-known member
#16
I'm not sure I understand how to properly use these new templates. Let's I enter ad_above_content, the template has <xen:hook name="ad_above_content" />


I assume that I remove that and paste my code? I've tried, but to no avail.

Update: Okay, this is working for me now. Just need to figure out all the various positions.
 

kilcher

Active member
#17
I'm not sure I understand how to properly use these new templates. Let's I enter ad_above_content, the template has <xen:hook name="ad_above_content" />


I assume that I remove that and paste my code? I've tried, but to no avail.

Update: Okay, this is working for me now. Just need to figure out all the various positions.
Can you paste what you did? I was having trouble with that too.
 
#18
For me, I did not remove whatever was already there

for eg.
Code:
<xen:hook name="ad_above_content" />
was already present in the template

I just placed my ad code after that on the next line

Eg:

Code:
<xen:hook name="ad_above_content" />
<xen:if is="{$post.isFirst}">
<div style="float:left; padding-right:10px;">
<!-- Begin: Black Label Ads, Generated: 2011-03-09 7:23:19  -->
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script>
<script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1885410&zs=3136305f363030&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script>
<div><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1885410&afsid=55544" style="font-weight:bold;font-family:Arial;font-size:13px;">Your Ad Here</a></div>
<!-- End: Black Label Ads -->
</div>
</xen:if>
 

FredC

Well-known member
#20
Im already making a little use of the new ad location templates. But its forcing me to learn/figure out the the different usergroup conditions.. Im still having problems positioning some of the locations or better yet blending them.