News:

Wondering if this will always be free?  See why free is better.

Main Menu

Postcount rule

Started by Sev-M.C., May 22, 2011, 04:34:47 PM

Previous topic - Next topic

Sev-M.C.

I would like to know how to write a post count depending php rule.

For example <if xxx post a href=x.png>

And use that code on the display template for show a medal on his post profile.

thanks...

Suki

you can use $user_info   for that,   $user_info  holds  as the name implied, all the info from the user, the group is:

$user_info['groups'][0] - Assigned member groups
$user_info['groups'][1] - Post count group.


so you can use something like this:

global $user_info;

variable = 1  // the ID of the group.
if($user_info['groups'][0] == $variable)
echo ''this text is only visible to those users in the group 1;
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Sev-M.C.


Advertisement: