ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 5318

Premium section overlay for the forum category

by NickxD - 01-08-2022 - 05:41 PM
#1
https://gyazo.com/fb1113d6f0a115d44e0c5ec1dc618f48

Go to forums -> font -> index -> index .

Find:

Code:
<li data-categoryID='{$category->_id}' class='cForumRow ipsBox ipsSpacer_bottom ipsResponsive_pull'>

Change to:

Code:
{{if $category->_id == 1 && !\IPS\Member::loggedIn()->inGroup( array(4, 2) )}}
<div class="ipsFlex ipsFlex-jc:center ipsFlex-ai:center ipsFlex-fd:column cForumRow_premium">
<h2> Premium department </h2>
<p> Get premium here </p>
</div>
{{endif}}

$ category -> _ id - stands for the category ID.

! \ IPS \ Member :: loggedIn () -> inGroup (array ( 4, 2 )) - means groups that have access to the category


Code:
Paste CSS code:

.cForumList li[data-categoryid="1"].cForumRow {
position: relative;
}

.cForumRow_premium {
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    line-height: 0;
    font-size: 30px;
    color: #fff;
}


[data-categoryid = "1"] - means the category ID

Hope it works for you and hope you enjoy. If need help lmk.
Reply

Users browsing: 1 Guest(s)