External Link Confirmation devmindslab/link-redirect-confirm

Require confirmation before opening external links posted in Flarum.

External Link Confirmation (Flarum)

This extension shows a confirmation modal before opening external links posted anywhere in the forum.

Features

  • Confirmation modal for external links
  • Whitelist support (domains without confirmation)
  • Automatically excludes the forum's own domain
  • Shows the destination URL in the modal

Installation

composer require devmindslab/link-redirect-confirm

Configuration

Set a whitelist in the Admin panel (comma-separated). Wildcards are supported via *.example.org.

By default, the forum's own domain is always allowed.

Whitelist behavior

Whitelisted domains skip the confirmation modal and open in the same tab. Non-whitelisted external links show the modal and open in a new tab after confirmation.

If you want whitelisted external links to also open in a new tab, you can optionally combine this extension with the Flarum extension walsgit/external-links-in-new-tab.

That extension forces all external links to open in a new tab and works well together with this confirmation extension.

You can install it via Composer using composer require walsgit/external-links-in-new-tab.

Translations

The extension ships with German and English translations located in resources/locale/de.yml and resources/locale/en.yml.

Additional languages can easily be added by copying en.yml and translating the strings.

Styling

You can fully customize the modal via LESS variables, e.g.:

  • --link-redirect-confirm-modal-max-width
  • --link-redirect-confirm-modal-padding
  • --link-redirect-confirm-modal-radius
  • --link-redirect-confirm-modal-bg
  • --link-redirect-confirm-header-bg
  • --link-redirect-confirm-title-color
  • --link-redirect-confirm-body-color
  • --link-redirect-confirm-overlay-bg
  • --link-redirect-confirm-buttons-gap

Versions

  • Version v1.0.4.

    Likely works with Flarum v1.8.12.

  • 4 additional versions.
  • Extension created.