本文整理匯總了PHP中Add_Filter_Plugin函數的典型用法代碼示例。如果您正苦於以下問題:PHP Add_Filter_Plugin函數的具體用法?PHP Add_Filter_Plugin怎麽用?PHP Add_Filter_Plugin使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Add_Filter_Plugin函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ActivePlugin_AuditRecords
function ActivePlugin_AuditRecords()
{
Add_Filter_Plugin('Filter_Plugin_Edit_Response', 'AuditRecords_Edit_Response');
Add_Filter_Plugin('Filter_Plugin_PostArticle_Core', 'AuditRecords_Main');
Add_Filter_Plugin('Filter_Plugin_Edit_Response3', 'AuditRecords_Edit_Response3');
Add_Filter_Plugin('Filter_Plugin_Admin_LeftMenu', 'AuditRecords_AddMenu');
}
示例2: ActivePlugin_passwordvisit
function ActivePlugin_passwordvisit()
{
Add_Filter_Plugin('Filter_Plugin_Edit_Response3', 'passwordvisit_show_encrypt_button');
Add_Filter_Plugin('Filter_Plugin_PostArticle_Core', 'passwordvisit_save_postpassword');
Add_Filter_Plugin('Filter_Plugin_ViewList_Template', 'passwordvisit_list_password');
Add_Filter_Plugin('Filter_Plugin_ViewPost_Template', 'passwordvisit_input_password');
}
示例3: ActivePlugin_Storage
function ActivePlugin_Storage()
{
Add_Filter_Plugin('Filter_Plugin_Upload_Url', 'Storage_Return_Url');
Add_Filter_Plugin('Filter_Plugin_Upload_SaveFile', 'Storage');
Add_Filter_Plugin('Filter_Plugin_Upload_DelFile', 'Storage_Del');
// Add_Filter_Plugin('Filter_Plugin_Upload_SaveBase64File','Storage');
}
示例4: api_category_post_function
/**
* Create & Update category
*/
function api_category_post_function()
{
global $zbp;
Add_Filter_Plugin('Filter_Plugin_PostCategory_Succeed', 'api_category_post_callback');
PostCategory();
$zbp->BuildModule();
$zbp->SaveCache();
}
示例5: api_article_post_function
/**
* Create & Update article
*/
function api_article_post_function()
{
global $zbp;
Add_Filter_Plugin('Filter_Plugin_PostArticle_Succeed', 'api_article_post_callback');
PostArticle();
$zbp->BuildModule();
$zbp->SaveCache();
}
示例6: ActivePlugin_CustomMeta
function ActivePlugin_CustomMeta()
{
Add_Filter_Plugin('Filter_Plugin_Admin_Header', 'CustomMeta_CSS_Response');
Add_Filter_Plugin('Filter_Plugin_Edit_Response', 'CustomMeta_Edit_Response');
Add_Filter_Plugin('Filter_Plugin_Category_Edit_Response', 'CustomMeta_Category_Edit_Response');
Add_Filter_Plugin('Filter_Plugin_Tag_Edit_Response', 'CustomMeta_Tag_Edit_Response');
Add_Filter_Plugin('Filter_Plugin_Member_Edit_Response', 'CustomMeta_Member_Edit_Response');
}
示例7: ActivePlugin_markdown
function ActivePlugin_markdown()
{
Add_Filter_Plugin('Filter_Plugin_Edit_Begin', 'markdown_addscript_begin');
Add_Filter_Plugin('Filter_Plugin_Edit_End', 'markdown_addscript_end');
Add_Filter_Plugin('Filter_Plugin_PostPage_Core', 'markdown_mk2html');
Add_Filter_Plugin('Filter_Plugin_PostArticle_Core', 'markdown_mk2html');
//Add_Filter_Plugin('Filter_Plugin_Cmd_Ajax', 'markdown_upload_ajax');
Add_Filter_Plugin('Filter_Plugin_Html_Js_Add', 'markdown_Js_Add');
}
示例8: ActivePlugin_WhitePage
function ActivePlugin_WhitePage()
{
global $zbp;
Add_Filter_Plugin('Filter_Plugin_Admin_TopMenu', 'WhitePage_AddMenu');
$s = '';
if ($zbp->Config('WhitePage')->HasKey("custom_bgcolor")) {
$zbp->Config('WhitePage')->custom_bgcolor = str_replace('#', '', $zbp->Config('WhitePage')->custom_bgcolor);
$s .= "body{background-color:#" . $zbp->Config('WhitePage')->custom_bgcolor . ";}";
}
if ($zbp->Config('WhitePage')->HasKey("custom_headtitle")) {
$s .= "#BlogTitle,#BlogSubTitle,#BlogCopyRight,#BlogPowerBy{text-align:" . $zbp->Config('WhitePage')->custom_headtitle . ";}";
}
if ($zbp->Config('WhitePage')->HasKey("custom_pagewidth")) {
if ($zbp->Config('WhitePage')->custom_pagewidth == 1000) {
$s .= "#divAll{width:1000px;}#divMiddle{width:940px;padding:0 30px;}#divSidebar{width:240px;padding:0 0 0 20px;}#divMain{width:670px;padding:0 0 20px 0;}#divTop{padding-top:30px;}body{font-size:15px;}";
}
}
if ($zbp->Config('WhitePage')->HasKey("text_indent")) {
$s .= "div.post-body p{text-indent:" . (int) $zbp->Config('WhitePage')->text_indent . "em;}";
}
if ($zbp->Config('WhitePage')->HasKey("custom_pagetype")) {
if ($zbp->Config('WhitePage')->custom_pagetype == 1) {
if ($zbp->Config('WhitePage')->custom_pagewidth == 1000) {
$s .= "#divAll{background:url('" . $zbp->host . "zb_users/theme/WhitePage/style/default/bg1000-1.png') no-repeat 50% top;}#divPage{background:url('" . $zbp->host . "zb_users/theme/WhitePage/style/default/bg1000-2.png') no-repeat 50% bottom;}#divMiddle{background:url('" . $zbp->host . "zb_users/theme/WhitePage/style/default/bg1000-3.png') repeat-y 50% 50%;}";
}
}
if ($zbp->Config('WhitePage')->custom_pagetype == 2) {
$s .= "#divAll{box-shadow: 0 0 5px #666;background-color:white;border-radius: 0px;}";
$s .= "#divAll{background:white;}#divPage{background:none;}#divMiddle{background:none;}";
}
if ($zbp->Config('WhitePage')->custom_pagetype == 3) {
$s .= "#divAll{box-shadow: 0 0 5px #666;background-color:white;border-radius: 7px;}";
$s .= "#divAll{background:white;}#divPage{background:none;}#divMiddle{background:none;}";
}
if ($zbp->Config('WhitePage')->custom_pagetype == 4) {
$s .= "#divAll{box-shadow:none;background-color:white;border-radius: 0;}";
$s .= "#divAll{background:white;}#divPage{background:none;}#divMiddle{background:none;}";
$s .= "#divTop{padding-top:30px;}";
}
if ($zbp->Config('WhitePage')->custom_pagetype == 5) {
$s .= "#divAll{box-shadow:none;background-color:white;border-radius: 0;border-radius: 7px;}";
$s .= "#divAll{background:white;}#divPage{background:none;}#divMiddle{background:none;}";
$s .= "#divTop{padding-top:30px;}";
}
}
$Pad_List = '/touch|arm;|android|iphone|ipad|windows\\sphone|kindle|gt\\-p|gt\\-n|rim\\stablet|meego/i';
$UA = GetGuestAgent();
if (CheckRegExp($UA, $Pad_List) == true) {
$s .= "body{font-size:4vw;}#divMain{width:100%;}#divSidebar{width:100%;}.function{width:50%;font-size:3vw;}";
$s .= "div.post .post-title{width:100%;}div.post .post-date{width:100%;}#divBottom{font-size:2vw;}#divAll{background:white;width:99%;margin:0.3em auto;}#divPage{background:none;}#divMiddle{background:white;width:98%;padding:0;}#divCommentPost input{width:70%;}#divCommentPost input.button{width:50%;}";
}
$zbp->header .= ' <style type="text/css">' . $s . '</style>' . "\r\n";
}
示例9: ActivePlugin_changyan
function ActivePlugin_changyan()
{
global $changyanPlugin, $zbp;
$changyanPlugin = Changyan_Handler::getInstance();
//add_action('init', 'changyan_init');
Add_Filter_Plugin('Filter_Plugin_Zbp_Load', 'changyan_init');
Add_Filter_Plugin('Filter_Plugin_Admin_LeftMenu', 'changyan_AddMenu');
Add_Filter_Plugin('Filter_Plugin_ViewPost_Template', 'changyan_socialcomment');
Add_Filter_Plugin('Filter_Plugin_ViewPost_Template', 'changyan_view_post_template');
Add_Filter_Plugin('Filter_Plugin_ViewList_Template', 'changyan_view_list_template');
Add_Filter_Plugin('Filter_Plugin_Html_Js_Add', 'changyan_html_js_add');
}
示例10: AdminColor_Css
function AdminColor_Css()
{
global $zbp;
echo '<link rel="stylesheet" type="text/css" href="' . $zbp->host . 'zb_users/plugin/AdminColor/css.php"/>' . "\r\n";
echo '<script type="text/javascript">var lang_admincolor_closemenu = "' . $zbp->lang['AdminColor']['closemenu'] . '";var lang_admincolor_expandmenu = "' . $zbp->lang['AdminColor']['expandmenu'] . '"</script>' . "\r\n";
echo '<script src="' . $zbp->host . 'zb_users/plugin/AdminColor/menu.js" type="text/javascript"></script>' . "\r\n";
Add_Filter_Plugin('Filter_Plugin_Admin_LeftMenu', 'AdminColor_Add_Button');
$hm = GetVars('admincolor_hm', 'COOKIE');
if ($hm == '1') {
echo '<style type="text/css">.left{width:36px;background-color:#ededed;}.left #leftmenu span{margin-left:10px;padding-left:100px;}div.main,section.main{padding-left:46px;}</style>';
}
}
示例11: ActivePlugin_LargeData
function ActivePlugin_LargeData()
{
global $zbp;
if ($zbp->option['ZC_LARGE_DATA'] == true && $zbp->db->type == 'mysql') {
Add_Filter_Plugin('Filter_Plugin_Misc_Begin', 'LargeData_Misc_Begin');
Add_Filter_Plugin('Filter_Plugin_Zbp_Load', 'LargeData_Zbp_Begin');
Add_Filter_Plugin('Filter_Plugin_LargeData_Aritcle', 'LargeData_Aritcle');
Add_Filter_Plugin('Filter_Plugin_LargeData_Page', 'LargeData_Page');
Add_Filter_Plugin('Filter_Plugin_LargeData_Comment', 'LargeData_Comment');
Add_Filter_Plugin('Filter_Plugin_LargeData_CountTagArray', 'LargeData_CountTagArray');
Add_Filter_Plugin('Filter_Plugin_Post_Del', 'LargeData_Post_Del');
Add_Filter_Plugin('Filter_Plugin_Tag_Del', 'LargeData_Tag_Del');
}
}
示例12: ActivePlugin_AppCentre
function ActivePlugin_AppCentre() {
global $zbp;
Add_Filter_Plugin('Filter_Plugin_Admin_LeftMenu','AppCentre_AddMenu');
Add_Filter_Plugin('Filter_Plugin_Admin_ThemeMng_SubMenu','AppCentre_AddThemeMenu');
Add_Filter_Plugin('Filter_Plugin_Admin_PluginMng_SubMenu','AppCentre_AddPluginMenu');
Add_Filter_Plugin('Filter_Plugin_Admin_SiteInfo_SubMenu','AppCentre_AddSiteInfoMenu');
if(method_exists('ZBlogPHP','LoadLanguage')){
$zbp->LoadLanguage('plugin','AppCentre');
}else{
if(is_readable($f=$zbp->path . 'zb_users/plugin/AppCentre/language/' . $zbp->option['ZC_BLOG_LANGUAGEPACK'] . '.php'))
$zbp->lang['AppCentre'] = require($f);
elseif(is_readable($f=$zbp->path . 'zb_users/plugin/AppCentre/language/' . 'zh-cn' . '.php'))
$zbp->lang['AppCentre'] = require($f);
}
}
示例13: rawurlencode
case 'search':
$q = rawurlencode(trim(strip_tags(GetVars('q', 'POST'))));
Redirect($zbp->searchurl . '?q=' . $q);
break;
case 'misc':
require './function/c_system_misc.php';
break;
case 'cmt':
$die = false;
if (GetVars('isajax', 'POST')) {
// 兼容老版本的評論前端
Add_Filter_Plugin('Filter_Plugin_Zbp_ShowError', 'RespondError', PLUGIN_EXITSIGNAL_RETURN);
$die = true;
} elseif (GetVars('format', 'POST') == "json") {
// 1.5之後的評論以json形式加載給前端
Add_Filter_Plugin('Filter_Plugin_Zbp_ShowError', 'JsonError4ShowErrorHook', PLUGIN_EXITSIGNAL_RETURN);
$die = true;
}
PostComment();
$zbp->BuildModule();
$zbp->SaveCache();
if ($die) {
exit;
}
Redirect(GetVars('HTTP_REFERER', 'SERVER'));
break;
case 'getcmt':
ViewComments((int) GetVars('postid', 'GET'), (int) GetVars('page', 'GET'));
die;
break;
case 'ArticleEdt':
示例14: ActivePlugin_x2013
function ActivePlugin_x2013()
{
Add_Filter_Plugin('Filter_Plugin_Admin_TopMenu', 'x2013_AddMenu');
Add_Filter_Plugin('Filter_Plugin_ViewList_Template', 'x2013_tags_set');
Add_Filter_Plugin('Filter_Plugin_ViewPost_Template', 'x2013_tags_set');
}
示例15: ViewIndex
/**
* ViewIndex,首頁,搜索頁,feed頁的主函數
* @api Filter_Plugin_ViewIndex_Begin
* @return mixed
*/
function ViewIndex()
{
global $zbp, $action;
foreach ($GLOBALS['hooks']['Filter_Plugin_ViewIndex_Begin'] as $fpname => &$fpsignal) {
$fpreturn = $fpname();
if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
$fpsignal = PLUGIN_EXITSIGNAL_NONE;
return $fpreturn;
}
}
if ($zbp->template->hasTemplate('404')) {
Add_Filter_Plugin('Filter_Plugin_Zbp_ShowError', 'Include_ShowError404');
}
switch ($action) {
case 'feed':
ViewFeed();
break;
case 'search':
ViewSearch();
break;
case '':
default:
if ($zbp->currenturl == $zbp->cookiespath || $zbp->currenturl == $zbp->cookiespath . 'index.php') {
ViewList(null, null, null, null, null);
} elseif (($zbp->option['ZC_STATIC_MODE'] == 'ACTIVE' || isset($_GET['rewrite'])) && (isset($_GET['id']) || isset($_GET['alias']))) {
ViewPost(GetVars('id', 'GET'), GetVars('alias', 'GET'));
} elseif (($zbp->option['ZC_STATIC_MODE'] == 'ACTIVE' || isset($_GET['rewrite'])) && (isset($_GET['page']) || isset($_GET['cate']) || isset($_GET['auth']) || isset($_GET['date']) || isset($_GET['tags']))) {
ViewList(GetVars('page', 'GET'), GetVars('cate', 'GET'), GetVars('auth', 'GET'), GetVars('date', 'GET'), GetVars('tags', 'GET'));
} else {
ViewAuto($zbp->currenturl);
}
}
}