====== Installing and managing plugins ======
Plugins add features to Admidio: a birthday list or a calendar on the overview page, a member search,
statistics, a language switcher and much more. Since version 6.0, Admidio has a **plugin manager**.
With it you install, configure, update and remove plugins in your browser. You do not have to unpack
files or upload them by FTP.
There are two ways to get a plugin:
* [[#install_a_plugin_from_the_plugin_directory|From the plugin directory]]: Admidio shows the plugins that are published for your version and installs one with a single click.
* [[#install_a_plugin_from_a_file|From a file]]: you download the ZIP file of a plugin yourself and upload it.
Either way, the plugin is **installed and enabled at once**.
This page describes Admidio **6.0 and later**. Plugins for Admidio 5.0 and older do not work with
6.0: see [[#plugins_for_older_admidio_versions|Plugins for older Admidio versions]].
===== Before you start =====
* You have to be an **administrator** of Admidio. Only administrators see the plugin manager.
* Admidio needs **permission to write** to its folder ''plugins'' on the server. This is the case for most installations. If it is not, Admidio says so when you install a plugin. Then see [[#install_a_plugin_by_ftp|Install a plugin by FTP]].
* Only install plugins from sources you trust. A plugin runs inside Admidio and can access all of its data.
===== Open the plugin manager =====
Open **Administration → Plugin manager** in the menu.
{{ :en:2.0:plugins:01_plugin_manager.png?direct&600 |The plugin manager in the menu}}
The plugin manager lists all plugins of your installation in groups:
^ Group ^ Meaning ^
| **Enabled** | The plugin is installed and active in this organization. |
| **Update available** | A newer version of the plugin is there. Update it before you use it again. |
| **Available extensions** | The plugin is there, but not active in this organization. |
| **Plugins whose files are missing** | Admidio still knows the plugin, but its folder on the server is gone. Remove it, or upload its files again. |
| **Incompatible plugins** | The plugin cannot be used with this Admidio version. The red text says why. |
Each line shows the version of the plugin's files (//Plugin version//) and the version that is
installed in the database (//Installed version//). The icons at the end of the line are the actions:
**⚙** opens the settings, **…** opens a menu with the change history and **Remove plugin**.
===== Install a plugin from the plugin directory =====
- In the plugin manager, click **Add from plugin directory**. Admidio shows the plugins that are published for your Admidio version. Plugins you already have are marked **Installed**. {{ :en:2.0:plugins:02_plugin_directory.png?direct&600 |The Admidio plugin directory}}
- Click the name of a plugin to open its web page with more information. Click **Install** beside the plugin you want. {{ :en:2.0:plugins:03_directory_install_button.png?direct&600 |The Install button}}
- Confirm with **Yes**. {{ :en:2.0:plugins:04_directory_install_confirm.png?direct&600 |Confirming the installation}}
- Admidio downloads the plugin, checks it, installs it and enables it for your organization. Wait until it says "The plugin ... was installed and enabled". {{ :en:2.0:plugins:05_directory_install_done.png?direct&600 |The plugin was installed and enabled}}
- The plugin is now listed under **Enabled** in the plugin manager. {{ :en:2.0:plugins:06_list_installed.png?direct&600 |The new plugin in the plugin manager}}
The plugin works at once. The //Search member// plugin of this example, for instance, adds a search
box to the overview page:
{{ :en:2.0:plugins:07_overview_result.png?direct&600 |The plugin on the overview page}}
Most plugins have settings. Check them now: see [[#change_the_settings_of_a_plugin|Change the settings of a plugin]].
The list is loaded from admidio.org at most once a day. Click **Refresh** to load it now. If the list
cannot be loaded, for example because your server may not connect to the internet, Admidio says so.
Installing from a file still works.
===== Install a plugin from a file =====
Use this for a plugin that is not in the plugin directory, or for a version you received from the
author.
- **Download the ZIP file** of the plugin to your computer, for example from its page in the [[en:plugins:index|plugin directory]] or from the releases of the plugin on GitHub. Do **not** unpack it.
- In the plugin manager, click **Upload plugin file**.
- Click **Choose File** and select the ZIP file. Leave **Replace the installed plugin** switched off. Click **Upload plugin file**. {{ :en:2.0:plugins:08_upload_file_chosen.png?direct&600 |The plugin file is selected}}
- Admidio checks the file, unpacks it into the folder ''plugins'', installs the plugin and enables it for your organization. {{ :en:2.0:plugins:09_upload_done.png?direct&600 |The plugin was installed and enabled}}
If Admidio refuses the file, the message tells you why. The most common reasons:
* **The file is not a ZIP archive**, or it contains more than one folder. Download the original file again and upload it without unpacking it.
* **The archive contains no plugin.json**: the plugin was written for Admidio 5.0 or older. See [[#plugins_for_older_admidio_versions|Plugins for older Admidio versions]].
* **The plugin already exists**: a plugin with the same name is already there. To replace it with the version from the file, switch on **Replace the installed plugin** and upload again. Its settings and its data are kept.
===== Install a plugin by FTP =====
If Admidio may not write to its folder ''plugins'', install the plugin by hand:
- Unpack the ZIP file on your computer. You get a folder named after the plugin, for example ''search_member''.
- Upload this folder into the folder ''plugins'' of your Admidio installation by FTP. The result must be ''plugins/search_member/plugin.json''.
- Open the plugin manager. The plugin is listed under **Available extensions**. Click its switch to install and enable it.
===== Change the settings of a plugin =====
Click **⚙** (//Plugin preferences//) beside an enabled plugin. Change the settings and click **Save**.
{{ :en:2.0:plugins:10_settings_dialog.png?direct&600 |The settings of a plugin}}
You find the same settings in **Preferences**, usually on the tab //Extensions// or //Overview
extensions//. Many plugins have a setting **Plugin access**: it decides whether everybody, only
logged-in members or nobody sees the plugin.
The settings belong to the organization: each organization of your installation has its own.
===== Disable and enable a plugin =====
The switch at the start of the line turns a plugin on and off **for this organization**. Click it once
to disable the plugin.
{{ :en:2.0:plugins:11_toggle_enabled.png?direct&600 |The switch of an enabled plugin}}
The plugin moves to **Available extensions**. It is no longer shown, but its settings and its data are
kept. Click the switch again to enable it.
{{ :en:2.0:plugins:12_toggle_disabled.png?direct&600 |A disabled plugin}}
Disabling is always safe. If you only want to stop using a plugin for a while, or in one of several
organizations, disable it instead of removing it.
===== Update a plugin =====
When the plugin directory publishes a newer version of a plugin, Admidio shows **↻** (//Update plugin//)
beside it. When the files of a plugin on the server are already newer than its database, for example
after you replaced them, the plugin is listed under **Update available**, with a yellow ⚠ beside the
installed version. Such a plugin is **not active** until it is updated.
- Click **↻** (//Update plugin//) beside the plugin. {{ :en:2.0:plugins:13_update_available.png?direct&600 |A plugin with an update}}
- Confirm with **Yes**. {{ :en:2.0:plugins:14_update_confirm.png?direct&600 |Confirming the update}}
Admidio downloads the new version if necessary and updates the database of the plugin. The settings and
the data of the plugin are kept.
A version marked **beta**, **alpha** or **rc** is a test version. Admidio asks again before it installs
one.
To update a plugin from a file, upload the new ZIP file with **Replace the installed plugin** switched
on (see [[#install_a_plugin_from_a_file|Install a plugin from a file]]), then click **↻** in the
plugin manager.
===== Remove a plugin =====
Removing a plugin **deletes all its data and its files**, in **every** organization of your
installation. This cannot be undone. If you only want to stop using a plugin, disable it instead.
- Click **…** beside the plugin and choose **Remove plugin**. {{ :en:2.0:plugins:15_remove_menu.png?direct&600 |Remove plugin in the menu}}
- Read the message. It names the organizations that still use the plugin. Confirm with **Yes**. {{ :en:2.0:plugins:16_remove_confirm.png?direct&600 |Confirming the removal}}
- Admidio removes the plugin. {{ :en:2.0:plugins:17_remove_done.png?direct&600 |The plugin was removed}}
The plugins that come with Admidio cannot be removed, because the next Admidio update would bring them
back. They show a shield icon instead of **Remove plugin**. Disable them if you do not want them.
===== Plugins for older Admidio versions =====
Plugins for Admidio 5.0 and older do not have a file ''plugin.json'' and do not work with Admidio 6.0.
The plugin manager lists them under **Incompatible plugins**:
{{ :en:2.0:plugins:18_incompatible.png?direct&600 |A plugin for an older Admidio version}}
* If the plugin directory offers a version for Admidio 6.0, the plugin manager shows **Update to the current version** beside the old plugin. Click it: Admidio replaces the old files and takes over the data and, where the plugin supports it, the settings of the old version.
* Otherwise, look for a new version on the plugin's page in the [[en:plugins:index|plugin directory]] and install it [[#install_a_plugin_from_a_file|from a file]] with **Replace the installed plugin** switched on, or ask the author for one.
* If you no longer need the plugin, remove it with the trash icon.
===== If something goes wrong =====
* **"The plugin ... is not loaded because it crashed"**: a plugin caused an error that stopped Admidio. Admidio no longer loads it, so that the rest keeps working; it stays enabled. The message is shown to administrators. Update the plugin, or ask its author for help, and then click **Try again**. A new version of the plugin or of Admidio is tried automatically.
* **"This plugin needs the module ..., which is switched off"**: the plugin works with an Admidio module, for example the events, that is switched off in the preferences. Switch the module on, and the plugin works again.
* **"The plugin ... must be updated before it can be used"**: open the plugin manager and click **↻** beside the plugin.
* **"The list of plugins published for Admidio could not be read"**: your server cannot reach admidio.org. Download the plugin on your computer and [[#install_a_plugin_from_a_file|install it from a file]].
* **Every change is recorded.** Click **…** → **Change history** beside a plugin to see who installed, configured, enabled or disabled it and when.
===== See also =====
* [[en:plugins:index|The Admidio plugin directory]]: all published plugins
* [[update_new|Updating Admidio]]
* [[en:entwickler:plugin_development|Writing a plugin]]: for developers