Log in

View Full Version : post rank count


LifesGreatestGift
05-06-2012, 05:55 PM
is there a way to get the amount of ranks a user has? I tried the following conditional and it didnt work..

<vb:if condition="$post['rank'] > 1">SHOW THIS</vb:if>

kh99
05-06-2012, 07:47 PM
I don't see any way to do that without going through the same kind of code that sets the ranks. Maybe if all your ranks have "stacked" set to yes you might be able to write code that counts the number of times <br /> appears in the $post['rank'] string.

Badshah93
05-06-2012, 08:21 PM
I don't see any way to do that without going through the same kind of code that sets the ranks. Maybe if all your ranks have "stacked" set to yes you might be able to write code that counts the number of times <br /> appears in the $post['rank'] string.

if admin chooses html as rank and if he uses <br /> tag in ranks then there will be extra count.

anyway,
I have just created quick product for this.


To show rank count use
{vb:raw post.rankcount} // in postbit ot postbit legacy

only 1 sql query per page.

LifesGreatestGift
05-07-2012, 03:54 AM
thank you :)