Difference between revisions of "Plugin/zh-tw"

From Joomla! Documentation

 
(17 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
==深入了解==
 
==深入了解==
  
===Beginner===
+
===初級===
To understand how to install and use a plugin in Joomla it is recommended to read [[Administration of a Plugin in Joomla]]
+
了解如何在 Joomla! 中安裝及使用外掛,推薦閱讀[[S:MyLanguage/Administration of a Plugin in Joomla|管理 Joomla! 外掛]]
  
===Intermediate===
+
====中級====
To understand plugins better, you should [[S:MyLanguage/Creating_a_Plugin_for_Joomla|create a basic plugin for Joomla!]].
+
要更進一步認識外掛,建議您[[S:MyLanguage/Creating a Plugin for Joomla|建立一個基本的Joomla! 外掛]]
  
If you have a basic content plugin in a custom module or component, we recommended reading [[Triggering content plugins in your extension]].
+
假如您在模組或是元件中,有基本的內容外掛,我們推薦您閱讀[[S:MyLanguage/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]].
+
要深入了解外掛系統運作的原理,請閱讀[[S:MyLanguage/Plugin Developer Overview|開發外掛總覽]],要將之應用在您所設計的元件中,推薦您閱讀 [[S:MyLanguage/Supporting plugins in your component|為您的元件開發支援外掛]]
  
 
==使用外掛==
 
==使用外掛==
  
Plugins are grouped together depending on which event they run on. For developer reference there is a [[Plugin/Events|full list of plugins]] grouped by their event type. Please note, the names of a lot of events changed between the Joomla 1.5 and Joomla 2.5 versions. Here is a full list of the [[J2.5:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5#Renamed_Events|1.5 to 2.5 plugin event name 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:
+
外掛會依據他們執行的event群組在一起,為了開發者方便我們有一份依照事件類型分組的[[S:MyLanguage/Plugin/Events|外掛清單]]。請注意,其中很多名稱在Joomla 1.5 Joomla! 2.5 版本之間作了改變。以下是[[J2.5:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5#Renamed_Events|1.5 to 2.5 plugin event name changes]]完整清單。也有一些簡單的教學,指導您開發簡單的外掛,能在這些事件中執行,利用搜尋、智慧搜尋元件等,來協助擴充套件內容的搜尋:
  
* [[Creating a search plugin]]
+
* [[S:MyLanguage/Creating a search plugin|建立一個簡單的外掛]]
* [[Creating a Smart Search plug-in]] ({{JVer|2.5}} only)
+
* [[S:MyLanguage/Creating a Smart Search plug-in|建立一個智慧搜尋外掛]] ({{JVer|2.5}} only)
  
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.
+
這裡還有一些進一步的教學,利用用戶觸發,來說明如何建立用戶認證外掛,協助用戶登入Joomla以及建立 Joomla 個人資料外掛。
  
* [[Creating an Authentication Plugin for Joomla]]
+
* [[S:MyLanguage/Creating an Authentication Plugin for Joomla|建立一個 Joomla 用戶認證外掛]]
* [[Creating a profile plugin]]
+
* [[S:MyLanguage/Creating a profile plugin|建立一個會員設定檔外掛]]
  
A more complex example of [[Creating a System Plugin to augment JRouter|using plugins to create a new system router]] to produce URLs is also available ({{JVer|2.5}} only).
+
[[S:MyLanguage/J2.5:Creating_a_System_Plugin_to_augment_JRouter|使用外掛來建立新的系統路由 (system router)]]是一個更複雜的例子,產生 URLs (僅適用於({{JVer|2.5}} ))。
  
 
[[Category:Extensions]][[Category:Landing Pages]][[Category:Glossary]]
 
[[Category:Extensions]][[Category:Landing Pages]][[Category:Glossary]]

Latest revision as of 01:37, 22 January 2021

Other languages:
български • ‎català • ‎Deutsch • ‎English • ‎español • ‎eesti • ‎français • ‎Bahasa Indonesia • ‎italiano • ‎日本語 • ‎Nederlands • ‎português • ‎português do Brasil • ‎Kiswahili • ‎中文(台灣)‎

外掛是 Joomla! 擴充套件的一種類型。外掛提供了功能,來關聯於觸發事件。Joomla 提供了一些核心的外掛事件,然而任何擴充套件都可以觸發(客製化)事件。當特定事件發生時,所有和該事件關聯的外掛功能會依次被執行。這是擴展Joomla核心功能強大的方式。這也提供擴充套件開發者一個途徑,讓其它擴充套件能回應他們的行為,讓擴充套件還能再被擴充。

Joomla! 外掛架構依循觀察者設計模式(Observer Pattern ),JPlugin class 提供了方法來註冊外掛程式碼到核心或是其他客製化事件。JEventDispatcher class 是一個事件處理程序,當事件觸發時,為特定事件呼叫所有已註冊的外掛。在 Joomla 4.x 我們將之移動到 Joomla 的 \Joomla\Event\Dispatcher ,並且另行遵循了 中介者設計模式(Mediator pattern)

延伸閱讀: 元件, 模組,佈景主題


深入了解

初級

了解如何在 Joomla! 中安裝及使用外掛,推薦閱讀管理 Joomla! 外掛

中級

要更進一步認識外掛,建議您建立一個基本的Joomla! 外掛

假如您在模組或是元件中,有基本的內容外掛,我們推薦您閱讀在您的擴充套件中觸發內容.

進階

要深入了解外掛系統運作的原理,請閱讀開發外掛總覽,要將之應用在您所設計的元件中,推薦您閱讀 為您的元件開發支援外掛

使用外掛

外掛會依據他們執行的event群組在一起,為了開發者方便我們有一份依照事件類型分組的外掛清單。請注意,其中很多名稱在Joomla 1.5 到 Joomla! 2.5 版本之間作了改變。以下是1.5 to 2.5 plugin event name changes完整清單。也有一些簡單的教學,指導您開發簡單的外掛,能在這些事件中執行,利用搜尋、智慧搜尋元件等,來協助擴充套件內容的搜尋:

這裡還有一些進一步的教學,利用用戶觸發,來說明如何建立用戶認證外掛,協助用戶登入Joomla以及建立 Joomla 個人資料外掛。

使用外掛來建立新的系統路由 (system router)是一個更複雜的例子,產生 URLs (僅適用於(Joomla 2.5 ))。