The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Banner after First Post
Basically all I want to do is have the banner that appears after the first post in each thread (Ad Manager Templates > ad_showthread_firstpost) to go off of the visitor rules in Ad Manager.
Since there is no specific template specified for "ad_showthread_firstpost" in the Ad Manager, I have to use "Header 2" in its place. Which means I should be able to use the {vb:raw ad_location.global_header2} variable somewhere in SHOWTHREAD...so that it only appears after the first post in each thread. I tried a few places, but couldn't get it to appear after the first post in each thread. Once again , i'm trying to place this variable in SHOWTHREAD so that it displays a banner after the 1st post in each thread. (and use Header 2 template in its place so that it goes off of the visitor rules from Ad Manager.) Any idea where exactly to place it ? |
#2
|
||||
|
||||
I don't think what you are trying to do is going to be simple. Have you found the code that defines whether the global_header2 template gets rendered? Where is it (in which php file)? Now you will have to find the code where the ad_showthread_firstpost template is rendered (showthread.php) and replace that code with the other code. You could probably write a plugin using the showthread_postbit_create template to render it. But again, you need to find the other code that renders the ad template, see if you need to include other files to help run the code, and then place it in that plugin you create.
|
#3
|
|||
|
|||
Lynn's the best. I've been driving her nuts today.
Quote:
{vb:raw ad_location.global_header2} out and it worked when I added the banner code manually to the Header 2 template in Ad Manager....so that part works. I could stick {vb:raw ad_location.global_header2} in any template...and it WILL render / display the banner correctly. Quote:
Quote:
|
#4
|
||||
|
||||
Have you tried adding it with a condition into the postbit_wrapper template? Or just at the end of the postbit template? <if post=1, then render this also>
|
#5
|
|||
|
|||
Quote:
I tried both - <if post=1, then render this also> {vb:raw ad_location.global_header2} and <if post=1 {vb:raw ad_location.global_header2}> It displayed it after every post though...not just the first one. Maybe using wrong code ? |
#6
|
||||
|
||||
Um, no. I wasn't actually writing the condition, just verbalizing it. I think it's $post['count']? Not sure, double check it in the template.
HTML Code:
<vb:if condition="$post['count'] == 1"> do something </vb:if> |
#7
|
|||
|
|||
<vb:if condition="$post['postcount'] == 2"> do something </vb:if> Worked. Thanks much, Lynn. You rock. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|