当前位置: 首页>>代码示例>>PHP>>正文


PHP RemoveEventHandler函数代码示例

本文整理汇总了PHP中RemoveEventHandler函数的典型用法代码示例。如果您正苦于以下问题:PHP RemoveEventHandler函数的具体用法?PHP RemoveEventHandler怎么用?PHP RemoveEventHandler使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了RemoveEventHandler函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setEnable

 /**
  * Sets isEnable property value
  * @param bool $isEnable
  */
 public static function setEnable($isEnable = true)
 {
     if ($isEnable && !self::$isEnable) {
         self::$onBeforeHandleKey = AddEventHandler("main", "OnBeforeEndBufferContent", array(__CLASS__, "OnBeforeEndBufferContent"));
         self::$onHandleKey = AddEventHandler("main", "OnEndBufferContent", array(__CLASS__, "OnEndBufferContent"));
         self::$isEnable = true;
         \CJSCore::init(array("fc"), false);
         $actionType = \Bitrix\Main\Context::getCurrent()->getServer()->get("HTTP_BX_ACTION_TYPE");
         if ($actionType == "get_dynamic") {
             //Is it the background request?
             self::$isBackgroundRequest = true;
         }
     } elseif (!$isEnable && self::$isEnable) {
         if (self::$onBeforeHandleKey >= 0) {
             RemoveEventHandler("main", "OnBeforeEndBufferContent", self::$onBeforeHandleKey);
         }
         if (self::$onBeforeHandleKey >= 0) {
             RemoveEventHandler("main", "OnEndBufferContent", self::$onHandleKey);
         }
         self::$isEnable = false;
     }
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:26,代码来源:framecache.php

示例2: array

						<?php 
                    echo $FIELD_NAME == 'UF_BLOG_POST_DOC' ? "" : "<b>" . $arPostField["EDIT_FORM_LABEL"] . ":</b>&nbsp;";
                    ?>
							<?php 
                    $APPLICATION->IncludeComponent("bitrix:system.field.view", $arPostField["USER_TYPE"]["USER_TYPE_ID"], array("arUserField" => $arPostField), null, array("HIDE_ICONS" => "Y"));
                    ?>
						</div>
						<?php 
                }
                ?>
						<?php 
            }
            ?>
						<?php 
            if ($eventHandlerID !== false && intval($eventHandlerID) > 0) {
                RemoveEventHandler('main', 'system.field.view.file', $eventHandlerID);
            }
        }
        ?>
				</div>
				
				<div class="blog-post-meta">
					<div class="blog-post-info-bottom">
						<div class="blog-post-info">
							<div class="blog-author">
							<?php 
        if ($arParams["SEO_USER"] == "Y") {
            ?>
								<noindex>
									<a class="blog-author-icon" href="<?php 
            echo $CurPost["urlToAuthor"];
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php

示例3: BuildUFFields

 public static function BuildUFFields($arUF)
 {
     $arResult = array("AFTER" => "", "AFTER_MOBILE" => "");
     if (is_array($arUF) && count($arUF) > 0) {
         ob_start();
         $eventHandlerID = false;
         $eventHandlerID = AddEventHandler("main", "system.field.view.file", array("CSocNetLogTools", "logUFfileShow"));
         foreach ($arUF as $FIELD_NAME => $arUserField) {
             if (!empty($arUserField["VALUE"])) {
                 $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:system.field.view", $arUserField["USER_TYPE"]["USER_TYPE_ID"], array("arUserField" => $arUserField, "MOBILE" => "Y"), null, array("HIDE_ICONS" => "Y"));
             }
         }
         if ($eventHandlerID !== false && intval($eventHandlerID) > 0) {
             RemoveEventHandler('main', 'system.field.view.file', $eventHandlerID);
         }
         $arResult["AFTER_MOBILE"] = ob_get_clean();
         ob_start();
         $eventHandlerID = false;
         $eventHandlerID = AddEventHandler("main", "system.field.view.file", array("CSocNetLogTools", "logUFfileShow"));
         foreach ($arUF as $FIELD_NAME => $arUserField) {
             if (!empty($arUserField["VALUE"])) {
                 $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:system.field.view", $arUserField["USER_TYPE"]["USER_TYPE_ID"], array("arUserField" => $arUserField), null, array("HIDE_ICONS" => "Y"));
             }
         }
         if ($eventHandlerID !== false && intval($eventHandlerID) > 0) {
             RemoveEventHandler('main', 'system.field.view.file', $eventHandlerID);
         }
         $arResult["AFTER"] .= ob_get_clean();
     }
     return $arResult;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:mobile_helper.php

示例4: ShowComment


//.........这里部分代码省略.........
								<div class="feed-com-files-title"><?php 
                        echo GetMessage("BLOG_PHOTO");
                        ?>
</div>
								<div class="feed-com-files-cont">
									<?php 
                        foreach ($arParams["arImages"][$comment["ID"]] as $val) {
                            ?>
<span class="feed-com-files-photo"><img src="<?php 
                            echo $val["small"];
                            ?>
" alt="" border="0" data-bx-image="<?php 
                            echo $val["full"];
                            ?>
"></span><?php 
                        }
                        ?>
								</div>
							</div>
							<?php 
                    }
                    if ($comment["COMMENT_PROPERTIES"]["SHOW"] == "Y") {
                        $eventHandlerID = AddEventHandler('main', 'system.field.view.file', array('CBlogTools', 'blogUFfileShow'));
                        ?>
<div><?php 
                        foreach ($comment["COMMENT_PROPERTIES"]["DATA"] as $FIELD_NAME => $arPostField) {
                            if (!empty($arPostField["VALUE"])) {
                                $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:system.field.view", $arPostField["USER_TYPE"]["USER_TYPE_ID"], array("arUserField" => $arPostField), null, array("HIDE_ICONS" => "Y"));
                            }
                        }
                        ?>
</div><?php 
                        if ($eventHandlerID !== false && intval($eventHandlerID) > 0) {
                            RemoveEventHandler('main', 'system.field.view.file', $eventHandlerID);
                        }
                    }
                    ?>
						<div class="blog-comment-meta">
						<?php 
                    if ($bCanUserComment === true) {
                        ?>
							<span class="blog-comment-answer"><a href="javascript:void(0)" onclick="return showComment('<?php 
                        echo $comment["ID"];
                        ?>
')"><?php 
                        echo GetMessage("B_B_MS_REPLY");
                        ?>
</a></span>
							<span class="blog-vert-separator"></span>
							<?php 
                    }
                    if (IntVal($comment["PARENT_ID"]) > 0) {
                        ?>
							<span class="blog-comment-parent"><a href="#<?php 
                        echo $comment["PARENT_ID"];
                        ?>
"><?php 
                        echo GetMessage("B_B_MS_PARENT");
                        ?>
</a></span>
							<span class="blog-vert-separator"></span>
							<?php 
                    }
                    ?>
						<span class="blog-comment-link"><a href="#<?php 
                    echo $comment["ID"];
开发者ID:Satariall,项目名称:izurit,代码行数:67,代码来源:template.php

示例5: setEnable

 /**
  * Sets isEnable property value and attaches needed handlers.
  *
  * @param bool $isEnabled Mode control flag.
  *
  * @return void
  */
 public static function setEnable($isEnabled = true)
 {
     if ($isEnabled && !self::$isEnabled) {
         self::$onBeforeHandleKey = AddEventHandler("main", "OnBeforeEndBufferContent", array(self::getInstance(), "onBeforeEndBufferContent"));
         self::$onRestartBufferHandleKey = AddEventHandler("main", "OnBeforeRestartBuffer", array(__CLASS__, "onBeforeRestartBuffer"));
         self::$onBeforeLocalRedirect = AddEventHandler("main", "OnBeforeLocalRedirect", array(__CLASS__, "onBeforeLocalRedirect"), 2);
         self::$isEnabled = true;
         \CJSCore::init(array("fc"), false);
     } elseif (!$isEnabled && self::$isEnabled) {
         if (self::$onBeforeHandleKey >= 0) {
             RemoveEventHandler("main", "OnBeforeEndBufferContent", self::$onBeforeHandleKey);
         }
         if (self::$onRestartBufferHandleKey >= 0) {
             RemoveEventHandler("main", "OnBeforeRestartBuffer", self::$onRestartBufferHandleKey);
         }
         if (self::$onBeforeLocalRedirect >= 0) {
             RemoveEventHandler("main", "OnBeforeLocalRedirect", self::$onBeforeLocalRedirect);
         }
         self::$isEnabled = false;
     }
 }
开发者ID:rasuldev,项目名称:torino,代码行数:28,代码来源:frame.php

示例6: ParseHTMLToBB

 public static function ParseHTMLToBB($html = "")
 {
     $id = AddEventHandler("main", "TextParserBeforeTags", array("CCalendar", "_ParseHack"));
     $TextParser = new CTextParser();
     $TextParser->allow = array("HTML" => "N", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "QUOTE" => "Y", "CODE" => "Y", "FONT" => "Y", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "VIDEO" => "Y", "TABLE" => "Y", "CUT_ANCHOR" => "Y", "ALIGN" => "Y");
     $html = $TextParser->convertText($html);
     $html = htmlspecialcharsback($html);
     // Replace BR
     $html = preg_replace("/\\<br\\s*\\/*\\>/is" . BX_UTF_PCRE_MODIFIER, "\n", $html);
     // Kill &nbsp;
     $html = preg_replace("/&nbsp;/is" . BX_UTF_PCRE_MODIFIER, "", $html);
     // Kill tags
     $html = preg_replace("/\\<([^>]*?)>/is" . BX_UTF_PCRE_MODIFIER, "", $html);
     $html = htmlspecialcharsbx($html);
     RemoveEventHandler("main", "TextParserBeforeTags", $id);
     return $html;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:17,代码来源:calendar.php

示例7: __removeHandlers

 function __removeHandlers()
 {
     RemoveEventHandler('main', 'OnBeforeRestartBuffer', $this->RestartBufferHandlerId);
     RemoveEventHandler('main', 'OnBeforeLocalRedirect', $this->LocalRedirectHandlerId);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:5,代码来源:component_ajax.php

示例8: AddEventHandler

				return $CID;
			if ($arParams['EDIT'] == 'Y')
				$CID = $arResult['UID'];
			return true;
		}
	}
	ob_start();
	$eventHandlerID = AddEventHandler("webdav", "webdav.user.field", "__main_post_form_get_cid_webdav");
	$APPLICATION->IncludeComponent(
		"freetrix:system.field.edit",
		"webdav_element",
		array("arUserField" => $arParams["UPLOAD_WEBDAV_ELEMENT"]),
		null,
		array("HIDE_ICONS" => "Y")
	);
	RemoveEventHandler("webdav", "webdav.user.field", $eventHandlerID);
	$arParams["UPLOAD_WEBDAV_ELEMENT_HTML"] = ob_get_clean();
	$arParams["UPLOAD_WEBDAV_ELEMENT_CID"] = __main_post_form_get_cid_webdav();
}

