Interface List
Plugin Interfaces
To accommodate a wide range of extension needs, Z-BlogPHP provides several types of plugin interfaces for developers. Here's a brief overview:
"Admin Page" Output Types: These interfaces are generally used to add buttons or extension options to existing backend management pages.
"Frontend Page" Output Types: These allow for modifications or additions to web page content before it's sent to the browser, including the inclusion of additional styles and scripts.
"Data Write" Processing Types: These are involved in the process of submitting data such as articles and comments, and are further divided into:
Core: Intervenes before data submission, usable for filtering submitted data.
Succeed: Intervenes after successful data submission, usable for post-submission event handling, such as updating custom module data.
"Magic Method" Extension Types: Used to extend the available methods within system classes.
"Process/Event" Listener Types: Strictly speaking, all interfaces are "listeners." They listen for the interface itself being triggered, then execute specified operations or process the data passed to the interface.
Apart from "Magic Methods," the first three categories are divided by "functional purpose" and are the most commonly used.
Note: The list below does not strictly correspond to the above classification.
"Admin Page" Output
Global Backend Output
| Interface | Parameters | Description |
|---|---|---|
| Filter_Plugin_Admin_Header | Used to output content to the backend "header." | |
| Filter_Plugin_Admin_Footer | Used to output content to the backend "footer." | |
| Filter_Plugin_Admin_TopMenu | arr $topmenus | Used to add items to the backend "top menu." |
| Filter_Plugin_Admin_LeftMenu | arr $leftmenus | Used to add items to the backend "sidebar menu." |
Interface Example (Click to expand)
function ActivePlugin_demoAPP() {
Add_Filter_Plugin('Filter_Plugin_Admin_Header','demoAPP_Admin_Header');
Add_Filter_Plugin('Filter_Plugin_Admin_TopMenu','demoAPP_Admin_TopMenu');
}
function demoAPP_Admin_Header()
{
global $zbp;
echo '<script src="' . $zbp->host . 'zb_users/plugin/demoAPP/script/plugin.js"></script>';
echo '<style type="text/css">#divMain2 {margin-bottom: 6rem;}</style>';
}
function demoAPP_Admin_TopMenu(&$topmenus)
{
global $zbp;
$topmenus[] = MakeTopMenu("root", "demoAPP管理", $zbp->host . "zb_users/plugin/demoAPP/main.php", "", "");
}
// Filter_Plugin_Admin_Footer and Filter_Plugin_Admin_LeftMenu are similar;
// There is a corresponding MakeLeftMenu() function available.Specific Page Menu Management SubMenu
| Interface | Parameters | Description |
|---|---|---|
| Filter_Plugin_Admin_SiteInfo_SubMenu | Backend homepage submenu. | |
| Filter_Plugin_Admin_ArticleMng_SubMenu | Article management page submenu. | |
| Filter_Plugin_Admin_PageMng_SubMenu | Page management page submenu. | |
| Filter_Plugin_Admin_CategoryMng_SubMenu | Category management page submenu. | |
| Filter_Plugin_Admin_CommentMng_SubMenu | Comment management page submenu. | |
| Filter_Plugin_Admin_MemberMng_SubMenu | User management page submenu. | |
| Filter_Plugin_Admin_UploadMng_SubMenu | Attachment management page submenu. | |
| Filter_Plugin_Admin_TagMng_SubMenu | Tag management page submenu. | |
| Filter_Plugin_Admin_PluginMng_SubMenu | Plugin management page submenu. | |
| Filter_Plugin_Admin_ThemeMng_SubMenu | Theme management page submenu. | |
| Filter_Plugin_Admin_ModuleMng_SubMenu | Module management page submenu. | |
| Filter_Plugin_Admin_SettingMng_SubMenu | Settings management page submenu. | |
| Filter_Plugin_Edit_SubMenu | Edit page menu. | |
| Filter_Plugin_Tag_Edit_SubMenu | Tag edit page menu. | |
| Filter_Plugin_Module_Edit_SubMenu | Module edit page menu. | |
| Filter_Plugin_Member_Edit_SubMenu | User edit page menu. | |
| Filter_Plugin_Category_Edit_SubMenu | Category edit page menu. |
Specific Page Table Filtering
| Interface | Parameters | Description |
|---|---|---|
| Filter_Plugin_Admin_ArticleMng_Table | arr $article arr $tabletds arr $tableths | Article management page table processing. |
| Filter_Plugin_Admin_PageMng_Table | ||
| Filter_Plugin_Admin_CategoryMng_Table | ||
| Filter_Plugin_Admin_CommentMng_Table | ||
| Filter_Plugin_Admin_MemberMng_Table | ||
| Filter_Plugin_Admin_UploadMng_Table | ||
| Filter_Plugin_Admin_TagMng_Table |
Specific Page Output
| Interface | Parameters | Description |
|---|---|---|
| Filter_Plugin_Edit_Begin | ||
| Filter_Plugin_Edit_End | ||
| Filter_Plugin_Edit_Response | ||
| Filter_Plugin_Edit_Response2 | ||
| Filter_Plugin_Edit_Response4 | ||
| Filter_Plugin_Edit_Response5 | ||
| Filter_Plugin_Edit_Response3 | ||
| Filter_Plugin_Category_Edit_Response | ||
| Filter_Plugin_Tag_Edit_Response | ||
| Filter_Plugin_Member_Edit_Response | ||
| Filter_Plugin_Module_Edit_Response |
"Admin Page" Process Listening
| Interface | Parameters | Description |
|---|---|---|
| Filter_Plugin_Admin_Begin | ||
| Filter_Plugin_Admin_End |
"Frontend Page" Output
| Interface | Parameters | Description |
|---|---|---|
| Filter_Plugin_ViewList_Template | $template | |
| Filter_Plugin_ViewPost_Template | $template | |
| Filter_Plugin_ViewSearch_Template | $template | |
| Filter_Plugin_ViewComments_Template | $template | |
| Filter_Plugin_ViewComment_Template | $template |
"Frontend Page" Process
| Interface | Parameters | Description |
|---|---|---|
| Filter_Plugin_Index_Begin | ||
| Filter_Plugin_Index_End | ||
| Filter_Plugin_ViewIndex_Begin | str $url | |
| Filter_Plugin_ViewAuto_Begin | str $inpurl,str $url | |
| Filter_Plugin_ViewAuto_End | str $url | |
| Filter_Plugin_Feed_Begin | ||
| Filter_Plugin_Feed_End | ||
| Filter_Plugin_ViewFeed_Begin | ||
| Filter_Plugin_ViewFeed_Core | arr $w | |
| Filter_Plugin_ViewFeed_End | obj $rss2 | |
| Filter_Plugin_ViewList_Begin | ||
| Filter_Plugin_ViewList_Core | ||
| Filter_Plugin_Search_Begin | ||
| Filter_Plugin_Search_End | ||
| Filter_Plugin_ViewSearch_Begin | ||
| Filter_Plugin_ViewSearch_Core | ||
| Filter_Plugin_ViewPost_Begin | ||
| Filter_Plugin_ViewPost_Core | $select, $w, $order, $limit, $option |
Article link: http://docs.zbp.cool/zblogdocs/zblogapp/11.html
Helpful?
2025-10-09 16:07:27
2025-10-09 15:59:23
2025-10-09 15:07:45