Jump to content
Дизайн и модификация Invision Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Testweb

Отправить уведомление

Recommended Posts

Подскажите пожалуйста готовый код.

 

Необходимо пользователю отправить уведомление, что за php код необходимо прописать? Спасибо.

Share this post


Link to post

setNotificat - отправка сообщений на почту пользователя, а что за код который отправляет уведомления на форуме в лс, не на почту. Даже не в лс, а просто уведомление о том что такой та пользователю понравилось ваше сообщение.

Share this post


Link to post

Там единный класс, он отправляет емайл уведомления и он же отправляет инлайн нотификации. И все зависит от настроек пользователя, какой тип уведомления он хочет получить для этого конкретного события, которое определяется по ключу.

Share this post


Link to post

Можно пожалуйста пример с настройками, не могу разобрать. Одни ошибки лезут.

Share this post


Link to post

$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 способ.

  • Upvote 1

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...