=== Dialogoo Chat for Joomla ===

Embed a live video chat and webcam chat room on your Joomla site — multi-user
rooms, private messaging, webcam video, and moderation — fully hosted by
Dialogoo. No chat server, database, or WebSocket infrastructure to run
yourself.

== Requirements ==

* Joomla 5.0 or later (built and tested against Joomla 6)
* PHP 8.1 or later
* A Dialogoo account and Site Key — sign up free at https://dialogoo.com/register

== Installation ==

1. In the Joomla administrator, go to System -> Manage -> Install.
2. Upload dialogoochat.zip (Upload & Install tab), or install from a folder
   if you've extracted it locally.
3. Once installed, go to System -> Manage -> Plugins and open "Dialogoo Chat".
4. Enable the plugin (it installs disabled, like any Joomla plugin).
5. Paste your Site Key (found in your Dialogoo panel under My chat ->
   Integration) and Save & Close.

== Usage ==

Add the chat to any article, category description, or other content-prepare-
aware field with the {dialogoochat} tag:

    {dialogoochat}

Every attribute is optional and overrides the plugin's own defaults for that
one instance:

    {dialogoochat site="YOUR_SITE_KEY" width="100%" height="800px" room="support" class="my-class"}

* site    — use a different Dialogoo Site Key than the plugin's default
* width   — any CSS length (100%, 640px, 80vw...); falls back to the
            plugin's Default width param
* height  — same as width, falls back to Default height
* room    — land visitors directly in one specific room (see room slugs
            under Rooms in your Dialogoo panel); an unknown slug is
            silently ignored, falling back to your chat's default room
* class   — an extra CSS class on the embedded <iframe>

== Floating chat bubble ==

Under the "Floating chat bubble" fieldset in the plugin's own settings, turn
on "Enable" to show a chat bubble sitewide, independent of the {dialogoochat}
tag — no article edits needed. Optionally set a different "Bubble Site Key"
if the bubble should open a different chat than the tag does; leave it empty
to reuse the main Site Key.

== Full screen chat page (no template header/footer) ==

Joomla already has a built-in way to show any page with no site template
chrome — you don't need anything extra from this plugin for that:

1. Create an article containing just {dialogoochat}.
2. Create a menu item (Menus -> [your menu] -> New) of type "Single Article"
   pointing at that article.
3. Either add &tmpl=component to that menu item's link, or open the menu
   item's "Page Display" tab and turn off the modules/positions you don't
   want shown for it.

== JS webhooks (advanced) ==

Every Dialogoo embed — including this plugin's {dialogoochat} tag and
floating bubble — already carries window.DialogooChat, a small JS hook API
your own site's Custom JS (configured in your Dialogoo panel, under
Developer) can use to react to, or cancel, chat actions: sending a message,
starting/stopping a webcam, sending or receiving a private message. Nothing
to install or configure in this plugin itself — it works automatically
because it's part of the embedded chat page. See the full guide and code
samples at https://dialogoo.com/integration#code-hooks.

== Security ==

* Every tag attribute and plugin param is sanitized before use: the Site Key
  and room slug are reduced to a safe character set, width/height are
  validated against a strict CSS-length pattern, and every value is
  HTML-escaped again at output.
* The plugin never collects, stores, or transmits any visitor data itself —
  it only outputs an <iframe> (for {dialogoochat}) or a <script> tag (for the
  floating bubble) pointing at dialogoo.com, exactly like embedding any other
  third-party content.
* The "no Site Key configured" setup reminder is only ever shown to a
  logged-in user who could actually fix it (checked via Joomla's own ACL,
  core.manage on com_plugins) — a regular visitor never sees it, just no
  chat.

== External services ==

This plugin embeds content and functionality hosted by Dialogoo
(dialogoo.com), a third-party live chat service:

* The {dialogoochat} tag loads https://dialogoo.com/chat inside an <iframe>.
* The optional floating chat bubble loads a script from
  https://dialogoo.com/assets/js/embed.js, which itself opens a
  https://dialogoo.com/chat iframe when a visitor clicks it.

When a visitor's browser loads either of these, it connects directly to
dialogoo.com — the same as visiting any page that embeds third-party content.
Dialogoo's terms of use: https://dialogoo.com/cgu
Dialogoo's legal notice / privacy information: https://dialogoo.com/legal

== Changelog ==

= 1.0.1 =
* Documented the JS webhooks (window.DialogooChat) available automatically
  through any Dialogoo embed, including this plugin's — no code change,
  documentation only.

= 1.0.0 =
* Initial release: {dialogoochat} content tag and optional floating chat
  bubble.

== License ==

GPLv2 or later — see LICENSE.txt.
