Title: NS Chat
Author: Sergey Ivanov
Published: <strong>3 ມິຖຸນາ 2025</strong>
Last modified: 23 ກັນຍາ 2025

---

ຄົ້ນຫາປລັກອິນ

ປລັກອິນນີ້ **ຍັງບໍ່ທັນໄດ້ຮັບການທົດສອບກັບ WordPress 3 ເວີຊັນຫຼັກຫຼ້າສຸດ**. ມັນອາດຈະ
ບໍ່ໄດ້ຮັບການເບິ່ງແຍງ ຫຼື ສະໜັບສະໜູນອີກຕໍ່ໄປ ແລະ ອາດມີບັນຫາການເຮັດວຽກຮ່ວມກັນເມື່ອ
ໃຊ້ກັບ WordPress ເວີຊັນທີ່ໃໝ່ກວ່າ.

![](https://ps.w.org/ns-chat/assets/icon-128x128.png?rev=3305624)

# NS Chat

 ໂດຍ [Sergey Ivanov](https://profiles.wordpress.org/nsgroup/)

[ດາວໂຫຼດ](https://downloads.wordpress.org/plugin/ns-chat.1.0.1.zip)

 * [ລາຍລອຽດ](https://lo.wordpress.org/plugins/ns-chat/#description)
 * [ການຣີວິວ](https://lo.wordpress.org/plugins/ns-chat/#reviews)
 *  [ການຕິດຕັ້ງ](https://lo.wordpress.org/plugins/ns-chat/#installation)
 * [ການພັດທະນາ](https://lo.wordpress.org/plugins/ns-chat/#developers)

 [ການຊ່ວຍເຫຼືອ](https://wordpress.org/support/plugin/ns-chat/)

## ຄຳອະທິບາຍ

NS Chat Plugin enables real-time communication between WordPress users using WebSocket
technology, powered by the Workerman library.

Key Features:
 * Real-time private chat between users * Visual unread message indicators*
Persistent chat history stored in the database * Lightweight modular JS + PHP architecture*
Automatic migration and sync of WP users to chat system * Linux daemon service with
SSL support for secure connections * Future-ready integration with NFS or AWS S3
for file upload/download

Planned Features:
 * Message editing and deletion * Read receipt indicators (message
seen) * File attachments with optional NFS or AWS S3 integration

Ideal for community websites, intranets, or any platform requiring internal messaging
without third-party services.

**For integration help or consulting on adapting the plugin to your project, contact
the developer at: ns.group.tech@gmail.com**

### WebSocket Server Setup (Linux with SSL)

 1. **Create a systemd service file:**
     `bash sudo vim /etc/systemd/system/websocket_server.
    service
 2. **Paste the following content:**
     `bash [Unit] Description=WebSocket Server for
    NS Chat (SSL) After=network.target [Service] ExecStart=/usr/bin/php /file/to/path/
    yourdomain/wp-content/plugins/ns-chat/server.php start Restart=always RestartSec
    =25 User=www-data Group=www-data StandardOutput=file:/var/log/websocket_server.
    out.log StandardError=file:/var/log/websocket_server.err.log [Install] WantedBy
    =multi-user.target
 3. **Add SSL context in `server.php`:**
     `php $context = [ 'ssl' => [ 'local_cert'
    => '/path/to/file.crt', 'local_pk' => '/path/to/file.key', 'verify_peer' => false,]];
 4. **Set permissions for plugin folder:**
     `bash sudo chown -R www-data:www-data /
    path/to/ns-chat/ sudo chmod -R 775 /path/to/ns-chat/
 5. **Reload and start the daemon:**
     `bash sudo systemctl daemon-reload sudo systemctl
    enable websocket_server --now sudo systemctl restart websocket_server sudo systemctl
    status websocket_server
 6. **Check logs if needed:**
     `bash /var/log/websocket_server.out.log /var/log/websocket_server.
    err.log

### Custom Port Configuration

By default, the WebSocket server listens on **port 2346**.

To use a different port:

 1. Change the port in `server.php`:
     `php $wsWorker = new Worker('websocket://0.0.0.0:
    2346', $context);
 2. Change the port in `ns-chat.php`:
     `php $ws_port = 2346;
 3. You can check and change the port in `chat-ui.js`:
     `js const port = nschat_data.
    wsPort || 2346;
 4. If the port is closed, then open a new port on your server’s firewall:
     `bash sudo
    ufw allow <your-port>/tcp sudo firewall-cmd --permanent --add-port=<your-port>/
    tcp sudo firewall-cmd --reload sudo iptables -A INPUT -p tcp --dport <your-port
    > -j ACCEPT sudo iptables-save > /etc/iptables/rules.v4

### Database Tables

The plugin creates and uses the following tables:

 * `wp_ns_chat_dialogues`
 * `wp_ns_chat_messages`
 * `wp_ns_chat_users`

Tables are created and populated automatically on plugin activation.

### User Synchronization

 1. **Initial migration** of all users from `wp_users` to `wp_ns_chat_users` on plugin
    activation.
 2. **New registrations** are handled by:
     `php add_action('user_register', 'ns_chat_add_user_on_registration');
 3. **Profile updates** are synced via:
     `php add_action('profile_update', 'ns_chat_update_user_data');
    You may bind these functions to custom hooks based on your app’s logic.

### License

GPLv2 or later

## ການຕິດຕັ້ງ

 1. Upload the plugin folder `ns-chat` to `/wp-content/plugins/`.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. After activation, a new page template called “NS Chat Template” will be available
    when creating pages.
 4. Set up the WebSocket server on your Linux machine.

## ຄຳຖາມທີ່ພົບເລື້ອຍ

### Does this work on shared hosting?

No, it requires a persistent PHP process for the WebSocket server. Use a VPS or 
dedicated server.

### Is SSL required?

Yes. To use secure WebSocket (wss://), SSL certificates must be configured in `server.
php`.

### Can I use a different port than 2346?

Yes. See “Custom Port Configuration” section.

### Can I get help with integration into my custom project?

Yes, you can contact the developer at ns.group.tech@gmail.com for custom integration
support or consulting.

### Does it support group chats?

Not yet. Planned in future versions.

## ການຣີວິວ

ບໍ່ມີການຣີວິວສຳລັບປລັກອິນນີ້.

## ຜູ້ຮ່ວມພັດທະນາ ແລະ ຜູ້ພັດທະນາ

“NS Chat” ແມ່ນຊອຟແວໂອເພັນຊອດ (Open Source). ບຸກຄົນຕໍ່ໄປນີ້ໄດ້ມີສ່ວນຮ່ວມໃນການພັດທະ
ນາປລັກອິນນີ້.

ຜູ້ຮ່ວມພັດທະນາ

 *   [ Sergey Ivanov ](https://profiles.wordpress.org/nsgroup/)
 *   [ Sergey Ivanov ](https://profiles.wordpress.org/sergey-ivanov/)

[ແປ “NS Chat” ເປັນພາສາຂອງເຈົ້າ.](https://translate.wordpress.org/projects/wp-plugins/ns-chat)

### ສົນໃຈຮ່ວມພັດທະນາບໍ່?

[ເບິ່ງລະຫັດ](https://plugins.trac.wordpress.org/browser/ns-chat/), ກວດເບິ່ງ [ຄັງເກັບ SVN](https://plugins.svn.wordpress.org/ns-chat/),
ຫຼື ຕິດຕາມ [ບັນທຶກການພັດທະນາ](https://plugins.trac.wordpress.org/log/ns-chat/) ຜ່ານ
[RSS](https://plugins.trac.wordpress.org/log/ns-chat/?limit=100&mode=stop_on_copy&format=rss).

## ບັນທຶກການປ່ຽນແປງ

#### 1.0

 * Initial public release.
 * One-on-one messaging with WebSocket daemon
 * User sync and message storage

## ຂໍ້ມູນກຳກັບ (Meta)

 *  ເວີຊັນ **1.0.1**
 *  ອັບເດດຫຼ້າສຸດເມື່ອ **11 ເດືອນ ທີ່ຜ່ານມາ** ທີ່ຜ່ານມາ
 *  ການຕິດຕັ້ງທີ່ໃຊ້ງານຢູ່ **ໜ້ອຍກວ່າ 10**
 *  ເວີຊັນ WordPress ** 5.8 ຫຼື ສູງກວ່າ **
 *  ທົດສອບເຖິງເວີຊັນ **6.8.8**
 *  ເວີຊັນ PHP ** 7.4 ຫຼື ສູງກວ່າ **
 *  ພາສາ
 * [English (US)](https://wordpress.org/plugins/ns-chat/)
 * ແທັກ
 * [chat](https://lo.wordpress.org/plugins/tags/chat/)[messaging](https://lo.wordpress.org/plugins/tags/messaging/)
   [real-time](https://lo.wordpress.org/plugins/tags/real-time/)[Websocket](https://lo.wordpress.org/plugins/tags/websocket/)
 *  [ມຸມມອງຂັ້ນສູງ](https://lo.wordpress.org/plugins/ns-chat/advanced/)

## ການໃຫ້ຄະແນນ

ຍັງບໍ່ມີການສົ່ງຄຳວິຈານເທື່ອ.

[ການທົບທວນຂອງທ່ານ](https://wordpress.org/support/plugin/ns-chat/reviews/#new-post)

[ເບິ່ງທັງໝົດ ການຣີວິວ](https://wordpress.org/support/plugin/ns-chat/reviews/)

## ຜູ້ຮ່ວມພັດທະນາ

 *   [ Sergey Ivanov ](https://profiles.wordpress.org/nsgroup/)
 *   [ Sergey Ivanov ](https://profiles.wordpress.org/sergey-ivanov/)

## ການຊ່ວຍເຫຼືອ

ມີຄຳຖາມ ຫຼື ຕ້ອງການຄວາມຊ່ວຍເຫຼືອບໍ່?

 [ເບິ່ງຟໍຣັມການຊ່ວຍເຫຼືອ](https://wordpress.org/support/plugin/ns-chat/)