Z-blogPHPPlug-in enables you to insert different content on different pages!
In other words, the Z-blogPHP plug-in implements inserting content on the specified page!
1. The Z-blog PHP plug-in inserts content on the home page and list page
Interface writing:
PHP
Add_Filter_Plugin('Filter_Plugin_ViewList_Core','插件ID_ViewList_Core');//在首页和列表页生效Insert content writing:
PHP
function 插件ID_ViewList_Core(&$type) {global $zbp;if ($type=='index'){}//判断首页if ($type=='category'){}//判断分类页if ($type=='tag'){}//判断标签页if ($type=='author'){}//判断作者页if ($type=='date'){}//判断日期页}2. Z-blog PHP plug-in inserts content on the details page
Interface writing:
PHP
Add_Filter_Plugin('Filter_Plugin_ViewPost_Template','插件ID_ViewPost_Template'); //详情页Insert content writing:
PHP
function 插件ID_ViewPost_Template(&$template) { global $zbp;
$article = $template->GetTags('article');
if ($type = $template->GetTags('type') =='article'){}//判断文章页(article)
if ($type = $template->GetTags('type') =='page'){}//判断页面(page)}3. Z-blog PHP plug-in inserts content on the search page
Interface writing:
PHP
Add_Filter_Plugin('Filter_Plugin_ViewSearch_Template','插件ID_ViewSearch_Template'); //搜索页Insert content writing:
PHP
function 插件ID_ViewSearch_Template(&$template) {global $zbp;}Application examples:
The following plug-in uses if $type judgment to insert different content on different pages.







add friends