How to add infolinks ads into vBulletin in such a manner that it shows ads only in threads and blogs with an option to show ads only to guests.
Infolinks works best on content rich pages. So I prefer to have infolinks ads confined to the post content of threads and inside the blog posts of vBulletin Blog. Let us see how we can add infolinks into vBulletin with the following options.
- Show infolinks ads only on content pages.
- Show infolinks only in content area of threads and posts and not in navigational and other area of a page.
- Optionally show infolinks ads only to Guests.
Controlled Ad Placement tags
Controlled ad placement can be implemented by adding <!–INFOLINKS_OFF–> and <!–INFOLINKS_ON–> HTML comments to the content pages. There is no limit on how many times you can place the ON and OFF comments. So let us add the comments near the content.
Edit postbit template (If you are using the postbit_legacy template edit the postbit_legacy template).
And add Infolinks controlled html comments tag before and after the message
If you are using vBBlog product in your vBulletin 3 you may need to add controlled ad placement to the following 4 templates as well.
In each of those 4 templates search for
And add the ad control convertion comments before and after the message
Grab Infolinks ad code and place them in the SHOWTHREAD template just before the closing BODY tag. The infolinks ad code looks like
If you have vBulletin 3 Blog as an add-on, you will need to place the above code in the BLOG template like SHOWTHREAD template just before the closing body tag.
Only For Guests
If you want to show ads only to guests and not to members you can restrict the ad code with a conditional if statement.
Further Reading …