vinegredz Posted December 19, 2018 Share Posted December 19, 2018 Здравствуйте! Хочу в шаблоне userBar выводить оставшееся количество дней подписки по шаблону: 5 дней12 дней1 день пока нашел место в шаблоне, где выводится название активной подписки, но не могу вывести оставшееся количество дней. Как это сделать? Link to comment Share on other sites More sharing options...
siv1987 Posted December 20, 2018 Share Posted December 20, 2018 Подписки чего? Использовать выражение дата_окончание-текущая_дата Link to comment Share on other sites More sharing options...
vinegredz Posted December 21, 2018 Author Share Posted December 21, 2018 До окончания платной подписки, которую можно купить с недавних пор) Link to comment Share on other sites More sharing options...
newbie Posted December 26, 2018 Share Posted December 26, 2018 {{if $subscription = \IPS\nexus\Subscription::loadActiveByMember() and $subscription->expire}} {expression="\IPS\DateTime::formatInterval(\IPS\DateTime::create()->diff(\IPS\DateTime::ts($subscription->expire)))"} {{endif}} 2 Link to comment Share on other sites More sharing options...
vinegredz Posted January 2, 2019 Author Share Posted January 2, 2019 Спасибо, это работает даже лучше, чем я предполагал! 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