Documentation

Plugins

Overview

Plugins serve a variety of purposes. As modules enhance the presentation of the final output of the Web site, plugins enhance the data and can also provide additional, installable functionality. Plugins enable you to execute code in response to certain events, either Joomla! core events or custom events that are triggered from your own code. This is a powerful way of extending the basic CMS functionality.

See System Events for a list of core plugin events.

See Component Events for a list of component plugin events.

Core Types

Plugins are managed at a group level that is defined in the plugin's XML manifest file. While the number of possible types of plugins is almost limitless, there are a number of core plugin types that are used by the CMS. These core types are grouped into directories under /plugins. They are:

  • antispam
  • authentication
  • content
  • cron
  • editors
  • editors-xtd
  • system
  • user
Antispam
plugins allow you to add to or replace existing anti spam filters to further protect your site against spam and potentially malicious content.
Authentication
plugins allow you to authenticate (to allow you to login) against different sources. By default you will authenticate against the user database when you try to login. However, there are other methods available such as by OpenID, by a Google account, LDAP, and many others. Wherever a source has a public API, you can write an authentication plugin to verify the login credentials against this source. For example, you could write a plugin to authenticate against Twitter accounts because they have a public API.
Content
plugins modify and add features to displayed content. For example, content plugins can cloak email address or can convert URL's into SEF format. Content plugins can also look for markers in content and replace them with other text or HTML. For example, the Load Module plugin will take {*loadmodule banner1*} (you would remove the *'s in practice. They are included to actually prevent the plugin from working in this article), load all the modules in the banner1 position and replace the marker with that output.
Cron
plugins allow you to add timed "jobs" that are performed at regular intervals. These are good for maintenance tasks, regularly sending emails (i.e., newsletters), etc.
Editor
plugins allow you to add new content editors (usually WYSIYWG).
Editor-XTD
(extended) plugins allow you to add additional buttons to the editors. For example, the Image, Pagebreak and Read more buttons below the default editor are actually plugins.
System
plugins allow you to perform actions at various points in the execution of the PHP code that runs a Joomla! Web site.

 

User
plugins allow you to perform actions at different times with respect to users. Such times include logging in and out and also saving a user. User plugins are typically user to "bridge" between web applications (such as creating a Joomla! to phpBB bridge).

Examples

A plugin demonstrating basic setup:

Download: System Test plugin (.zip)

Last modified:

  • Copyright © 2022 Hubzero
  • Powered by Hubzero®