The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello All!
I would appreciate anyone giving me a bit of advice on this..... I cannot get the value of $Post[Posts] to act like a number so I'm beginning to wonder if maybe this variable needs to be converted to a number for certain operations to work on it? Thanks for your time :up: |
#2
|
||||
|
||||
![]()
It returns an integer. Where are you trying to use it?
Keep too in mind, that $Post and $post are two totally different variables. If you're using $Post[Posts], you should be using $post[posts]. |
#3
|
|||
|
|||
![]()
Hello Kirk and thanks for the reply :up:
Gee, you're the first to tell me that Post and post are different variables. Now I'll go back and see if maybe that's been the problem. I've been trying to use a post count conditional in the post bit legacy template to place a graphic on the left (in the Users information box) based on their post count but so far I haven't been able to get it to work. Here's the suspect ![]() <if condition="$post[posts] > 1000"><img src="images/misc/Contributor1.gif"></if> I've tried changin this every way I could imagine but it still doesn't work. Should I be using the CAPITAL P? Thanks a million! MP |
#4
|
||||
|
||||
![]()
Nope, that's how it should be. Make sure you've got the image pointing to the correct path. You should also be using a self-closing tag: <img src="/image/gif.gif" />; but that wouldn't affect it displaying either way.
|
#5
|
|||
|
|||
![]()
Wow.
This is my dilemma. Everyone's told me "Yep. it's correct"....but it doesn't work :erm: If I change the condition to something other than > 1000, such as == 1000, then it works... so I know the image location is correct. Seems the conditional does not like the greater than symbol ![]() |
#6
|
||||
|
||||
![]()
Are you certain that the user's have more than 1,000 posts?
|
#7
|
|||
|
|||
![]()
We'll, their post count says over 3000 and when I look in the SQL tables I see members with over 1000 posts.
Isn't this odd ? |
#8
|
||||
|
||||
![]()
Hmm... quite.
Okay, let's try going about this another way. Create a new plugin using hook location "postbit_display_start" with the following: Code:
if ($this->post['posts'] > 1000){ $image = '<img src="images/misc/Contributor1.gif" />'; } |
#9
|
||||
|
||||
![]()
Once it hits 1000 it is "1,000" so the comma is messing up your comparison.
|
#10
|
|||
|
|||
![]()
Thanks again for your help Kirk. It's VERY nice of you to give of your time like this.
It is definitely appreciated.:up: I added the plug in in hook but I wasn't sure how to add the $Image in the Post Bit Template. (Did I mention I'm using the Legacy Post Bit Template?) Do I just put $Image in the template where I want the image to appear? Sir Adrian, I was Wondering about that. But if that were the case, anything UNDER 1000 should work...but it doesn't seem to either. What's the difference between posts and postcount? MP |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|