We've had several inquiries on how to place an overlay across a specific category, to denote that only certain user groups can view said category. A perfect example would be the "Customers Only" category displayed on the IPBForumSkins site.
To mimic the snapshot above, read on!
Navigate to:
ACP > Look & Feel > -Your Skin- > Board Index > boardIndexTemplate
Find the following line:
<foreach loop="forums:$_data['forum_data'] as $forum_id => $forum_data">
Add directly below that line:
<if test="$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_XX.category_block { position: relative; } #category_XX:after { content: "Customers Only"; background: url("{style_images_url}/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: 350px; text-align: center; z-index: 10; cursor: normal; } </style> </if></if>
Next, you'll need to make a few edits..
Which groups will this overlay display for?
Find this line:
<php>$groups = array(1, 2, 3);</php>
And adjust the group numbers. Group numbers are displayed next to the group's name on the Manage Member Groups page located in your ACP. An example group number would be: (ID: 1)
Which category will this overlay apply to?
You'll need to change which category this overlay will apply to. There are two methods to determining the category 'number'. One way, would be to click on the category name on your board index. The category number is contained within the URL.. ex: {your_url}/forum/1-general-discussion/
The category number is 1. Another method, would be to 'edit' the category within the ACP (via the Manage Forums page), and at the end of the URL, you will see f=# (where # is a number).
To edit which category displays, find and replace the XX located within the code (two instances), with the category number.
Lastly, you'll need to upload (via FTP) a transparent image for the overlay.. found here: http://i.imgur.com/owF8hud.png
FAQs
How do I change the displayed text?
Change the content: value by changing "Customers Only" to whatever you like.
Can I use this for multiple categories?
Yes! Simply copy/paste the #content containers and edit the category number.
Do I need to grant groups permission to see the category?
That is recommended, yes. Otherwise, this tutorial is pointless.
How do I change the transparency color?
You'll need to tweak the rgba colors. For darker skins, the recommended value would be 0, 0, 0, 0.3. You can use ColorPicker.com to obtain the R, G, and B values. Remember, A stands for Alpha, which determines opacity.
Have more questions? Feel free to post them!