Quote:
Originally Posted by ncweb
I wanted the same for my live site, its simple to just use conditional statements...
Granted I have no idea if it’s bad to nest these <if> statements? It worked for me…
Code:
<if condition="is_member_of($bbuserinfo,5,6,7)">
<if condition="$show['microstats']">{microstats}</if>
</if>
I very much like the addition to turn debug on/off via cp, less time when testing... thanks again TECK
-I love it :up:
|
Thanks a lot guys, I mean it.

ncweb, is best to filter it in the actual code, not only template. Why? Because the script will still process all the microstats code for nothing, if you are not an admin. Waisting memory and processing time for no reason.
Take a look at the admin attachment I made earlier to see the differences.
Also, you could use a simpler condition:
Code:
<if condition="$show['microstats'] AND is_member_of($bbuserinfo, 5, 6, 7)"><!-- {microstats} --></if>
Notice that the {microstats} changed, following Ollie's idea.
Go ahead and release it for everyone, have fun.