Portal

Développement de plugins

From Joomla! Documentation

Revision as of 08:26, 3 June 2015 by MATsxm (talk | contribs) (Created page with "fr")
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎español • ‎français • ‎русский • ‎中文(台灣)‎
Développement de plugins


Cette page contient de nombreux liens vers la documentation sur le développement de plugins pour Joomla 2.5 et Joomla 3.x. Pour débuter, consultez les listes de lecture ci-dessous qui fournissent une bonne introduction aux connaissances nécessaires.

Qu'est-ce qu'un plugin ?

Un Plugin est un type d'extension pour Joomla!. Les Plugins proposent des fonctionnalités associées à des événements déclencheurs. Joomla! propose nativement un ensemble d' événements pour plugins, mais toute extension peut créer ou personnaliser des événements. Lorsqu'un événement particulier intervient, toutes les fonctions du plugin associées à l'événement sont exécutées en suivant une séquence. Cette méthode est très efficace pour étendre les fonctionnalités de la Plate-forme Joomla!. Elle offre également aux développeurs d'extensions la possibilité de voir d'autres extensions interagir avec leurs actions, ainsi les extensions peuvent fonctionner de manière étendue.

Les plugins pour Joomla! sont conçus en respectant l'architecture Observer. La classe JPlugin permet de lier les actions du plugin avec des événements natifs ou personnalisés. La classe JDispatcher (JEventDispatcher dans Joomla! 3.x) est un gestionnaire d'événements qui appelle tous les plugins enregistrés pour un événement particulier, lorsque cet événement est déclenché.

Voir également : Composant, Module, Plugin


Using Plugins


Plugins are grouped together depending on which event they run on. A full list of events grouped by event type can be found here (the names of a lot of events changed between Joomla 1.5 and Joomla 2.5 see here for a full list of changes). There are also several simple tutorials on making some sample plugins running on some of these events to help running searches on extensions using both the search and smart search components:

There are further tutorials using the user triggers on how to create an authentication plugin to help users log into Joomla and creating a profile plugin for Joomla.

Content plugins can be used to add custom fields to core components. The following tutorial explains how to do this and how to display the new field on your webite.

A more complex example of using plugins to create a new system router to produce URLs is also available (Joomla 2.5 only).


Reading list

The following articles will help familiarise you with Joomla! plugins. They are a good starting point to understanding and then developing plugins.

Beginner

To understand how to install and use a plugin in Joomla it is recommended to read Administration of a Plugin in Joomla!

Intermediate

To understand plugins better it is advised that you create a basic plugin for Joomla!.

To read on how to run a basic content plugin in a custom module or component you may have already developed it is recommended to read Triggering content plugins in your extension.

Advanced

To understand the principles on which the Plugin system works Plugin Developer Overview. To then implement this in a component you have designed it is recommended to read Supporting plugins in your component.



Portal:Plugin Development/fr/Projects