Jump to content


Tutorial info Visit support topic

  • Added on: Oct 23 2009 05:19 AM
  • Views: 1313
 


* * * * *
1 Ratings

If Group Statement

If you ever wanted to specify certain Code for certain Groups within your Skin Templates... Heres How.

Posted by Nevo on Oct 23 2009 05:19 AM
Okay, so log into your IPB 3 Admin Panel. Then navigate to the Look & Feel Tab and go into the Style you want to edit.


Once there, lets say you want to make a Message display "Hello Admins" but you only want it to appear for 3 Groups.


Use this IF Statement:

<if test="in_array($this->memberData['member_group_id'], array(4,5,6) )">
Hello Admins
<else />
 
</if>


Naturally, replace the ID's (4,5,6) with your Group Ids and replace the "Hello Admins" with your desired Content.



Tip: This line of coding is useful for advertisement control... At least that's what i use it for to distinguish who see's the ads and who doesn't. :)

Powered by Tutorials 1.4.1 © 2012, by Michael McCune