The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
threadid conditional - Not working the same?
Scenario: I want to display ads on all showthread pages (preferably in postbit), with specific ads for specific threads, and general ads for the rest.
In vB3, this was a matter of using this code wherever the ad was, and it would replace the generic ad with the specified one. PHP Code:
PHP Code:
|
#2
|
||||
|
||||
It should be <vb:else /> not <vb:else/> Other than that, I don't see anything wrong.
|
#3
|
||||
|
||||
Ahh.
Thanks Lynne. Should it work in ad_global_below_navbar? If not, what variable am I meant to be checking for if I want to use that template? |
#4
|
||||
|
||||
I really don't know as I never use the ad templates.
|
#5
|
||||
|
||||
OK.. replace that template name with 'navbar' then.
|
#6
|
||||
|
||||
If you look at the functions.php page where the navbar is rendered, the thread variable is not registered. So, you would have to preregister it if you want to use it there.
|
#7
|
||||
|
||||
Any chance you can help with that?
I can preregister my own custom variables, but preregistering $threadid for use on showthread.php seems to be difficult. |
#8
|
||||
|
||||
I would guess something like this:
PHP Code:
|
#9
|
|||
|
|||
Hello, I'm running vb 3.7 and I've used this code to display specific ads for specific thread:
Code:
<if condition="$thread['threadid'] == '12345'">Specific Ad for Thread #12345 <else/> Generic Ad </if> I need to get work thi conditional into a custom template called by SHOWTHREAD template, so I've inserted into SHOWTHREAD template this: PHP Code:
and this plugin: Product:Vbulletin Name: showthread_specads Code: Quote:
I suppose there 's something to change here : Code:
<if condition="$thread['threadid'] == '12345'">Specific Ad for Thread #12345 <else/> Generic Ad </if> Does anyone could help me ,please? |
#10
|
|||
|
|||
HTML Code:
<vb:if condition="$threadinfo['threadid'] == '12345'"> Specific Ad for Thread #12345 <vb:else /> Generic Ad </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|