/***************** Show files from array ***************************/
$b = reset($arParams["FILES"]["VALUE"]); reset($arParams["UPLOAD_FILE"]["INPUT_VALUE"]);
$arFile = ($b ? $b : current($arParams["UPLOAD_FILE"]["INPUT_VALUE"]));
while ($arFile)
{
	$arFile = (is_array($arFile) ? $arFile :
		(array_key_exists($arFile, $arParams["UPLOAD_FILE"]["INPUT_VALUE_ARRAY"]) ? $arParams["UPLOAD_FILE"]["INPUT_VALUE_ARRAY"][$arFile] :
			CFile::GetFileArray($arFile)));
	$arFile["THUMBNAIL"] = (isset($arFile["src"]) ? $arFile["src"] : $arFile["THUMBNAIL"]); // for Blog only
	if ((substr($arFile["CONTENT_TYPE"], 0, 6) == "image/") && empty($arFile["THUMBNAIL"]))
	{
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:file.php

示例9: ob_start

                 $arResult["arComments"][$key]["EVENT"]["RATING_TOTAL_VOTES"] = 0;
             }
             if (strlen($rating_entity_type) > 0) {
                 $arResult["arComments"][$key]["EVENT_FORMATTED"]["ALLOW_VOTE"] = CRatings::CheckAllowVote(array("ENTITY_TYPE_ID" => $rating_entity_type, "OWNER_ID" => $arResult["arComments"][$key]["EVENT"]["USER_ID"]));
             }
             if (is_array($arResult["arComments"][$key]["UF"]) && count($arResult["arComments"][$key]["UF"]) > 0) {
                 ob_start();
                 $eventHandlerID = false;
                 $eventHandlerID = AddEventHandler("main", "system.field.view.file", "__logUFfileShowMobile");
                 foreach ($arResult["arComments"][$key]["UF"] as $FIELD_NAME => $arUserField) {
                     if (!empty($arUserField["VALUE"])) {
                         $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:system.field.view", $arUserField["USER_TYPE"]["USER_TYPE_ID"], array("arUserField" => $arUserField, "MOBILE" => "Y"), null, array("HIDE_ICONS" => "Y"));
                     }
                 }
                 if ($eventHandlerID !== false && intval($eventHandlerID) > 0) {
                     RemoveEventHandler("main", "system.field.view.file", $eventHandlerID);
                 }
                 $strUFBlock = ob_get_contents();
                 ob_end_clean();
                 $arResult["arComments"][$key]["EVENT_FORMATTED"]["UF_FORMATTED"] = $strUFBlock;
             }
             $arResult["arComments"][$key]["EVENT_FORMATTED"]["CAN_EDIT"] = $bHasEditCallback && intval($arResult["arComments"][$key]["EVENT"]["USER_ID"]) > 0 && intval($arResult["arComments"][$key]["EVENT"]["USER_ID"]) == $GLOBALS["USER"]->GetId() ? "Y" : "N";
             $arResult["arComments"][$key]["EVENT_FORMATTED"]["CAN_DELETE"] = $bHasDeleteCallback && $arResult["arComments"][$key]["EVENT_FORMATTED"]["CAN_EDIT"] == "Y" ? "Y" : "N";
             $timestamp = MakeTimeStamp($arResult["arComments"][$key]["EVENT"]["LOG_DATE"]);
             $arFormat = array("tommorow" => "tommorow, " . GetMessage("SONET_LOG_COMMENT_FORMAT_TIME"), "today" => "today, " . GetMessage("SONET_LOG_COMMENT_FORMAT_TIME"), "yesterday" => "yesterday, " . GetMessage("SONET_LOG_COMMENT_FORMAT_TIME"), "" => date("Y", $timestamp) == date("Y") ? GetMessage("SONET_LOG_COMMENT_FORMAT_DATE") : GetMessage("SONET_LOG_COMMENT_FORMAT_DATE_YEAR"));
             $arResult["arComments"][$key]["EVENT_FORMATTED"]["DATETIME"] = FormatDate($arFormat, $timestamp);
         }
     }
 } elseif ($action == "get_more_destination") {
     $arResult["arDestinations"] = false;
     $log_id = intval($_REQUEST["log_id"]);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:ajax.php

示例10: ob_get_contents

                $postText = ob_get_contents();
                ob_end_clean();
                $bSuccess = true;
            }
        }
        $GLOBALS["APPLICATION"]->RestartBuffer();
        if (!$bSuccess) {
            echo $_POST["response_type"] == "json" ? CUtil::PhpToJSObject(array("error" => "*")) : "*";
        } else {
            echo $_POST["response_type"] == "json" ? CUtil::PhpToJSObject(array("text" => $postText)) : $postText;
        }
        die;
    }
    $LocalRedirectHandlerId = AddEventHandler('main', 'OnBeforeLocalRedirect', "LocalRedirectHandler");
    $APPLICATION->IncludeComponent("bitrix:socialnetwork.blog.post.edit", "mobile_empty", array("ID" => $_POST["ACTION"] == "EDIT_POST" && intval($_POST["post_id"]) > 0 ? intval($_POST["post_id"]) : 0, "USER_ID" => $_POST["ACTION"] == "EDIT_POST" && intval($_POST["post_user_id"]) > 0 ? intval($_POST["post_user_id"]) : $GLOBALS["USER"]->GetID(), "PATH_TO_POST_EDIT" => $APPLICATION->GetCurPageParam("success=Y&new_post_id=#post_id#"), "PATH_TO_POST" => "/company/personal/user/" . $GLOBALS["USER"]->GetID() . "/blog/#post_id#/", "USE_SOCNET" => "Y", "SOCNET_GROUP_ID" => intval($_REQUEST["group_id"]), "GROUP_ID" => IsModuleInstalled("bitrix24") ? $GLOBAL_BLOG_GROUP[SITE_ID] : 1, "MOBILE" => "Y"), false, array("HIDE_ICONS" => "Y"));
    RemoveEventHandler('main', 'OnBeforeLocalRedirect', $LocalRedirectHandlerId);
    $GLOBALS["APPLICATION"]->RestartBuffer();
    echo $_POST["response_type"] == "json" ? CUtil::PhpToJSObject(array("error" => "*")) : "*";
    die;
}
$filter = false;
if ($_GET["favorites"] == "Y") {
    $filter = "favorites";
} elseif ($_GET["my"] == "Y") {
    $filter = "my";
} elseif ($_GET["important"] == "Y") {
    $filter = "important";
} elseif ($_GET["work"] == "Y") {
    $filter = "work";
} elseif ($_GET["bizproc"] == "Y") {
    $filter = "bizproc";
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:index.php

示例11: ShowComment


//.........这里部分代码省略.........
										<div class="feed-com-files-title"><?php 
                        echo GetMessage("BLOG_PHOTO");
                        ?>
</div>
										<div class="feed-com-files-cont">
											<?php 
                        foreach ($arParams['arImages'][$comment['ID']] as $val) {
                            ?>
<span class="feed-com-files-photo"><img src="<?php 
                            echo $val['small'];
                            ?>
" alt="" border="0" data-bx-image="<?php 
                            echo $val['full'];
                            ?>
"></span><?php 
                        }
                        ?>
										</div>
									</div>
									<?php 
                    }
                    if ($comment['COMMENT_PROPERTIES']['SHOW'] == "Y") {
                        $eventHandlerID = AddEventHandler('main', 'system.field.view.file', array('CBlogTools', 'blogUFfileShow'));
                        ?>
<div><?php 
                        foreach ($comment['COMMENT_PROPERTIES']['DATA'] as $FIELD_NAME => $arPostField) {
                            if (!empty($arPostField['VALUE'])) {
                                $GLOBALS['APPLICATION']->IncludeComponent("bitrix:system.field.view", $arPostField['USER_TYPE']['USER_TYPE_ID'], array("arUserField" => $arPostField), null, array("HIDE_ICONS" => "Y"));
                            }
                        }
                        ?>
</div><?php 
                        if ($eventHandlerID !== false && intval($eventHandlerID) > 0) {
                            RemoveEventHandler('main', 'system.field.view.file', $eventHandlerID);
                        }
                    }
                    ?>
