CrazyKid Posted April 21, 2013 Share Posted April 21, 2013 Hey how would i get this message to show for certain groups? so for instance I'm wanting to cover Forum Announcements from Guests and Validating members. here is an example of what I'm wanting; IPBForumSkins have it for customers, but I'm wanting it to cover the Announcements section of my board. I have the .css code for it, but have no clue on if statement needed to make it only show for guests / banned & validating members. any help on this please? "/ Link to comment Share on other sites More sharing options...
0 CrazyKid Posted April 21, 2013 Author Share Posted April 21, 2013 #category_NUMBER{ opacity: 0.5; filter: alpha(opacity = 50);}Replace NUMBER with the category ID i have all the .css for this, but I'm wanting this to only show for certain groups i stated in original post which are banned members / Guests & Validating Members. how would i go about making it only show for them? Link to comment Share on other sites More sharing options...
0 CrazyKid Posted April 21, 2013 Author Share Posted April 21, 2013 Edited my post, just edit the permissions and only select "Show Forum". is there anyway around it to do this the way IPBForumSkins do this, with a if statement? here is the .css I'm using. #category_1.category_block { position: relative;} #category_1:after { content: "Members Only"; background: url("http://www.ipbforumskins.com/forums/public/style_images/ipbfs34x/transw80.png") repeat; background: rgba(255,255,255,0.8); position: absolute; top: 0; left: 0; right: 0; bottom: 0; font-size: 30px; line-height: 310px; text-align: center; z-index: 10; cursor: normal;} Link to comment Share on other sites More sharing options...
0 CrazyKid Posted April 21, 2013 Author Share Posted April 21, 2013 <if test="$_data['cat_data']['id'] == 1"> <php>$groups = array(1,2,3); </php> <if test="!in_array($this->memberData['member_group_id'], $groups)"> <style type='text/css'> #category_1.category_block { position: relative; } #category_1:after { content: "Members Only"; background: url("http://www.ipbforumskins.com/forums/public/style_images/ipbfs34x/transw80.png") repeat; background: rgba(255,255,255,0.8); position: absolute; top: 0; left: 0; right: 0; bottom: 0; font-size: 30px; line-height: 310px; text-align: center; z-index: 10; cursor: normal; } </style> </if></if>Place it under "<foreach loop="categories:$cat_data as $_data">" @boardIndexTemplate, not sure if it works, and ofcourse there is a better way, but just a quick example.Don't forget to edit: $groups = array(1,2,3);A better method is btw to add an extra class to your stylesheet and just do a small if statement. <div id='category_{$_data['cat_data']['id']}' class='category_block block_wrap <if test="!in_array($this->memberData['member_group_id'], $groups">customer_only</if>'> #category_1.customer_only {#category_1.customer_only:after { Okay well the first method didn't work "/ is there any chance you can talk me through the second method you was saying? Link to comment Share on other sites More sharing options...
0 CrazyKid Posted April 21, 2013 Author Share Posted April 21, 2013 you had miss type in the first code. i removed the ! in the "!in_array" You boss are the best! Link to comment Share on other sites More sharing options...
Question
CrazyKid
Hey how would i get this message to show for certain groups?
so for instance I'm wanting to cover Forum Announcements from Guests and Validating members.
here is an example of what I'm wanting;
IPBForumSkins have it for customers, but I'm wanting it to cover the Announcements section of my board.
I have the .css code for it, but have no clue on if statement needed to make it only show for guests / banned & validating members.
any help on this please? "/
Link to comment
Share on other sites
4 answers to this question
Recommended Posts