External tools configuration

The External tools configuration screen allows you to configure the settings for external tools integrated into Matrix. To access this screen, click on the system configuration icon in the top header of the admin interface.

system config toolbar button

From this screen, click on the screen switcher drop-down list in the top right-hand corner and select External tools configuration.

The tools that can be integrated are as follows:

HTML tidy

This tool will check the HTML source code of the WYSIWYG editors to ensure that it is valid. If it is not valid, it will try to correct the code.

HTML tidy accessibility checker

This tool will check the accessibility of the content entered into a WYSIWYG editor following WCAG 1.0 standards.

Apache Tika

This tool will index the contents of PDF and Microsoft Word documents that are uploaded into the system. If a search is then performed, for example, through a search page, the content of the PDF and Microsoft Word files will also be searched.

This tool replaces the deprecated pdftohtml and Antiword tools previously used for this purpose. For more information, visit https://tika.apache.org/.

ExifTool

This tool will extract any metadata from an image that has been uploaded into the system. This metadata can be created using tools such as Adobe Photoshop. ExifTool supports many different metadata formats, including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP, and ID3. For more information, visit https://exiftool.org/.

Markdown and markdownify

These tools allow you to configure and use the markdown component within the assets.

getID3

This tool will extract metadata from a multimedia file uploaded into the system, such as an MP3 or FLV file. For more information, visit the getID3 site: http://getid3.sourceforge.net/.

OGG metadata extraction

This tool will extract metadata from an OGG video file uploaded into the system.

Virus checker

This tool will scan file assets for any potential threats. If the virus checker detects an infected file is uploaded, the file will be disallowed, and the user will be informed.

Mollom spam detector

This tool allows you to use Mollom’s advanced spam prevention service to analyze and manage the form submissions of a site. For most of these tools to work within Matrix, they need to be installed on the server.

Once installed, the path for each tool must be set in the system’s tools.inc configuration file, located in the /data/private/conf directory.

When a tool has been configured correctly, it can be activated.

Only the system’s root user can activate the external tools on this screen.

To access the External tool configuration screen:

  1. Select the System configuration icon in the top right-hand corner of the screen. A drop-down list will appear.

  2. Select External tools configuration; the screen will appear.

Activate external tools

This section allows you to enable the various system tools.

The path to a tool must be correctly configured before the tool can be enabled.

The fields available are as follows. These section are only available to the system’s root user.

Enable HTML tidy

Select Yes from the list to enable HTML tidy. This will only work if the correct path is specified in the Path to HTML tidy field.

HTML tidy accessibility check level

Select the level of accessibility checking to perform on the content. The options available include 0 (HTML tidy classic), priority 1, priority 2, and priority 3 accessibility checks. Further information can be found at the following URLs:

HTML standard to use for HTML tidy

Select the doctype standard used by the HTML tidy tool to evaluate the content of a WYSIWYG editor. The options available in this field are:

  • HTML 4.01 transitional

  • HTML 4.01 strict

  • HTML 4.01 frameset

  • XHTML 1.0 transitional

  • XHTML 1.0 strict

  • XHTML 1.0 frameset

  • XHTML 1.1

    XHTML is not supported by Matrix’s WYSIWYG editor. As a result, if an XHTML standard is selected in this field, the cleaned content will be available in the frontend output only.

    By default, the HTML 4.01 transitional standard will be used on the HTML tidy tool. For more information, refer to the WC3’s doctype declarations documentation.

Enable Apache Tika

Select Yes from the list to enable file keyword extraction and indexing using the Apache Tika tool.

Enable image metadata extraction

Select Yes from the list to enable the ExifTool.

Enable markdown

Select Yes from the list to enable the markdown tool.

Enable Markdownify

Select Yes from the list to enable the Markdownify tool.

Enable getID3 extraction

Select Yes from the list to enable getID3 extraction.

Enable OGG metadata extraction

Select Yes from the list to enable OGG metadata extraction.

Enable virus checker

Select Yes from the list to enable the virus checker.

WYSIWYG editor tools

This section allows you to set up the tools for the system’s WYSIWYG editor.

The fields that are available in this section are outlined below:

Path to HTML tidy

The path to the directory where the HTML tidy tool has been installed. If the path is incorrect or the tool has not been installed, a red error message will appear under the field.

Spell checker language

This field allows you to change the dictionary used by the pspell spell checker. This spell checker in used by Matrix in such areas as the WYSIWYG editor spell checking.

