The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi guys,
I have a problem that I'm sure some of you will have come across. Our forum currently has an advert after the first post in every thread. We use software to rotate those adverts if required. However, we want to be able to show adverts on a per sub-forum basis. Example forum list Programming Languages - ASP (all threads show advert 1 after the first post) - PHP (all threads show advert 2 after the first post) - PERL (all threads show advert 3 after the first post) I hope that it's clear what we want to achieve, and any help would be gratefully received! Thanks in advance ![]() |
#2
|
||||
|
||||
![]()
Use IF statements to choose which ad to display based on the current forum.
<if condition="$thread[forumid] == 1"> --HTML for Banner 1 Code-- </if> <if condition="$thread[forumid] == 2"> --HTML for Banner 2 Code-- </if> <if condition="$thread[forumid] == 3"> --HTML for Banner 3 Code-- </if> Change the number of the forumid to match the forumid's of the forums you want. |
#3
|
|||
|
|||
![]()
Thanks BirdOPrey5!
I'm guessing that I need to change showthread.php...but I can't see where I would need to change the code...? |
#4
|
||||
|
||||
![]()
Actually for the first post I think you need to edit postbit (or postbit_legacy). Search for: $ad_location[ad_showthread_firstpost_start]
Better yet just put the if statement in the template: ad_showthread_firstpost_start Put it around the entire block of code... You can access all the other built in ad locations from the Ad Location Templates as well. |
#5
|
|||
|
|||
![]()
I'd rather
Style Manager > Your Style > Ad Location Templates Much easier IMO |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|