Next DB 6.1: Auto-Updating Tables, Printing, Phone Layout and SEO Next Task 6.0.0: a task manager for Joomla Next Inventory 6.1.1: smoother Check Out, no more list limits, and much faster PHP2Shell: Is Your Joomla Site Safe? What to Do Today Introducing Next Boards: Kanban project and task boards for Joomla Building the Future of Joomla Extensions
NextSoftware

Expert Mode

The Expert Mode tab is for templates and extensions whose YouTube markup the 7 built-in patterns don't catch. It adds a custom regex pattern and a debug view.

Expert Mode tab with the Custom Regex Pattern field and the Debug Mode switch

Custom Regex Pattern

Setting Details
Field Custom Regex Pattern
Type Textarea
Default Empty

Paste a PHP regular expression (including delimiters and flags) that matches the HTML your video widget produces. The plugin runs it alongside the built-in patterns and blocks every match: it is removed for the overlay positions, and replaced by a placeholder in Inline (replace video) mode.

/<div class="my-video-wrapper"[^>]*>.*?<\/div>/is

Rules for a safe pattern:

  • Include delimiters — start and end with / (or another delimiter)
  • Add the is flags — i (case-insensitive) and s (dotall, so . matches newlines)
  • Be non-greedy — use .*? rather than .* so one match doesn't swallow the rest of the page
  • Escape metacharacters — forward slashes (\/), dots (\.), etc.
  • Mind nested markup — <div>.*?</div> stops at the first inner </div>. If the widget nests elements, match the element that actually loads YouTube (the <iframe> or <script>) instead of the whole wrapper

A malformed pattern fails silently: it matches nothing and your site keeps working.

Debug Mode

Setting Details
Field Debug Mode
Type Toggle (Yes/No)
Default No

When enabled, the plugin adds a box near the bottom of the page that lists every pattern (built-in or custom) that matched on the current page and how many times.

The debug box is shown only to logged-in Super Users. Ordinary visitors never see it, so you can check a live page by logging in on the front end. It still adds work to every page, so turn it off when you are done.

Use it to:

  • Confirm the plugin is catching your videos
  • Discover which built-in pattern already covers an embed
  • Verify a new custom pattern matches before relying on it

Workflow for an Undetected Video

  1. Log in on the front end as a Super User, enable Debug Mode and load the page with the video — note whether any pattern matched
  2. If nothing matched, open the page source and copy the exact HTML wrapping the video
  3. Build a regex against that HTML following the rules above
  4. Paste it into Custom Regex Pattern, save, and reload — the debug box should now report a match
  5. Turn off Debug Mode

All Extensions