The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi ppl
Why i can't get this code work on postbit_legancy? Code:
<if condition="$post[posts] >= 200"> Some text </if> |
#2
|
|||
|
|||
![]()
Your code works fine with me.
Where exactly doesn't this code work? Try insert DIV tags, like so: <div>Some text</div> |
#3
|
||||
|
||||
![]()
Maybe try $post['posts']
|
#4
|
|||
|
|||
![]()
I have tried the $post[posts] thingy and it worked nicely on vB 3.8.0 b1
I think it's about the location of the code. |
#5
|
||||
|
||||
![]()
Yeah, could be. I can never remember when to use quotes and when not to. One of these days I'll learn!
|
#6
|
|||
|
|||
![]()
well on left side after user avatar i want show a message if user have more than 200 posts like.
<if condition="$post[posts] >= 200"> I have more than 200 posts </if> <else> I have less thab 200 posts |
#7
|
||||
|
||||
![]()
Well, your condition is written incorrectly:
HTML Code:
<if condition="$post[posts] >= 200"> I have more than 200 posts <else /> I have less thab 200 posts </if> |
#8
|
||||
|
||||
![]()
$post[posts] is equal to $post['posts'] and is also equal to $post["posts"] if no constant with the name "posts" exists. PHP will actually output a warning if you do not quote the array key. PHP actually first searches for a constant called "posts", then it looks up the array for an element with key "posts".
|
#9
|
|||
|
|||
![]()
Yes this code work if user ha less than 1,000 posts if have higher don't work propely.
|
#10
|
||||
|
||||
![]() Quote:
edit to add: You can always do the reverse comparison and it should work: HTML Code:
<if condition="$post[posts] <= 200"> I have less than 200 posts <else /> I have more than 200 posts </if> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|