![]() |
|
Thread Tools |
#1
|
||||
|
||||
Why i canīt get it work?
Hi ppl
Why i can't get this code work on postbit_legancy?
No members have liked this post.
|
#2
|
|||
|
|||
Your code works fine with me.
Where exactly doesn't this code work? Try insert DIV tags, like so: <div>Some text</div> No members have liked this post.
|
#3
|
||||
|
||||
Maybe try $post['posts']
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
#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. No members have liked this post.
|
#5
|
||||
|
||||
Yeah, could be. I can never remember when to use quotes and when not to. One of these days I'll learn!
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
#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 No members have liked this post.
|
#7
|
||||
|
||||
Well, your condition is written incorrectly:
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
#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".
__________________
Former vBulletin.org Staff Member View My Modifications 29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x) Please do not PM me to ask for support - please use the relevant thread or forum. No members have liked this post.
|
#9
|
|||
|
|||
Yes this code work if user ha less than 1,000 posts if have higher don't work propely.
No members have liked this post.
|
#10
|
||||
|
||||
Originally Posted by maar3amt
Yes, that is correct. The variable is actually a formatted variable and so if you wish to do comparisons to it with numbers greater than 1,000, you need to deal with it using php code and thus in a plugin.![]()
edit to add: You can always do the reverse comparison and it should work:
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
Last edited by Lynne; 12 Oct 2008 at 18:42. |
#11
|
||||
|
||||
Originally Posted by Lynne
Nope that would not work.![]()
Consider a user with 1100 posts. This would be formatted as "1.100". "1.100 <= 200" will be true!! ("1.100" will be casted to a numeric and will result in "1") Only (good) solution is to create a plugin that store the postcount in a seperated variable before it is formatted.
__________________
Marco van Herwaarden Ex vBulletin.org Coordinator No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 16:36.