Jump to content

TextformatterExternalRedirect


BitPoet
 Share

Recommended Posts

Here's a little text formatter module that redirects all external links found in a textarea (e.g. for hit counting) to a given URL.

TextformatterExternalRedirect

GitHub repo

As TextFormatters do, this module modifies the contents of the textarea (HTML) at rendering time. It prepends the given URL to the link address for external links (http and https), optionally makes sure that the link is opened in a new window and allows you to add css classes to such links.

All options can be configured in the module's configuration settings.

Usage:

  • Download the zip archive and extract it to site/modules, the rename the top folder to TextformatterExternalRedirect
  • Go to the backend and select "Modules" -> "Refresh", then click "Install" for "External Link Redirect"
  • Click "Settings" and configure the module
    elr_config.png.38a966d0760cc3deb3835b4c3b63a672.png
  • Go into the field configuration for the field(s) you want this formatter to apply to and add it from the dropdown
    elr_fieldconfig.png.6e7e8597431294e6e75707d1b25835c4.png
  • Done, now any external links in the configured fields will have the configured settings applied

Feel free to leave feedback and post and questions you have here.

 

  • Like 8
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...