You must have already enabled support for the particular language dictionary in pspell; otherwise, this will not work.

File keyword indexing

This section displays the settings of the Apache Tika file keyword indexing tool.

Path to Java runtime

The path to the directory where the java runtime environment has been installed.

Path to Apache Tika jar

The path to the directory where the Apache Tika jar file is located. Apache Tika requires Java 6 or later to be installed on the server.

Image metadata extraction

This section displays the settings of the ExifTool. The fields that are available in this section are outlined below:

Path to ExifTool

The path to the directory where the ExifTool has been installed. If the path is incorrect or the tool has not been installed, a red error message will appear under the field.

Markdown tools

This section displays the settings of the markdown tools for the markdown component.

The fields that are available in this section are outlined below:

Path to markdown

The path to the directory where the markdown tool has been installed. If the path is incorrect or the tool has not been installed, a red error message will appear under the field.

Path to Markdownify

The path to the directory where the Markdownify tool has been installed.

If the path is incorrect or the tool has not been installed, a red error message will appear under the field.

getID3 extraction

This section displays the settings of the getID3 extraction tool.

The fields that are available in this section are outlined below:

Path to getID3

The path to the directory where the getID3 tool has been installed. If the path is incorrect or the tool has not been installed, a red error message will appear under the field.

OGG metadata extraction

This section displays the settings of the OGG metadata extraction tool.

The fields that are available in this section are outlined below:

Path to OGG metadata library

The path to the directory where the OGG (Vorbis/Theora) PHP metadata library has been installed. If the path is incorrect or the tool has not been installed, a red error message will appear under the field, as shown in the figure above.

More information can be found at: http://opensource.grisambre.net/ogg/.

Virus checker

This section allows you to set up the virus checker.

The fields that are available in this section are outlined below:

Virus checker type

Select which antivirus checker to use. You can choose between the Clam Antivirus and F-Prot Antivirus tools. By default, this field is set to Clam Antivirus. This option requires the clamdscan client to be installed on the server.

Path to virus checker

The path to the directory where the virus checker tool has been installed.

If the path is incorrect or the tool has not been installed, a red error message will appear under the field.

Javascript configuration

This section allows you to set up a third-party JavaScript installation on your system. This configuration enables the use of server-side JavaScript processing on REST resource JavaScript assets.

Read the JavaScript API documentation for more information.

The fields that are available in this section are outlined below:

Javascript command

The path to the directory where the JavaScript engine has been installed. If the path is incorrect or the tool has not been installed, a red error message will appear under the field.

To include ECMAscript for XML (E4X) support in a SpiderMonkey JavaScript installation, use /usr/bin/js -x as the JavaScript command path.
Server-side JavaScript timeout

Time in seconds before a server-side JS process will time out. For example, if this value is set to 10 seconds and a server-side JS process runs that takes 12 seconds, Matrix will terminate the process before the server-side JS can finish. This is to ensure that things like infinite loops created by the JS do not stop the interface from working.

Mollom spam detector

This section allows you to set up Mollom spam detection on your system. Mollom is an advanced spam prevention service that analyses the quality of content posted to websites and automatically determines whether submissions are spam (unwanted content) or ham (legitimate content). If Mollom is unsure whether a submission is spam, a CAPTCHA will be presented for verification.

To use Mollom’s spam detection service, you will need to obtain a registered user account at the Mollom website; http://mollom.com/.

The fields that are available in this section are outlined below:

Test mode

Select whether to use Mollom spam detection for testing purposes only. If this field is set to Yes, posted content can be tagged as ham, spam, or unsure without affecting the user’s reputation. By default, this field is set to No.

Public key

Enter the public key of your registered Mollom user account.

Private key

Enter the private key of your registered Mollom user account.

Valid keys?

Whether or not the details supplied in the public and private key fields are valid.

Accept bypassed submission?

Select whether or not submissions will be accepted if Mollom fails to respond as expected. For example, if this field is set to No and Mollom fails to classify a submission as either ham, spam, or unsure, it will be rejected and not submitted on the site. By default, this field is set to Yes.

Once activated, Mollom protection can be configured for use on both the custom form and asset builder pages. Further spam-check options are available on the configuration screen of these assets.

Read the Asset builder page and the Custom form contents documentation for more information.

Squid cache

The Squid Cache section allows you to modify the settings for clearing Squid Cache within Matrix, for example, through the clear Squid Cache tool or the clear Squid Cache trigger action.

