Skip to content

How to install plugins

Michael Fairchild edited this page Oct 29, 2015 · 1 revision

For this tutorial we will explain how to install [metric_pa11y](the https://github.com/UNLSiteMaster/metric_pa11y) plugin. The same process can generally be used to install other plugins.

A little bit about plugins

It would probably be a good thing to discuss some SiteMaster specific terminologically. However, don't get hung up on this, because it really isn't that important if you are just installing plugins. Plugins come in three types for SiteMaster:

  1. Metrics - A specific type of plugin that audits webpages.
  2. Themes - A specific type of plugin that themes the SiteMaster application.
  3. Plugins - A generic type of plugin that can do all sorts of things (auth, theme, customization).

The same install process is used for each type of plugin.

First thing: Copy the plugin

Place the folder for the plugin in the plugins directory.

For example, place the metric_pa11y plugin in the plugins directory, so that the path plugins/metric_pa11y exists.

Next up: Follow plugin specific requirements

Plugins will usually have a README file which will outline what software/libraries need to be installed, how to install them. The README file will also describe the configuration options for the plugin.

Take a look at the README and follow its instructions. For example, the metric_pa11y plugin will require you to:

  1. Install the pa11y system library
  2. Install composer libraries

Next, configure the plugin

In order for your plugin to install, you will need to define it in the Config::set('PLUGINS', ... array in config.inc.php. That array already exists, don't create a new one or remove the old one, simply modify it to include the new plugin.

Finally, install the plugin

This should be the easiest part. Run the following command from the root of the SiteMaster project

php scripts/update.php

SUCCESS!!

Run a new site scan and see the new plugin at work!

Clone this wiki locally