diff --git a/modules/ncenterlite/lang/en.php b/modules/ncenterlite/lang/en.php index ebac9e365..0bbb7c95d 100644 --- a/modules/ncenterlite/lang/en.php +++ b/modules/ncenterlite/lang/en.php @@ -122,6 +122,17 @@ $lang->ncenterlite_mid_use = 'Module specific settings'; $lang->ncenterlite_to_unsubscribe = 'Disable notification'; $lang->ncenterlite_subscribe = 'Activate notification'; $lang->ncenterlite_cmd_unsubscribe_settings = 'Notification settings'; +$lang->ncenterlite_notify_count = 'Notification count'; +$lang->ncenterlite_notify_count_about = 'Set the number of notifications per page.'; +$lang->this_message_unsubscribe = 'Unsubscribe from this post'; +$lang->about_this_message_unsubscribe = 'Stop receiving notifications abou this post.'; +$lang->unsubscribe_list = 'Unsubscribe List'; +$lang->unsubscribe = 'Unsubscribe individually'; +$lang->about_unsubscribe = 'Allow users to unsubscribe from individual posts.'; +$lang->fcm_push_format = 'Push notification format'; +$lang->fcm_push_format_notification = 'Use notification'; +$lang->fcm_push_format_data = 'Use data'; +$lang->about_fcm_push_format = 'Select where to place the notification data when sending push notifications with Google FCM.
This setting should match the requirements of your client application or frontend code.'; $lang->ncenterlite_all_delete = 'Delete all'; $lang->ncenterlite_month_before_delete = 'Delete older than 1 month'; $lang->dont_check_notify_delete = 'Unread notifications will be deleted, too.'; diff --git a/modules/ncenterlite/lang/ko.php b/modules/ncenterlite/lang/ko.php index 7bc320b2b..ffad8d452 100644 --- a/modules/ncenterlite/lang/ko.php +++ b/modules/ncenterlite/lang/ko.php @@ -141,6 +141,10 @@ $lang->about_this_message_unsubscribe = '이 게시글/댓글의 알림을 수 $lang->unsubscribe_list = '수신 거부 리스트'; $lang->unsubscribe = '개별 문서/댓글 알림 수신 거부'; $lang->about_unsubscribe = '개별 문서/댓글 알림 수신을 거부하는 기능을 사용합니다.'; +$lang->fcm_push_format = '푸시 알림 포맷'; +$lang->fcm_push_format_notification = 'notification 사용'; +$lang->fcm_push_format_data = 'data 사용'; +$lang->about_fcm_push_format = 'Google FCM 푸시 알림 발송시 알림 데이터를 어느 항목에 담을지 선택합니다.
알림을 받아 처리하는 모바일 어플리케이션이나 프론트엔드 코드의 요구사항에 맞추어야 합니다.'; $lang->member_menu_view = '회원 메뉴 표시'; $lang->member_menu_on = '표시'; $lang->member_menu_off = '표시하지 않음'; diff --git a/modules/ncenterlite/ncenterlite.admin.controller.php b/modules/ncenterlite/ncenterlite.admin.controller.php index 4dae1af0a..2e1162b0a 100644 --- a/modules/ncenterlite/ncenterlite.admin.controller.php +++ b/modules/ncenterlite/ncenterlite.admin.controller.php @@ -38,6 +38,7 @@ class ncenterliteAdminController extends ncenterlite 'comment_all_notify_module_srls', 'unsubscribe', 'notify_count', + 'fcm_push_format', ); if($obj->disp_act == 'dispNcenterliteAdminSkinsetting') diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 04e3a2465..79ad88b1f 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -1588,11 +1588,15 @@ class ncenterliteController extends ncenterlite } $oPush = new \Rhymix\Framework\Push(); - $oPush->setSubject($content); - $oPush->setContent(strval($args->extra_content)); + if (!isset($config->fcm_push_format) || $config->fcm_push_format === 'notification') + { + $oPush->setSubject($content); + $oPush->setContent(strval($args->extra_content)); + } $oPush->setData($args->extra_data); $oPush->setURL(strval($target_url)); $oPush->addTo(intval($args->member_srl)); + var_dump($oPush);exit; $output = $oPush->send(); return $output; diff --git a/modules/ncenterlite/tpl/advancedconfig.html b/modules/ncenterlite/tpl/advancedconfig.html index 9b9903666..b3826cb3d 100644 --- a/modules/ncenterlite/tpl/advancedconfig.html +++ b/modules/ncenterlite/tpl/advancedconfig.html @@ -107,6 +107,18 @@

{$lang->about_unsubscribe}

+
+ +
+ + +

{$lang->about_fcm_push_format}

+
+