PDA

View Full Version : How to show ads in showthread?


CeesT
20 Dec 2009, 11:29
I am preparing my template (using RC4) and like to have an ad at the bottom of showthread-pages, just above the "previous thread / next thread" links. There is no ad_position template for this in VB4.

Basically I need the same ad which I use in forumdisplay, there we have "ad_location.forum_below_threadlist". In this template I have the adsense code, which works fine in forumdisplay.php.

In template "FORUMDISPLAY" there is a line:
{vb:raw ad_location.forum_below_threadlist}
which shows the adsense content in forumdisplay-screen fine.

I have put the same above-mentioned code in "SHOWTHREAD" template, but the code does not show in the page-code (checked with firebug). However when I put the complete adsense code directly in SHOWTHREAD template (on the same place (where the "vb:raw" line was) it works fine. It seems that the "vb:raw" line does not work, so I can not use the "ad_location" templates here.

Why does the "vb:raw" not work in SHOWTHREAD, while it works fine in FORUMDISPLAY template ? Is this a RC-4 problem or something I forgot to do :confused:?

Attitude5ire
20 Dec 2009, 11:56
You should use Ad Location templates, within which u'll find 4 showthread ad locations.
I would suggest to just select one of those templates and then editing 'Showthread' template as to where that Ad location template appears.

CeesT
20 Dec 2009, 13:16
You should use Ad Location templates, within which u'll find 4 showthread ad locations.
I would suggest to just select one of those templates and then editing 'Showthread' template as to where that Ad location template appears.

Basically your suggestion works, added one of the 'showthread' ad locations to 'showthread' template. But then I have to remove the ad-location from the original place, which is not the 'showthread' template, but the postbit and postbit-legacy.

To prevent extra work after a VB template update, I would prefer to use a custom template for this, but I can not get this working too.
I have added a new template called "ad_next_prev" and it shows in the template list under 'Custom Templates'. But is also does not show when I change the template name from the showthread-template to the custom template name.

Does it need extra work in css files before a (custom) template is shown?

Attitude5ire
20 Dec 2009, 17:39
for custom templates to work i believe u need to add Hook and plugins to actually link them to template, i duno how vb4 plugin or hook works but u might want to ask arnd coding area on how to link custom templates. Just adding new template doesnt do the trick.