Testweb Posted January 15, 2019 Share Posted January 15, 2019 Подскажите пожалуйста готовый код. Необходимо пользователю отправить уведомление, что за php код необходимо прописать? Спасибо. Link to comment Share on other sites More sharing options...
newbie Posted January 16, 2019 Share Posted January 16, 2019 http://ipbskins.ru/forum/topic15662.html/ Link to comment Share on other sites More sharing options...
Testweb Posted January 16, 2019 Author Share Posted January 16, 2019 setNotificat - отправка сообщений на почту пользователя, а что за код который отправляет уведомления на форуме в лс, не на почту. Даже не в лс, а просто уведомление о том что такой та пользователю понравилось ваше сообщение. Link to comment Share on other sites More sharing options...
siv1987 Posted January 16, 2019 Share Posted January 16, 2019 Там единный класс, он отправляет емайл уведомления и он же отправляет инлайн нотификации. И все зависит от настроек пользователя, какой тип уведомления он хочет получить для этого конкретного события, которое определяется по ключу. Link to comment Share on other sites More sharing options...
Testweb Posted January 16, 2019 Author Share Posted January 16, 2019 Можно пожалуйста пример с настройками, не могу разобрать. Одни ошибки лезут. Link to comment Share on other sites More sharing options...
siv1987 Posted January 16, 2019 Share Posted January 16, 2019 $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); $notifyLibrary = new $classToLoad( $this->registry ); $notifyLibrary->setMember( $from ); //id | array memberData $notifyLibrary->setFrom( $to); // id | array memberData $notifyLibrary->setNotificationKey( 'profile_comment' ); $notifyLibrary->setNotificationUrl( '' ); $notifyLibrary->setNotificationTitle( 'Title notification' ); $notifyLibrary->setNotificationText( 'Text notification' ); $notifyLibrary->sendNotification(); Но пользователь получат инлайн нотификации только в случае если него стоит соответствующий тип уведомления у ключа profile_comment (Notify me of comments made on my profile). По умолчанию это inline способ. 1 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