PDA

View Full Version : If Condition For Minimum Posts


Dj Smuggla
11-10-2010, 07:11 PM
How do i set a if condition for minimum posts?

On my site i want to show the shoutbox for members over 10 posts only...

I've tried this:
<if condition="$bbuserinfo['posts']==10">

But it only shows to members with 10 posts, not 10 and above.

borbole
11-10-2010, 07:18 PM
How do i set a if condition for minimum posts?

On my site i want to show the shoutbox for members over 10 posts only...

I've tried this:
<if condition="$bbuserinfo['posts']==10">

But it only shows to members with 10 posts, not 10 and above.

That is because you have used the equality operator. You should use the less operator for that:

<

Dj Smuggla
11-10-2010, 07:44 PM
What do u mean m8...

kh99
11-10-2010, 07:48 PM
Actually he meant to use the greater than sign, not less than, and he meant that your code should be:


<if condition="$bbuserinfo['posts']>=10">

Dj Smuggla
11-10-2010, 08:18 PM
Thanks a lot m8...

borbole
11-10-2010, 08:36 PM
Actually he meant to use the greater than sign, not less than, and he meant that your code should be:


<if condition="$bbuserinfo['posts']>=10">



Ah sorry, I thought he meant to show it for users with less posts as that is the case communly. Thank you for correcting it :)

Dj Smuggla
11-11-2010, 11:17 AM
I thought he meant to show it for users with less posts as that is the case communly.

Good point...
Would it be better to hide the shoutbox for members with less than 10 posts. Instead of showing the shoutbox for members with over 10 posts?

Is one way easyer on the server than the other?

borbole
11-11-2010, 02:28 PM
Good point...
Would it be better to hide the shoutbox for members with less than 10 posts. Instead of showing the shoutbox for members with over 10 posts?

Is one way easyer on the server than the other?

Personally I think it would be better to prevent access to something to users with less posts in order to kind of motivate them to become more active. Sometimes it works, sometimes it doesn''t especially when those users are at your forum to only get but not give.