Создание плагина для 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:08, 11 июня 2009 WikiSysop (Обсуждение | вклад) ← К предыдущему изменению |
Версия 13:09, 11 июня 2009 WikiSysop (Обсуждение | вклад) (→Методы - обработчики событий) К след. изменению → |
||
Строка 33: | Строка 33: | ||
== Методы - обработчики событий == | == Методы - обработчики событий == | ||
+ | * 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 | ||
+ | |||
+ | Seach | ||
+ | |||
+ | * onSearch | ||
+ | * onSearchAreas | ||
+ | |||
+ | System | ||
+ | |||
+ | * onAfterInitialise | ||
+ | * onAfterRoute | ||
+ | * onAfterDispatch | ||
+ | * onAfterRender | ||
+ | |||
+ | User | ||
+ | |||
+ | * onLoginUser | ||
+ | * onLoginFailure | ||
+ | * onLogoutUser | ||
+ | * onLogoutFailure | ||
+ | * onBeforeStoreUser | ||
+ | * onAfterStoreUser | ||
+ | * onBeforeDeleteUser | ||
+ | * onAfterDeleteUser | ||
+ | |||
+ | XML-RPC | ||
+ | |||
+ | * onGetWebServices | ||
[[Категория:Joomla]] | [[Категория:Joomla]] |
Версия 13:09, 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
Seach
* onSearch * onSearchAreas
System
* onAfterInitialise * onAfterRoute * onAfterDispatch * onAfterRender
User
* onLoginUser * onLoginFailure * onLogoutUser * onLogoutFailure * onBeforeStoreUser * onAfterStoreUser * onBeforeDeleteUser * onAfterDeleteUser
XML-RPC
* onGetWebServices