Menu

Interface List

This article was last updated 37 days ago, please note whether the content is still available

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

InterfaceParametersDescription
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_TopMenuarr $topmenusUsed to add items to the backend "top menu."
Filter_Plugin_Admin_LeftMenuarr $leftmenusUsed 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

InterfaceParametersDescription
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

InterfaceParametersDescription
Filter_Plugin_Admin_ArticleMng_Tablearr $article arr $tabletds arr $tablethsArticle 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

InterfaceParametersDescription
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

InterfaceParametersDescription
Filter_Plugin_Admin_Begin

Filter_Plugin_Admin_End

"Frontend Page" Output

InterfaceParametersDescription
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

InterfaceParametersDescription
Filter_Plugin_Index_Begin

Filter_Plugin_Index_End

Filter_Plugin_ViewIndex_Beginstr $url
Filter_Plugin_ViewAuto_Beginstr $inpurl,str $url
Filter_Plugin_ViewAuto_Endstr $url
Filter_Plugin_Feed_Begin

Filter_Plugin_Feed_End

Filter_Plugin_ViewFeed_Begin

Filter_Plugin_ViewFeed_Corearr $w
Filter_Plugin_ViewFeed_Endobj $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

Helpful?

Comments(3)

飞雪剑心
飞雪剑心

2025-10-09 16:07:27

这篇文章详细介绍了Z-BlogPHP的插件接口分类及其具体应用,为开发者提供了丰富的扩展和定制功能。
剑影飞鸿
剑影飞鸿

2025-10-09 15:59:23

详细介绍了Z-BlogPHP的多种插件接口及其分类,为开发者提供了丰富的扩展功能。
夜雨孤剑客
夜雨孤剑客

2025-10-09 15:07:45

"驱蚊器:夏日防蚊神器,守护家庭安宁。"

Post comment

Support Live Chat
TOP