</div><?php 
                    if ($bCanUserComment === true) {
                        ?>
 <a href="javascript:void(0)" onclick="return showComment('<?php 
                        echo $comment['ID'];
                        ?>
')" class="b-comments__button m_t20"><i class="ico i_bubble-gray"></i><?php 
                        echo GetMessage("B_B_MS_REPLY");
                        ?>
</a><?php 
                    }
                    if ($comment['CAN_EDIT'] == "Y") {
                        ?>
								<script>
									top.text<?php 
                        echo $comment['ID'];
                        ?>
 = text<?php 
                        echo $comment['ID'];
                        ?>
 = '<?php 
                        echo CUtil::JSEscape($comment['~POST_TEXT']);
                        ?>
';
									top.title<?php 
                        echo $comment['ID'];
                        ?>
 = title<?php 
                        echo $comment['ID'];
开发者ID:Tvaruga,项目名称:ae,代码行数:67,代码来源:template.php

示例12: _ib_elm_add

 function _ib_elm_add($arFields, $bWorkFlow = false, $bUpdateSearch = true, $bResizePictures = false)
 {
     global $USER_FIELD_MANAGER;
     global $APPLICATION;
     $bUF = isset($arFields['USER_FIELDS']);
     if ($bUF) {
         $UF_ENTITY = $this->GetUfEntity();
         if (!$USER_FIELD_MANAGER->CheckFields($UF_ENTITY, 0, $arFields['USER_FIELDS'])) {
             if (is_object($APPLICATION) && $APPLICATION->GetException()) {
                 $e = $APPLICATION->GetException();
                 $this->LAST_ERROR .= $e->GetString();
                 return false;
             }
         }
         $handlerID = AddEventHandler('search', 'BeforeIndex', array($this, 'IndexUfValues'));
     }
     if ($bUpdateSearch && $bUF) {
         $bUpdateSearch = false;
     }
     $el = new CIBlockElement();
     $result = $el->Add($arFields, $bWorkFlow, $bUpdateSearch, $bResizePictures);
     $ID = intval($result);
     if ($ID <= 0) {
         $this->LAST_ERROR = $el->LAST_ERROR;
         return false;
     } else {
         if (isset($arFields['PROPERTY_VALUES']) && !$this->ValidatePropertyValues($ID, $arFields['PROPERTY_VALUES'], $arFields['IBLOCK_ID'])) {
             $this->LAST_ERROR = GetMessage("WD_FILE_ERROR111");
             $el->Delete($ID);
             return false;
         }
         if ($bUF) {
             $USER_FIELD_MANAGER->Update($UF_ENTITY, $ID, $arFields['USER_FIELDS']);
             $el->UpdateSearch($ID, true);
         }
         $this->_onEvent('Add', $ID);
     }
     if ($bUF) {
         RemoveEventHandler('search', 'BeforeIndex', $handlerID);
     }
     CWebDavDiskDispatcher::sendEventToOwners(null, array('IBLOCK_ID' => (int) $arFields['IBLOCK_ID'], 'ID' => (int) $arFields['IBLOCK_SECTION_ID']), 'add');
     return (int) $result;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:43,代码来源:iblock.php

示例13: __main_post_form_image_resize

            }
            $arParams["UPLOADS"][] = $val;
        }
    }
}
if (empty($arParams["UPLOADS"])) {
    return;
}
__main_post_form_image_resize($bNull = null, $arParams["UPLOAD_FILE_PARAMS"]);
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_REQUEST['mfi_mode']) && $_REQUEST['mfi_mode'] == "upload") {
    $handlers["main.file.input.upload"] = AddEventHandler('main', "main.file.input.upload", '__main_post_form_image_resize');
}
ob_start();
foreach ($arParams["UPLOADS"] as $v) {
    if (in_array($v["USER_TYPE_ID"], array("file", "webdav_element", "disk_file"))) {
        $APPLICATION->IncludeComponent("bitrix:system.field.edit", $v["USER_TYPE_ID"], array("arUserField" => $v), null, array("HIDE_ICONS" => "Y"));
        $arParams["UPLOADS_CID"][__main_post_form_replace_template()] = array("parser" => $v["USER_TYPE_ID"], "value" => $v["USER_TYPE_ID"] == "file" ? $v["VALUE"] : array(), "postfix" => $v["POSTFIX"]);
    } else {
        if (!empty($v["INPUT_NAME"])) {
            $cid = $GLOBALS["APPLICATION"]->IncludeComponent('bitrix:main.file.input', 'drag_n_drop', array('CONTROL_ID' => $v["CONTROL_ID"], 'INPUT_NAME' => $v["INPUT_NAME"], 'INPUT_NAME_UNSAVED' => 'FILE_NEW_TMP', 'INPUT_VALUE' => $v["INPUT_VALUE"], 'MAX_FILE_SIZE' => $v["MAX_FILE_SIZE"], 'MULTIPLE' => $v["MULTIPLE"], 'MODULE_ID' => $v["MODULE_ID"], 'ALLOW_UPLOAD' => $v["ALLOW_UPLOAD"], 'ALLOW_UPLOAD_EXT' => $v["ALLOW_UPLOAD_EXT"], 'INPUT_CAPTION' => $v["INPUT_CAPTION"]), null, array("HIDE_ICONS" => true));
            $parser = "file";
            $arParams["UPLOADS_CID"][$cid] = array("storage" => "bfile", "parser" => $parser, "postfix" => $v["POSTFIX"]);
        }
    }
}
$arParams["UPLOADS_HTML"] = ob_get_clean();
foreach ($handlers as $eventName => $handlerID) {
    if ($handlerID) {
        RemoveEventHandler("main", $eventName, $handlerID);
    }
}
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:file.php

