Mano Posted November 17, 2021 Share Posted November 17, 2021 Ребят, привет Есть конструкция в плагине Advanced Message, которая выводит блок с глобальным сообщением на главной. {{if settings.AMSG_Forums_Index_Tab}} {{if settings.AMSG_Forums_Index_Box ==0}} <div class="AMSG_Message AMSG_Message_general"> {setting="AMSG_Forums_Index_Message"} </div><br> {{elseif settings.AMSG_Forums_Index_Box ==1}} <div class="AMSG_Message AMSG_Message_information"> {setting="AMSG_Forums_Index_Message"} </div><br> {{elseif settings.AMSG_Forums_Index_Box ==2}} <div class="AMSG_Message AMSG_Message_success"> {setting="AMSG_Forums_Index_Message"} </div><br> {{elseif settings.AMSG_Forums_Index_Box ==3}} <div class="AMSG_Message AMSG_Message_warning"> {setting="AMSG_Forums_Index_Message"} </div><br> {{elseif settings.AMSG_Forums_Index_Box ==4}} <div class="AMSG_Message AMSG_Message_error"> {setting="AMSG_Forums_Index_Message"} </div><br> {{elseif settings.AMSG_Forums_Index_Box ==5}} <div class="AMSG_Message AMSG_Message_question"> {setting="AMSG_Forums_Index_Message"} </div><br> {{elseif settings.AMSG_Forums_Index_Box ==6}} <div class="AMSG_Message AMSG_Message_tip"> {setting="AMSG_Forums_Index_Message"} </div><br> {{endif}} {{endif}} Как к этой конструкции прописать право для просмотра блока определенным группам? Допустим, мне надо, чтобы в этом блоке смогли увидеть 2 бокс только админы и модеры. Заранее спасибо за помощь Quote Link to comment Share on other sites More sharing options...
by_ix Posted November 17, 2021 Share Posted November 17, 2021 {{if \IPS\Member::loggedIn()->inGroup (array(1,2))}} ... {{endif}} попробуй обернуть нужно в это условие. Mano 1 Quote Link to comment Share on other sites More sharing options...
Mano Posted November 17, 2021 Author Share Posted November 17, 2021 1 час назад, by_ix сказал: {{if \IPS\Member::loggedIn()->inGroup (array(1,2))}} ... {{endif}} попробуй обернуть нужно в это условие. Сработало! Благодарю 🔥 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.