Plugin

From Joomla! Documentation

This page is a translated version of the page Plugin and the translation is 86% complete.
Outdated translations are marked like this.
Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎Kiswahili • ‎Nederlands • ‎català • ‎eesti • ‎español • ‎français • ‎italiano • ‎português • ‎português do Brasil • ‎български • ‎中文(台灣)‎ • ‎日本語

A plugin is a kind of Joomla! extension. Plugins provide functions which are associated with trigger events. Joomla provides a set of core plugin events, but any extension can fire (custom) events. When a particular event occurs, all plugin functions of the type associated with the event are executed in sequence. This is a powerful way of extending the functionality of Joomla. It also offers extension developers a way to allow other extensions to respond to their actions, making extensions extensible.

The Joomla! plugin architecture follows the Observer design pattern. The JPlugin class provides the means to register custom plugin code with core or custom events. The JEventDispatcher class is an event handler which calls all plugins registered for a particular event, when that event is triggered. In Joomla 4.x this has been moved to the \Joomla\Event\Dispatcher class in Joomla, and additionally follows the Mediator design pattern

See also: Component, Module, Template


Kujifunza zaidi

Wanaoanza

Kwa kuelewa ni vipi kusakinisha na kutumia plugin katika Joomla, unapendekezwa kusoma Usimamizi wa Plugin ya Joomla

Wakatikati

Kwa kuelewa vizuri plugin, unashauriwa kutengeza plugin ya kimsingi ya Joomla!.

Ikiwa uko na plugin ya msingi ya yaliomo ndani ya moduli au komponenti ya kidesturi, unapendekezwa kusoma S:MyLanguage/Triggering content plugins in your extension/Kusababisha plugin ya yaliomo ndani ya kiendelezo chako.

Waliowanajua

Kwa kuelewa kanuni za mfumo wa plugin, angalia Muhtasari wa waelezaji wa plugin. Kwa kutekeleza hii ndani ya komponenti ambayo umeichora, unapendekezwa kusoma Kuisaidia plugin ndani ya komponenti yako.

Kutumia plugin

Plugin zimepangwa kwa vikundi, itategemea na tukio ambapo zinatumika. Hapa unaweza kupata orodha kamili ya plugin ambazo zimepangwa kwa vikundi kwa aina ya tukio (majina ya matukio mengi yamebadilishwa kutoka Joomla 1.5 na kwenda kwa Joomla 2.5 - angalia hapa kwa orodha kamili ya mabadilisho). Pia kuna mafunzo rahisi ya aina mbalimbali ya kueleza ni vipi baadhi ya plugin za mifano zinatumika kwa baadhi ya matukio haya katika matafutaji ambayo yanatumia komponenti ya Tafuta pamoja na komponenti ya Tafuta kijanja.

Kuna mafunzo mengi ambayo yanatumia masababisho ya mtumiaji na yanaeleza ni vipi kutengeza plugin ya uthibitishaji kwa kusaidia watumiaji kuingia kwa Joomla na kutengeza plugin ya maelezo mafupi kwa Joomla.

Pia unapatikana mfano mgumu kwa kutumia plugin ya kutengeza ruta mpya ya mfumo kwa kutengeza URL (Joomla 2.5 pekee).