Создание плагина для Joomla
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2102
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2435
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2451
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2456
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2461
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2467
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2479
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2496
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2497
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2498
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2499
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2517
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2518
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2519
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2520
Deprecated: Non-static method MagicWord::get() should not be called statically, assuming $this from incompatible context in /home/clients/newman_ftp0/domains/wiki.pws.ru/html/includes/Parser.php on line 2550
Материал из Newman's WiKi.
(Различия между версиями)
| Версия 13:09, 11 июня 2009 WikiSysop (Обсуждение | вклад) (→Методы - обработчики событий) ← К предыдущему изменению |
Версия 13:13, 11 июня 2009 WikiSysop (Обсуждение | вклад) (→Методы - обработчики событий) К след. изменению → |
||
| Строка 36: | Строка 36: | ||
| ** onAuthenticate | ** onAuthenticate | ||
| * Content | * Content | ||
| - | + | ** onPrepareContent | |
| - | * onPrepareContent | + | ** onAfterDisplayTitle |
| - | * onAfterDisplayTitle | + | ** onBeforeDisplayContent |
| - | * onBeforeDisplayContent | + | ** onBeforeContentSave (new in 1.5.4) |
| - | * onBeforeContentSave (new in 1.5.4) | + | ** onAfterContentSave (new in 1.5.4) |
| - | * onAfterContentSave (new in 1.5.4) | + | *Editors |
| - | + | ** onInit | |
| - | Editors | + | ** onGetContent |
| - | + | ** onSetContent | |
| - | * onInit | + | ** onSave |
| - | * onGetContent | + | ** onDisplay |
| - | * onSetContent | + | ** onGetInsertMethod |
| - | * onSave | + | *Editors XTD (Extended) |
| - | * onDisplay | + | ** onDisplay |
| - | * onGetInsertMethod | + | *Search |
| - | + | ** onSearch | |
| - | Editors XTD (Extended) | + | ** onSearchAreas |
| - | + | *System | |
| - | * onDisplay | + | ** onAfterInitialise |
| - | + | ** onAfterRoute | |
| - | Seach | + | ** onAfterDispatch |
| - | + | ** onAfterRender | |
| - | * onSearch | + | *User |
| - | * onSearchAreas | + | ** onLoginUser |
| - | + | ** onLoginFailure | |
| - | System | + | ** onLogoutUser |
| - | + | ** onLogoutFailure | |
| - | * onAfterInitialise | + | ** onBeforeStoreUser |
| - | * onAfterRoute | + | ** onAfterStoreUser |
| - | * onAfterDispatch | + | ** onBeforeDeleteUser |
| - | * onAfterRender | + | ** onAfterDeleteUser |
| - | + | *XML-RPC | |
| - | User | + | ** onGetWebServices |
| - | + | ||
| - | * onLoginUser | + | |
| - | * onLoginFailure | + | |
| - | * onLogoutUser | + | |
| - | * onLogoutFailure | + | |
| - | * onBeforeStoreUser | + | |
| - | * onAfterStoreUser | + | |
| - | * onBeforeDeleteUser | + | |
| - | * onAfterDeleteUser | + | |
| - | + | ||
| - | XML-RPC | + | |
| - | + | ||
| - | * onGetWebServices | + | |
| [[Категория:Joomla]] | [[Категория:Joomla]] | ||
Версия 13:13, 11 июня 2009
Описание создания плагина (plugin) для Joomla 1.5
Содержание |
Типы плагинов
- authentication
- content
- editors
- editors-xtd
- search
- system
- user
- xmlrpc
Структура плагина
Плагин состоит из двух файлов: файл описания в формате XML и файл PHP скрипта. Файл скрипта имеет следующую структуру:
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.plugin.plugin' );
class plgSystemTest extends JPlugin
{
function plgSystemTest( &$subject, $config )
{
parent::__construct( $subject, $config );
}
}
Вся основная обработка производится в методах класса с заранее определенными именами.
Соглашение о имени файла и имени класса
Имя файла может состоять из любых символов латинского алфавита. Особое внимание следует обратить на имя класса. Оно формируется следующим образом: plg<Folder><Filename>
где plg - обязательный префикс, <Folder> - имя категории к которой относится плагин, <Filename> - имя файла плагина (без расширения)
Методы - обработчики событий
- Authentication
- onAuthenticate
- Content
- onPrepareContent
- onAfterDisplayTitle
- onBeforeDisplayContent
- onBeforeContentSave (new in 1.5.4)
- onAfterContentSave (new in 1.5.4)
- Editors
- onInit
- onGetContent
- onSetContent
- onSave
- onDisplay
- onGetInsertMethod
- Editors XTD (Extended)
- onDisplay
- Search
- onSearch
- onSearchAreas
- System
- onAfterInitialise
- onAfterRoute
- onAfterDispatch
- onAfterRender
- User
- onLoginUser
- onLoginFailure
- onLogoutUser
- onLogoutFailure
- onBeforeStoreUser
- onAfterStoreUser
- onBeforeDeleteUser
- onAfterDeleteUser
- XML-RPC
- onGetWebServices