Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 11 Oct 2008, 00:04
maar3amt maar3amt is offline
 
Join Date: Sep 2006
Why i canīt get it work?

Hi ppl
Why i can't get this code work on postbit_legancy?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 11 Oct 2008, 00:48
orryun orryun is offline
 
Join Date: Aug 2007
Real name: Orr
Your code works fine with me.
Where exactly doesn't this code work?
Try insert DIV tags, like so: <div>Some text</div>
Reply With Quote
  #3  
Old 11 Oct 2008, 00:56
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.)
Reply With Quote
  #4  
Old 11 Oct 2008, 01:20
orryun orryun is offline
 
Join Date: Aug 2007
Real name: Orr
Originally Posted by Lynne View Post
Maybe try $post['posts']
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.
Reply With Quote
  #5  
Old 11 Oct 2008, 01:34
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by orryun View Post
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.
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.)
Reply With Quote
  #6  
Old 11 Oct 2008, 03:00
maar3amt maar3amt is offline
 
Join Date: Sep 2006
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
Reply With Quote
  #7  
Old 11 Oct 2008, 05:46
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Well, your condition is written incorrectly:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
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.)
Reply With Quote
  #8  
Old 11 Oct 2008, 06:19
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
$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.
Reply With Quote
  #9  
Old 12 Oct 2008, 17:27
maar3amt maar3amt is offline
 
Join Date: Sep 2006
Yes this code work if user ha less than 1,000 posts if have higher don't work propely.
Reply With Quote
  #10  
Old 12 Oct 2008, 18:32
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by maar3amt View Post
Yes this code work if user ha less than 1,000 posts if have higher don't work propely.
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
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.)

Last edited by Lynne; 12 Oct 2008 at 18:42.
Reply With Quote
  #11  
Old 14 Oct 2008, 11:13
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Originally Posted by Lynne View Post
edit to add: You can always do the reverse comparison and it should work:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 15:43.

Layout Options | Width: Wide Color: