View Full Version : Number Range Shortcuts
sweetguy2004
12-03-2008, 08:40 PM
<if condition="$post[post_thanks_thanked_posts] == 1, 2, 3, 4, 5, 6, 7, 8, 9, 10">
Is there Anyway Shortcut
<if condition="$post[post_thanks_thanked_posts] == 1to10">....</ if>
<if condition="$post[post_thanks_thanked_posts] == 1000to2000">
Please help me..
punchbowl
12-03-2008, 08:43 PM
<if condition="$post[post_thanks_thanked_posts] <2001 and $post[post_thanks_thanked_posts] >1001">
something like that???
sweetguy2004
12-03-2008, 08:57 PM
nope it is not working i just want to add a image in postbit if a user get thanked between 1 to 10 he should get a specified award image
it work like this <if condition="$post[post_thanks_thanked_posts] == 1, 2, 3, 4, 5, 6, 7, 8, 9, 10">
but its not possible to type 100000 of numbers so i was finding a shortcut
punchbowl
12-03-2008, 09:31 PM
I didn't test that code above but I'm pretty sure you can use less than and more than in conditionals e.g. <if condition="$bbuserinfo['birthday_search'] < '1980-01-01'">Too Young</if>
> means is greater than. <if condition="1 > 2"> means "if 1 is greater than 2".
< means is less than. <if condition="1 < 2"> means "if 1 is less than 2".
Lynne
12-03-2008, 09:34 PM
You need to find out what sort of format the variable you are testing is in. My guess is the post count one has been formatted and thus is no longer a 'number' to go compare to other numbers. That means you can't do this in the template but instead need to write a plugin to manipulate the variable.
sweetguy2004
12-04-2008, 10:12 AM
is there any similar plugin available for this issue?
thanks for reply
Lynne
12-04-2008, 02:01 PM
Not that I know of. I know we have discussed this sort of issue before (regarding "postcount" which is formatted) but I'm not sure if someone actually posted the code for the plugin or if we just talked about what to put in the plugin.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.