Resource icon

Ad position in HTML head 1.0.0

No permission to download
For insert code into head section in any ad position, i use xf:head

For example:
Code:
<xf:head option="abc">
code loading script (inserted into head section)
</xf:head>
code ad block script (inserted into ad position)
 
Last edited:
For insert code into head section in any ad position, i use xf:head

For example:
Code:
<xf:head option="abc">
code loading script (inserted into head section)
</xf:head>
code ad block script (inserted into ad position)
Yes that would work also, but requires knowledge of the XF templating language, and the head-code will be inserted under a different ad position, making it harder to find later in e.g. 1 year when you need to edit/remove/debug it :)

Also for some people just using "AdSense Auto Ads" there is no need for anything other than the head-part, so creating a different ad in another position for that is confusing and doesn't make much sense.
 
As mentioned by another in your first resource review, this resource is useful outside of just ad scripts.

This resource can easily be used for referencing additional preloaded images, preloaded css, stylesheets, icons, touch icons, shortcut icon, meta, scripts, etc. - basically anything you could think of that you may want to universally link/add to the <head> section of all your site pages. Especially useful for those who have heavily modified sites.

I think with a few slight changes, a broader more encompassing resource name, and an enhanced description that includes these additional use possibilities, it would help this add-on make it into the hands of more that could use it.

My original solution, since I moved to XenForo a couple years ago, was to create a new template "head_inject" containing all the additional code I needed to reference within the head. I then added it to through helper_js_global with <xf:include template="head_inject" />.

I find your resource solution a little cleaner and the less templates I am manually editing the better.

Thanks for creating it.
 
Top Bottom