Init Chat Engine – Lightweight Chatbox Plugin for WordPress Homepages

Version: 1.2.8 Tiếng Việt

Init Chat Engine – Lightweight Chatbox Plugin for WordPress Homepages
Init Chat Engine is a minimalist chatbox plugin for WordPress that lets you quickly add a community chat interface to your homepage or any location using a single shortcode. It supports anonymous messaging, real-time updates via polling, no jQuery, and zero complicated setup. The layout is fully overrideable via your theme, and it runs smoothly on any hosting environment without requiring WebSocket.

Main Features

  • Simple shortcode [init_chatbox] – embed anywhere
  • Supports guest messaging (can be enabled/disabled in settings)
  • No jQuery, no page reload – updates via 3-second polling
  • Template override supported – customize layout via your theme
  • Minimal CSS – can be disabled to use your own styles (UIkit, Tailwind…)

Display the Chatbox with Shortcode

Use the shortcode in posts, page builders, or template files:

[init_chatbox]

No complex parameters – just insert and it works. For advanced customization, override the template as shown below.

Easy Template Override

You can fully customize the chatbox interface by copying the default template into your theme:

your-theme/init-chat-engine/
└── chatbox.php

Then modify the HTML, add UIkit/Tailwind classes, or reorder elements freely. No hooks or actions needed.

Quick Installation

  1. Download the plugin and extract it into /wp-content/plugins/init-chat-engine/
  2. Activate the plugin from the Plugins menu in your admin dashboard
  3. Add the [init_chatbox] shortcode to your homepage or any desired location
  4. Optional: go to Settings → Init Chat Engine to enable guest chat, set message limits, and more

Compatibility & Performance

  • Compatible with WordPress 5.5+
  • Requires PHP 7.4 or higher
  • No WebSocket required – works on all shared hosting
  • No jQuery – built entirely with Vanilla JavaScript

Get Started Now

Looking for a simple, fast, lightweight, easily embeddable, and fully customizable chatbox? Init Chat Engine is the perfect solution for your homepage or any place you want to create a real-time chat space for your community!

Review

5.0/5 (2)