Read the Clear Squid cache tool and the Trigger actions documentation for more information.

The following fields are available:

Hostnames

Enter the hostname of the Squid server. Multiple hosts can be specified separately on each new line.

The hostname(s) specified in this field are used in the clear cache command, as follows:

$ squidclient -h hostname -m purge $urls
$ squidclient -h proxy.example.com -m purge http://www.example.com
Path

The path to the Squid client within your Matrix system. By default, this will be set to /usr/bin/squidclient.

Port number

Enter the port number of the Squid client. By default, this field will be set to port 3128.

Options

Additional options are available to be included in the clear Squid Cache purge command. For example, entering -r -t 5 to this field will append these options to the clear cache command, as follows:

$ squidclient -h hostname -r -t 5 -m purge $URL

These additions will mean that this command will reload the URL, repopulating its cache, and have a timeout of five seconds.

The options available for appending the clear cache command are outlined in the table below.

Option Description

-P file

PUT request.

-a

Do NOT include Accept: header.

-r

Force cache to reload URL.

-s

Silent. Do not print data to stdout.

-v

Verbose. Print outgoing message to stderr.

-i IMS

If

-Modified

-Since time (in Epoch seconds)

-h host

Retrieve URL from cache on hostname. Default is localhost.

-l host

Specify a local IP address to bind to. Default is none.

-p port

Port number of cache. Default is 3128.

-m method

Request method, default is GET.

-t count

Trace count cache

-hops.

-g count

Ping mode, "count" iterations (0 to loop until interrupted).

-I interval

Ping interval in seconds (default 1 second).

-H 'string'

Extra headers to send. Use \n for new lines.

-T timeout

Timeout value (seconds) for read/write operations.

-u user

Proxy authentication username.

-w password

Proxy authentication password.

-U user

WWW authentication username.

-W password

Log output

If enabled, Matrix will print the entire output of any triggered Squid commands it does to the system log.

Trailing slash

Select whether the clear Squid Cache purge command should also clear selected URLs with an appended trailing slash. If this option is enabled and the cache is cleared for http://www.example.com, the cache will also be cleared for http://www.example.com/. By default, this option is disabled.

Add port to URL

Specify a port to add to each URL when submitted to squid. If you are running Matrix on a non-standard port behind squid, you may need to add the port back to the URL to clear its cache.

Sendmail

This section displays the Sendmail settings for the system’s Bulkmail server. You can configure the mail method used on the Bulkmail manager.

The fields that are available in this section are as follows:

Path

The file path to the Sendmail application, for example, /usr/sbin/sendmail.

Arguments

Additional function parameters for Sendmail.

SAML authentication

This section displays the settings of SAML authentication on your system.

The fields that are available in this section are outlined below:

SimpleSAMLphp path

The path to the directory where the simplesamlphp has been installed.

If the path is incorrect or the tool has not been installed, a red error message will appear under the field.

Google reCAPTCHA

This section allows you to set up Google’s free reCAPTCHA anti-bot service on your system for use on the custom form page and asset builder assets. Read Custom form contents for more information about the features available in custom form pages.

The fields that are available in this section are outlined below:

Site (public) key

Enter the global public key provided to you by Google reCAPTCHA.

Secret (private) key

Enter the global private key provided to you by Google reCAPTCHA.

hCaptcha

This section allows you to set up the hCaptcha anti-bot service on your system for use on the Custom form, Password reset page, Account manager page, and Asset builder page assets.

Read Custom form contents for more information about the features available in custom form pages.

Read the hCaptcha migration guide to learn more about obtaining the site and secret keys.

Site (public) key

Enter the global public key provided to you by hCaptcha.

Secret (private) key

Enter the global private key provided to you by hCaptcha.

Closure compiler

This section allows you to set up the closure compiler tool for merging and minification on the JS file folder asset. For more information, refer to the JS file folder chapter in the core assets documentation.

The fields that are available in this section are outlined below:

Path

The path to the directory where the compiler.jar has been installed.

This tool requires Java version 6 or above to be installed on your system to execute the jar file.

If the path is incorrect or the tool has not been installed, a red error message will appear under the field.

SSH RSA key

This section displays the SSH key that has been generated for the system. This key can be used on external services supporting SSH key authorization, such as setting up a git file bridge.

If an SSH key has not yet been generated on your system, you can use the generate_ssh_key.php script to generate the SSH RSA public/private key pair.