Атаман Posted April 5, 2018 Share Posted April 5, 2018 Добрый! Есть ли способ, чтоб под автаркой у пользователя выводился % предупреждений как - это было в предыдущих версиях.Спасибо Link to comment Share on other sites More sharing options...
newbie Posted April 5, 2018 Share Posted April 5, 2018 выводился % предупрежденийИ как его считать, если в 4-ке нет %%?Можно вывести сколько баллов у юзера. Link to comment Share on other sites More sharing options...
Атаман Posted April 5, 2018 Author Share Posted April 5, 2018 Хотя-бы сколько баллов) Link to comment Share on other sites More sharing options...
newbie Posted April 5, 2018 Share Posted April 5, 2018 В шаблон postContainer{{if \IPS\Settings::i()->warn_on and !$comment->author()->inGroup(explode(',', \IPS\Settings::i()->warn_protected)) and (\IPS\Member::loggedIn()->modPermission('mod_see_warn') or (\IPS\Settings::i()->warn_show_own and \IPS\Member::loggedIn()->member_id == $comment->author()->member_id))}} {number="$comment->author()->warn_level"} {{endif}}html сами добавите 1 Link to comment Share on other sites More sharing options...
Атаман Posted April 5, 2018 Author Share Posted April 5, 2018 Спасибо) Link to comment Share on other sites More sharing options...
Атаман Posted April 5, 2018 Author Share Posted April 5, 2018 Сделал так {{if \IPS\Settings::i()->warn_on and !$comment->author()->inGroup(explode(',', \IPS\Settings::i()->warn_protected)) and (\IPS\Member::loggedIn()->modPermission('mod_see_warn') or (\IPS\Settings::i()->warn_show_own and \IPS\Member::loggedIn()->member_id == $comment->author()->member_id))}} {lang="member_warn_level" pluralize="$comment->author()->warn_level"} {{endif}} 1 Link to comment Share on other sites More sharing options...
DarthOld Posted May 23, 2018 Share Posted May 23, 2018 А если у юзера НОЛЬ баллов, как можно что бы не выводило тогда это сообщение? Link to comment Share on other sites More sharing options...
newbie Posted May 24, 2018 Share Posted May 24, 2018 А если у юзера НОЛЬ баллов, как можно что бы не выводило тогда это сообщение? Добавить условие. В коде есть все данные.{{if \IPS\Settings::i()->warn_on and !$comment->author()->inGroup(explode(',', \IPS\Settings::i()->warn_protected)) and (\IPS\Member::loggedIn()->modPermission('mod_see_warn') or (\IPS\Settings::i()->warn_show_own and \IPS\Member::loggedIn()->member_id == $comment->author()->member_id)) and $comment->author()->warn_level > 0}} {number="$comment->author()->warn_level"} {{endif}} 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now