![]() |
Why i can?t get it work?
Hi ppl
Why i can't get this code work on postbit_legancy? Code:
<if condition="$post[posts] >= 200"> |
Your code works fine with me.
Where exactly doesn't this code work? Try insert DIV tags, like so: <div>Some text</div> |
Maybe try $post['posts']
|
Quote:
I think it's about the location of the code. |
Quote:
|
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 |
Well, your condition is written incorrectly:
HTML Code:
<if condition="$post[posts] >= 200"> |
$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".
|
Yes this code work if user ha less than 1,000 posts if have higher don't work propely.
|
Quote:
edit to add: You can always do the reverse comparison and it should work: HTML Code:
<if condition="$post[posts] <= 200"> |
All times are GMT. The time now is 02:29 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|