The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
If condition
Hello all,
I'm trying to use some text in the first post so in vb3 was <if condition="(($post[postcount] == 1))"> And now what's the new code with vb4 ? Thanks. |
#2
|
||||
|
||||
Have you tried that condition? (except replace <if with <vb:if and </if> with </vb:if> )
|
#3
|
|||
|
|||
try this m8
PHP Code:
|
#4
|
|||
|
|||
Lynne, Tried it now but it doesn't work.
wolfe, the code appear in all posts |
#5
|
||||
|
||||
You need to use == , not =
When saying something doesn't work, you need to post exactly what you are trying AND tell us exactly where in what template you are putting it. |
#6
|
|||
|
|||
Quote:
That's the code : HTML Code:
<vb:if condition="$post[postcount] == 1"> {vb:raw thread.title} </vb:if> |
#7
|
||||
|
||||
I don't see anything in there about a template_hook. And, how is this related to using the postbit_display_complete hook location? I thought you were just editing one of the postbit templates. That code will not work in a plugin - it isn't proper php.
|
#8
|
||||
|
||||
That's why you need to be specific as to what your doing. Template conditionals never worked in plugins on any version of vB.
|
#9
|
|||
|
|||
Yes Guys, I know all of that. What I had posted above that's my template and the plugin is that.
PHP Code:
|
#10
|
||||
|
||||
So it's a custom template and you are using both the $post and $thread variables in it.... Did you register them for use in that template? If not, then you won't be able to use them in there. Read this article on registering variables - [vB4] Rendering templates and registering variables - a short guide
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|