Changelog

  • 1.2.8 – Fix incorrect message ordering when loading history
    • Hotfix: resolved the issue where older messages were displayed in the wrong order when clicking Load more.
    • API /messages (before_id) now uses ORDER BY id DESC to always return messages in the correct sequence.
    • Frontend removed .reverse() on Load More and now uses prepend() directly based on API order.
    • Message timeline is consistently rendered old → new, even when loading multiple history batches.
    • Internal change only — no UI changes, no DB schema changes.
  • 1.2.7 – Fix message order when loading history (Load More)
    • Fixed an issue where messages appeared in reverse order when pressing Load more.
    • The /messages API now returns data in chronological ascending (ASC) order for all flows:
      • Initial load
      • Older history pagination (before_id)
      • Realtime polling (after_id)
    • Frontend no longer needs to reverse arrays — simply prepend or append based on the mode.
    • Improved timeline smoothness when fetching older batches: no jumpy positions or scroll jumps.
    • Internal change only; no UI, DB schema, or storage logic changes.
  • 1.2.6 – Hardened Word Filter Engine & new extensibility hooks
    • Rebuilt the Word Filter Engine with an aggressive substring detection strategy (blocks https://, domains, encoded text, spam links).
    • Fully respects existing Security settings: Enable Word Filtering, Blocked Words, and Word Filter Exceptions.
    • Improved Unicode handling (NFC normalization) and removed empty/commented lines (#comment) from the blocked-word list.
    • Preserves strict Administrator bypass behavior and maintains role-based exemption rules.
    • No new UI settings — functionality extended purely via Filters/Actions.
    • Added new extensibility hooks:
      init_plugin_suite_chat_engine_word_filter_strategy,
      init_plugin_suite_chat_engine_blocked_words,
      init_plugin_suite_chat_engine_bypass_filter,
      init_plugin_suite_chat_engine_word_block_hit.
    • Fully backward-compatible — zero impact to existing configurations.
  • 1.2.5 – Added Delete All Messages button & hardened content display security
    • Introduced a new admin-only action: “Delete All Messages” available under Quick Actions on the Chat Management page.
    • Restricted access strictly to Administrators with proper capability check (manage_options).
    • Uses TRUNCATE within a transaction for instant, safe, and atomic cleanup of all chat messages.
    • Automatically resets related statistics: total_messages, messages_today, and active_users_today.
    • Includes internal logging (only when WP_DEBUG is enabled) for administrative audit tracking.
    • Ensured full WPCS compliance with properly scoped // phpcs:ignore annotations where required.
    • Hardened frontend content rendering to prevent injection or display of invalid or unsafe HTML elements.
    • Improved overall system stability and public chat environment security.
  • 1.2.4 – Rebuilt FX Keyword Engine for per-message optimization
    • Completely redesigned the FX Keyword Engine to process per message instead of scanning the entire DOM.
    • Removed global TreeWalker scanning logic and replaced it with inline keyword handling at render time.
    • Introduced two new helpers: getCompiledFXRules() and applyFXInMessageContainer() for fast, scoped keyword processing.
    • FX rules are now compiled once and reused across all messages for better runtime performance.
    • Removed redundant functions: initChatboxReplaceFXKeywords(), safeReplaceFXKeywordsInDOM(), and runFXIfHasMessages().
    • Improved keyword detection accuracy with a unified single regex alternation using named groups.
    • Maintained full compatibility with existing FX_KEYWORDS structure and runEffect() logic.
    • Eliminated heavy DOM re-scanning when rendering message batches or loading history.
    • FX effects are now applied instantly as each message is created, ensuring smoother performance.
    • Internal optimization only — no visual or functional changes for end users; improves runtime speed and stability.
  • 1.2.3 – Safe Init FX Engine integration & DOM performance optimization
    • Added a safe integration hook for seamless compatibility with the Init FX Engine plugin.
    • The chat engine now automatically triggers replaceFXKeywordsInDOM() only when new messages are loaded.
    • Added a typeof safety check before calling the external plugin to prevent runtime errors if inactive.
    • Introduced new helper safeRunFX() – executes asynchronously via requestIdleCallback or requestAnimationFrame to avoid UI blocking.
    • Implemented scoped internal function initChatboxReplaceFXKeywords() – limits DOM scanning to .init-chatbox-text elements only for higher efficiency.
    • Rewrote the FX keyword parser using TreeWalker for deeper DOM traversal and improved regex accuracy.
    • Eliminated duplicate link generation and ensured idempotent behavior – multiple scans yield consistent results.
    • Significantly improved performance when rendering or loading large batches of chat messages.
    • Internal enhancement only — no visual changes; improves plugin compatibility and runtime stability.
  • 1.2.2 – Removed redundant ban check in shortcode
    • Hotfix: Removed redundant init_plugin_suite_chat_engine_check_user_banned() call inside the [init_chatbox] shortcode.
    • Prevented duplicate banned message display when a user is restricted.
    • Fixed potential timezone inconsistencies in ban expiry rendering.
    • Simplified shortcode rendering flow to fully align with the controller-level ban middleware.
    • Internal cleanup only — no user-facing behavior changes.
  • 1.2.1 – Role-based word filter exceptions
    • Added a new option “Word Filter Exceptions” under the Security tab.
    • Allows selecting user roles that can bypass blocked-word filtering (default: Administrator).
    • Enhanced sanitization and validation to ensure only valid roles are saved.
    • Updated message validation logic so exempted roles can send messages containing blocked words.
    • Guests and non-exempt roles remain fully subject to the word filter system.
    • Included Vietnamese translations for all new UI strings.
  • 1.2.0 – User metadata enrichment filter
    • Added new filter init_plugin_suite_chat_engine_enrich_message_row to extend user data in each chat message.
    • Allows themes/plugins to attach custom metadata (e.g. roles, VIP status, moderator rights) without modifying core logic.
    • Improves flexibility and forward-compatibility of the chat engine API, enabling richer UI integrations in the future.
  • 1.1.9 – Optional user profile link support
    • Added optional support for user profile links in chat message display names.
    • Introduced new profile_url field in API responses for registered users.
    • Provided frontend hook initChatEngineMessageElementHook to linkify display names if desired.
    • Feature is opt-in only: by default, names remain plain text for full backward compatibility.
  • 1.1.8 – Security patch for /send endpoint
    • Strengthened security for /send endpoint when user is logged in: strictly validate X-WP-Nonce.
    • Sanitized input using wp_strip_all_tags() for both message and display_name before storing.
    • Rejected empty or invisible-only messages (whitespace/zero-width/control characters) to block “blank spam”.
    • Enforced server-side message length limit before insert, consistent with UI constraints.
    • Maintained output safety: all messages are still filtered with wp_kses_post() before returning.
    • Kept rate-limit and banned-user checks in permission_callback for anti-abuse defense.
  • 1.1.7 – Restrict auto-linking to current domain
    • Updated URL auto-linking logic – links are only converted when the domain matches the current site.
    • Prevented external or mismatched-domain URLs from being auto-converted into <a> tags, reducing spam risk.
    • Preserved support for all other text formatting syntaxes (*bold*, `italic`, ~strikethrough~, …).
    • Improved content safety and reliability when rendering chat messages.
  • 1.1.6 – Codebase standardized to WPCS
    • Updated the entire codebase to fully comply with WordPress Coding Standards (WPCS).
    • Refactored inline documentation and code formatting for better readability and maintainability.
    • Ensured consistent coding style aligned with official WordPress best practices.
    • Performed minor internal cleanups to improve long-term stability.
  • 1.1.5 – Smarter Text Formatting Rules
    • Improved text formatting logic with smarter boundary detection for markdown-style syntax.
    • New rules require a whitespace boundary or string start/end to trigger formatting.
    • Fixed incorrect formatting inside code identifiers – e.g., init_live_search no longer bolds live.
    • Resolved formatting issues in mathematical expressions – e.g., 1*2*3 = 6 no longer bolds the number 2.
    • Updated regex logic to use OR-based boundaries: formatting applies if either side has whitespace.
    • Better support for edge cases like *start* and *end* – both are now properly formatted.
    • Maintains strict validation: no spacing allowed immediately after opening or before closing markers.
    • Enhanced handling of regex capture groups to support multiple formatting patterns consistently.
    • Increased formatting accuracy while maintaining full backward compatibility.
    • Improved user experience with more intuitive and predictable formatting behavior.
  • 1.1.4 – Hook system for message formatting
    • Added extensible hook system for enhanced message formatting and customization.
    • Introduced window.initChatEngineFormatHook to support custom formatting (e.g., sticker rendering, text styles).
    • Added window.initChatEngineMessageElementHook for post-processing message elements after creation.
    • Upgraded the message rendering pipeline to allow external plugins and theme overrides.
    • Improved integration with the Init Manga sticker system and other theme-level features.
    • Maintained backward compatibility while offering flexible extension points for developers.
    • Optimized hook execution with robust error handling to prevent message rendering issues.
  • 1.1.3 – Network stability and real-time timestamp updates
    • Advanced request management system with AbortController to prevent duplicate API calls
    • Real-time timestamp updates: message timestamps now refresh automatically (e.g., “5 minutes” → “6 minutes”)
    • Enhanced network error handling with exponential backoff and smart retry mechanism
    • Improved connection stability for slow/unstable networks with intelligent polling intervals
    • Request deduplication system prevents message loading conflicts and UI inconsistencies
    • Network status monitoring with automatic reconnection when connection is restored
    • Better error recovery with consecutive error tracking and adaptive polling frequency
    • Performance optimizations: reduced unnecessary API calls and improved memory management
    • Enhanced user experience with clearer loading states and connection status indicators
    • Robust offline/online detection with proper fallback handling for network interruptions
  • 1.1.2 – Full dark mode system upgrade
    • Complete overhaul of the dark mode system with full theme support
    • Upgraded CSS variable system with separate sets for light and dark themes
    • Dark mode now applies to all components: messages, inputs, buttons, scrollbars, modals
    • Smart system preference detection via @media (prefers-color-scheme: dark)
    • Improved contrast and accessibility for dark backgrounds
    • Smooth theme transitions with 0.3s animation for a better UX
  • 1.1.1 – Critical Bug Fixes and User Experience Improvements
    • Resolved infinite scroll loop bug causing chat interface crashes.
    • Fixed “Load more” button toggle conflicts in middle scroll positions (50-200px from top).
    • Implemented debounced scroll handling with 100ms stabilization timer.
    • Added scroll direction tracking to prevent unnecessary auto-load triggers.
    • Improved scroll zone boundaries: auto-load (<30px), manual button (30-200px), hide (>300px).
    • Enhanced state management to prevent redundant UI updates and reduce layout thrashing.
    • Added proper timer cleanup on page unload to prevent memory leaks.
    • Optimized scroll performance with passive event listeners and reduced DOM queries.
    • Fixed scroll button visibility logic to prevent flickering during rapid scrolling.
    • Strengthened error handling for edge cases in scroll position calculations.
    • Added support for utility classes (uk-hidden, hidden, .ice-hidden).
    • Automatic CSS framework detection and appropriate hide/show class usage.
    • Fixed character counter not working for guest users due to duplicate ID names.
    • Improved “Load more” button display logic to be more generous but still safe (expanded zone to 400px).
    • Faster UI response time: reduced debounce to 80ms, auto-load delay to 150ms.
  • 1.1.0 – Major admin interface and security update
    • Upgraded admin panel with a tabbed layout (Basic, Security, Advanced).
    • Added a message management system with search and pagination.
    • Implemented user/IP ban system with expiration and unban options.
    • Introduced statistics dashboard with activity charts and engagement data.
    • Added rate limiting controls for messages per minute (fully configurable).
    • Integrated word filtering system with custom blocked word list.
    • Provided automatic and manual cleanup tools for old messages.
    • Redesigned admin UI with a professional look and connection status indicator.
    • Improved user feedback with better error messages and mobile-friendly layout.
    • Added REST API endpoints for remote moderation actions.
    • Implemented caching and full nonce verification for admin operations.
    • All settings now include input validation and sanitization.
    • Full internationalization support with a complete .pot file and Vietnamese translation included.
  • 1.0.3 – Message text formatting support
    • Added inline formatting for message content using simple syntax:
      *bold*, `italic`, ~strikethrough~, ^highlight^, _colored_.
    • Formatting parser runs locally on each message element, no global DOM scan.
    • Reused existing .init-fx-highlight-text class from Init FX Engine to avoid CSS duplication.
    • Removed global escapeHTML() from message body to allow safe formatted HTML output.
    • Refactored message rendering logic to support formatting in a clean and efficient way.
  • 1.0.2 – UI/UX improvements and avatar support
    • Added support for user avatars (for logged-in users), with fallback rendering when no image is available.
    • Implemented blinking document title when new messages arrive and the tab is not focused.
    • Introduced anti-spam cooldown and click-lock to prevent sending duplicate messages.
    • Refined guest name workflow: clearer display and smooth rename flow.
    • Redesigned message HTML structure for better layout and avatar integration.
    • Cleaned up and refactored JavaScript code for maintainability and clarity.
  • 1.0.1 – Smart polling system
    • Added dynamic polling system that adjusts fetch interval based on user activity and tab focus (3.5–10s).
    • Notification API support – alerts users when new messages arrive while the tab is unfocused.
    • Improved scroll behavior: auto-scrolls when new messages appear, and shows a “↓ New Message” button if user has scrolled up.
    • Detects typing and input focus to optimize polling frequency in real time.
    • Better guest name handling via localStorage, with in-UI rename option.
    • Enhanced message history loading – preserves scroll position without jumping.
    • Refactored JavaScript: cleaner structure, better performance, and easier to extend.
  • 1.0.0 – First Release of Init Chat Engine
    • Initial release of the community chat plugin using REST API.
    • Supports guest messaging mode – no login required.
    • Settings page allows configuring message length limit and guest chat permission.
    • Main shortcode renders the chatbox UI, with theme template override support.
    • Stores chat history and supports smooth scrolling for loading older messages.
    • Optimistic message sending (shown instantly, confirmed later) with fallback handling.
Made with in HCMC.

Comments


  • No comments yet.

Init Toolbox

Press Ctrl + \ on desktop, or swipe left anywhere on mobile.

Login