vBulletin Modifications

if condition question

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 02-16-2006, 02:03 PM   #1
vB Newbie
Join Date: Jun 2005
netzoner is on a distinguished road

Unhappy if condition question

hi
is their a way to use if condition with post count
if condition post count is more thin 1500 and less thin 2500 display this picture and if condition post count is more thin 2500 and less thin 3500 display other picture

i want to use it in my postbit for some awards for the users

i hope some one if its passable to use the condition with post count make small example please

thanks




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 02-16-2006, 02:58 PM   #2
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

Do you want to use this as a template or PHP mod?

If it's a template mod you'll have to use the <if> tag which comes with vBulletin like this:

You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-17-2006, 07:45 AM   #3
vB Newbie
Join Date: Jun 2005
netzoner is on a distinguished road

Default

i want to use it in template

thanks for the code
but is thear a way to make it like this


You must first be a registered member to view any code.
i dont know the way to make it figure the count condition




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-17-2006, 07:54 AM   #4
vB Newbie
Join Date: Jun 2005
netzoner is on a distinguished road

Default

i was searching the web and i got this



<if condition="!$post[userid]">


0 to 25


You must first be a registered member to view any code.

25 to 100


You must first be a registered member to view any code.

100 & up


You must first be a registered member to view any code.
is it ok to use it like this

You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-17-2006, 10:42 AM   #5
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

Pretty sure that'll work, yeah.

You can just try it, nothing can go wrong.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-17-2006, 06:46 PM   #6
vBulletin Guru
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

That won't work as expected. The reason why is because vBulletin grabs the users post count out of the database, which in your case can be 1501. vBulletin then uses a function called vb_number_format() to format the number like so "1,501".

So the condition "<if condition="$post[posts] >= 1500">" in reality is "<if condition="1,501 >= 1500">. There will be discrepancies since is trying to compair 1501 with 1,501 which will never match because of the comma. Your best bet is to use vBulletins Rank System in the AdminCP. It will do exacly what you want if used correctly. ;)
__________________
Ken Iovino / Escalate Media




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
User CP Question Stunt General vBulletin Support 2 12-16-2005 12:34 AM
if condition (forum only) Ghost Shadow vBulletin Modification Requests 2 12-07-2005 12:10 PM
Hi + Question!! black_ps2 Introductions 7 06-17-2005 03:01 PM
[vb help] simple question hkboi General vBulletin Support 10 01-25-2005 02:35 AM


All times are GMT -3. The time now is 07:16 PM.

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)