อยากทราบว่า ถ้าหากต้องการให้มีการแจ้งเตือนทุกครั่ง ที่มีการตอบกลับโพส ใน phpbb

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: อยากทราบว่า ถ้าหากต้องการให้มีการแจ้งเตือนทุกครั่ง ที่มีการตอบกลับโพส ใน phpbb

Re: อยากทราบว่า ถ้าหากต้องการให้มีการแจ้งเตือนทุกครั่ง ที่มีการตอบกลับโพส ใน phpbb

โดย Ittichai_chupol » 25/02/2019 11:43 am

โค้ด: เลือกทั้งหมด


              public function find_users_for_notification($data, $options = array()) {
             // $this->notifications_table $this->notification_types_table
        // print_r($data);
        $update_notifications = array();
        $sql = 'SELECT n.*
                FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . ' nt
                WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
                AND n.item_parent_id = ' . (int) self::get_item_parent_id($data) . '
                AND n.notification_read = 0
                AND nt.notification_type_id = n.notification_type_id
                AND nt.notification_type_enabled = 1';
        //echo $sql;
        $result = $this->db->sql_query($sql);

        $nofify_user = $this->db->sql_fetchrow($result);
        if ($nofify_user) {
            // print_r($nofify_user); exit;
            foreach ($nofify_user as $row) {

                // Do not create a new notification
                //unset($notify_users[$row['user_id']]);

                $notification = $this->notification_manager->get_item_type_class($this->get_type(), $nofify_user);
                $update_responders = $notification->add_responders($data);

                if (!empty($update_responders)) {
                    $sql = 'UPDATE ' . $this->notifications_table . '
                            SET ' . $this->db->sql_build_array('UPDATE', $update_responders) . '
                            WHERE notification_id = ' . $nofify_user['notification_id'];


                    $this->db->sql_query($sql);
                }
            }
        } else {
            $users = array();
            $users[$data['user_id']] = array('');
            $this->user_loader->load_users(array_keys($users));
            return $this->check_user_notification_options(array_keys($users), $options);
        }
    }




ส่วนการทำงาน นี้เป็นส่วนสุดท้ายที่ บางครั่ง หลังจากมาถึง ส่วนนี้ก็ไม่มีการส่งค่าไปต่อที่อื่น ทำให้ไม่สามรถที่จะบันทึก ผล ไปยังตาราง notification ได้

Re: อยากทราบว่า ถ้าหากต้องการให้มีการแจ้งเตือนทุกครั่ง ที่มีการตอบกลับโพส ใน phpbb

โดย Ittichai_chupol » 23/02/2019 3:35 pm

คือ ผมลอง ปรับแต่งการแจ้งเตือน เพื่อมาใช้กับ กับ ความคิดเห็นย่อย ให้พอมีการตอบกลับแบบความคิดเห็นย่อยมีการแจ้งเตือนขึ้นมา ครับ

Re: อยากทราบว่า ถ้าหากต้องการให้มีการแจ้งเตือนทุกครั่ง ที่มีการตอบกลับโพส ใน phpbb

โดย thatsawan » 23/02/2019 2:40 pm

ปกติ phpbb ไม่มี ตอบความคิดเห็นยอ่ย
เพราะผลได้ทดลองทำแล้ว ปรากฏว่า มีการแสดงแจ้งเตือนเพียงแค่บางครั่ง ครับ
ทดสอบอะไรค่ะ

จะให้ช่วยอะไร

อยากทราบว่า ถ้าหากต้องการให้มีการแจ้งเตือนทุกครั่ง ที่มีการตอบกลับโพส ใน phpbb

โดย Ittichai_chupol » 23/02/2019 2:22 pm

ผมอยากทราบว่า ถ้าต้องการที่จะให้ เว็บบอร์ด มีการแจ้งเตือน ทุกๆครั่งที่มีการตอบกลับความคิดเห็นย่อย จะต้องทำอย่างไรครับ
เพราะผลได้ทดลองทำแล้ว ปรากฏว่า มีการแสดงแจ้งเตือนเพียงแค่บางครั่ง ครับ

ข้างบน