Written by Administrator Sunday, 09 August 2009 23:17
This tutorial will go through the basics of a Tuiyo™ plug-in, the various types of plug-ins, process of building a simple Tuiyo™ plug-ins. We will then describe a simple extension to the Tuiyo™ event listener and trigger work-flow, to enable you build highly extensible Tuiyo™ applications
A Tuiyo™ Plug-in is a single PHP class, which extends TuiyoEventsListener class. Various plug-ins groups exists, which (for now) include profile plug-ins, system plug-ins, and admin plug-ins. Each plug-in is stored in a single file, stored in the plug-in sub-directory group of the front end component i.e components/com_tuiyo/plugin/{plugin group}/.
It is important not to confuse a plug-in with an application, as plug-ins are mainly a collection of methods responding to specific triggers, such as onUserProfileUpdate. The goal is simple, "to provide a simple hooking system, that is independent of the normal application process flow, allowing third-party developers to 'plug-in' external functionality, at specified points in processing". Such a hooking system implies we now have a simple yet effective, and customization, JavaScript style event handling all through out the application. Strictly speaking, a Tuiyo™ plug-in is a registered event listener
Regardless of the plug-in group type, all at the exception of timelinebots have this basic structure. The naming of your classes are very important. Exactly the same naming convention used in joomla. Just as a Tuiyo controller class is named TuiyoController{controllerName} and a model TuiyoModel{modelName}, a plug-in class must be named as TuiyoPlugin{pluginName} and must extend the TuiyoEventsListener class for it to be registered an parsed when triggered.
Last Updated on Monday, 10 August 2009 03:46