XF 2.1 Setting Up Advertisements with Xenforo

Alfuzzy

Active member
With my new install of XF 2.1...I wanted to be 100% sure I know how to setup advertisements.

In my experience many times ad agencies/ad suppliers for website publishers have 2 sets of advertising code that you need to setup on your website for things to work properly.

One piece of code is supposed to be placed in the actual advertising block where the ad will be seen on the web page...with XF 2.1 I'm pretty sure I know that this code goes in the AdminCP >Setup > Advertising...then the appropriate ad location is chosen & the ad code inserted.

The 2nd piece of advertising code you're usually told by the ad agency to place in the "Head" area of the website.

When this situation happens...can someone please clarify where this "Head Code" needs to go & how to place it there (since I don't think this is specified in the AdminCP)? Does a specific XF template need to be edited directly?

Thanks
 

Alfuzzy

Active member
Am I correct that if I currently have 3 active styles (1 parent style & 2 child styles)...that I need to modify the PAGE_CONTAINER template for each style separately whenever doing things like this?

And in the case of this advertising code...where's the best place to insert this advertising code in the PAGE_CONTAINER template. At the very bottom...at the very top...or inside somewhere?

Thanks
 

Brogan

XenForo moderator
Staff member
If the child styles inherit from the parent and you haven't edited the PAGE_CONTAINER template of those child styles, then you only need to add the code to the parent.

I believe the code usually has to be between the head tags but I don't use advertising so you may want to check that.
 

Alfuzzy

Active member
If the child styles inherit from the parent and you haven't edited the PAGE_CONTAINER template of those child styles, then you only need to add the code to the parent.
Awesome...thanks.
I believe the code usually has to be between the head tags but I don't use advertising so you may want to check that.
I was going to suggest in my previous message that the advertising code would go within the <head></head> area of the PAGE_CONTAINER template (since this is where it went with vBulletin 4.2.5). But I didn't want to assume it was 100% the same with XF until checking with the experts!

Thanks again.:)
 
Top