前言介紹
- 這款 WordPress 外掛「NS Chat」是 2025-06-02 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2025-09-23,距離現在已有 156 天。
- 外掛最低要求 WordPress 5.8 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
chat | messaging | real-time | Websocket | workerman |
內容簡介
總結:NS Chat 外掛透過 WebSocket 技術實現 WordPress 使用者之間的即時通訊,使用 Workerman library 提供支援。
提問與回答:
1. NS Chat 外掛的主要特點有哪些?
- 包括即時私密聊天、未讀訊息指示器、持續聊天紀錄儲存在資料庫中、輕便模組化的 JS + PHP 架構、自動遷移和同步 WP 使用者至聊天系統、具有 SSL 支援的 Linux 守護程式服務、未來整合 NFS 或 AWS S3 以進行檔案上傳/下載。
2. NS Chat 外掛未來計畫中包括哪些功能?
- 消息編輯與刪除、已讀回执指示器(訊息已讀)、檔案附加功能並可選擇整合 NFS 或 AWS S3。
3. NS Chat 外掛適用於哪些網站或平台?
- 尤其適用於社群網站、內部網站、或任何需要內部訊息傳遞但不需第三方服務的平台。
4. 如需整合或諮詢有關 NS Chat 外掛如何適應專案的支援,可以如何聯絡開發者?
- 聯絡電子郵件:[email protected]。
原文外掛簡介
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: [email protected]
WebSocket Server Setup (Linux with SSL)
Create a systemd service file:
bash
sudo vim /etc/systemd/system/websocket_server.service
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
Add SSL context in server.php:
php
$context = [
'ssl' => [
'local_cert' => '/path/to/file.crt',
'local_pk' => '/path/to/file.key',
'verify_peer' => false,
]
];
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/
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
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:
Change the port in server.php:
php
$wsWorker = new Worker('websocket://0.0.0.0:2346', $context);
Change the port in ns-chat.php:
php
$ws_port = 2346;
You can check and change the port in chat-ui.js:
js
const port = nschat_data.wsPort || 2346;
If the port is closed, then open a new port on your server’s firewall:
bash
sudo ufw allow
sudo firewall-cmd --permanent --add-port=
sudo firewall-cmd --reload
sudo iptables -A INPUT -p tcp --dport
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
Initial migration of all users from wp_users to wp_ns_chat_users on plugin activation.
New registrations are handled by:
php
add_action('user_register', 'ns_chat_add_user_on_registration');
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
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「NS Chat」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
MQTT-Plug 》總結:MQTT-Plug通過安全的WebSocket連接,將即時的MQTT數據直接嵌入WordPress中。此外,該外掛針對開發人員、IoT實驗者和小型生產部署設計,提供實時可視性...。
Mesh-Plug for Meshtastic 》**總結:**, , Mesh-Plug提供簡單的短代碼,通過WebSocket連接到您的MQTT代理並將傳入訊息列印到即時日誌中。, , **問題與答案:**, , 1. Mesh-Plug提供的是...。Chat for WebIRC 》總結文案:這個外掛提供一個簡潔的 IRC 客戶端短碼,使用純粹的 JavaScript 編寫。支援與 IRC 伺服器直接的 WebSocket 連接(符合 IRCv3 標準),並包括可選...。
Badwolf Web IRC Client 》<p><strong>Badwolf Web IRC Client 是專為 WordPress 網站設計的現代、基於 WebSocket 的 IRC 客戶端。這個外掛可透過簡單的短碼,直接將即時IR...。
LiveChat LazucruB 》此外掛是 RealTime Web Chat 的客戶端 websocket 服務,能在您的網站上建立即時聊天。, 此服務提供能力來創建和管理您的聊天室。, 安裝, , 從 WordPress 官方...。