示例14: ConvertHtmlToBbCode

 public static function ConvertHtmlToBbCode($html)
 {
     $eventID = AddEventHandler('main', 'TextParserBeforeTags', array('CAllCrmMailTemplate', '__ConvertHtmlToBbCode'));
     $parser = new CTextParser();
     $parser->allow = array('HTML' => 'N', 'ANCHOR' => 'Y', 'BIU' => 'Y', 'IMG' => 'Y', 'QUOTE' => 'Y', 'CODE' => 'Y', 'FONT' => 'Y', 'LIST' => 'Y', 'SMILES' => 'Y', 'NL2BR' => 'Y', 'VIDEO' => 'Y', 'TABLE' => 'Y', 'CUT_ANCHOR' => 'Y', 'ALIGN' => 'Y');
     $html = $parser->convertText($html);
     $html = htmlspecialcharsback($html);
     $html = preg_replace("/\\<br\\s*\\/*\\>/i" . BX_UTF_PCRE_MODIFIER, "\n", $html);
     $html = preg_replace("/&nbsp;/i" . BX_UTF_PCRE_MODIFIER, ' ', $html);
     $html = preg_replace("/\\<[^>]+>/" . BX_UTF_PCRE_MODIFIER, '', $html);
     $html = htmlspecialcharsbx($html);
     RemoveEventHandler('main', 'TextParserBeforeTags', $eventID);
     return $html;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:14,代码来源:mail_template.php


注:本文中的RemoveEventHandler函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。