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


PHP CFileman::GetAllTemplateParams方法代码示例

本文整理汇总了PHP中CFileman::GetAllTemplateParams方法的典型用法代码示例。如果您正苦于以下问题:PHP CFileman::GetAllTemplateParams方法的具体用法?PHP CFileman::GetAllTemplateParams怎么用?PHP CFileman::GetAllTemplateParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CFileman的用法示例。


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

示例1: GetSiteTemplateParams

	public static function GetSiteTemplateParams($templateId, $siteId)
	{
		return CFileman::GetAllTemplateParams($templateId, $siteId);
	}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:4,代码来源:html_editor.php

示例2: GetSiteTemplateParams

 public static function GetSiteTemplateParams($templateId, $siteId)
 {
     $params = CFileman::GetAllTemplateParams($templateId, $siteId);
     $params["STYLES"] = preg_replace("/(url\\(\"?)images\\//is", "\\1" . $params['SITE_TEMPLATE_PATH'] . '/images/', $params["STYLES"]);
     if (is_array($params['EDITOR_STYLES'])) {
         for ($i = 0, $l = count($params['EDITOR_STYLES']); $i < $l; $i++) {
             $params['EDITOR_STYLES'][$i] = $params['EDITOR_STYLES'][$i] . '?' . @filemtime($_SERVER['DOCUMENT_ROOT'] . $params['EDITOR_STYLES'][$i]);
         }
     }
     return $params;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:11,代码来源:html_editor.php

示例3: ShowHTMLEditControl

    function ShowHTMLEditControl($name, $content, $arParams = array())
    {
        global $USER;
        // We have to avoid of showing HTML-editor with probably unsecure content when loosing the session [mantis:#0007986]
        if ($_SERVER["REQUEST_METHOD"] == "POST" && !check_bitrix_sessid()) {
            return;
        }
        CUtil::InitJSCore(array('window', 'ajax'));
        $relPath = isset($arParams["path"]) ? $arParams["path"] : "/";
        $site = isset($arParams["site"]) ? $arParams["site"] : "";
        $__path = Rel2Abs("/", $relPath);
        $site = CFileMan::__CheckSite($site);
        $name = preg_replace("/[^a-zA-Z0-9_:\\.]/is", "", $name);
        if (!isset($arParams["limit_php_access"])) {
            $arParams["limit_php_access"] = false;
        }
        $arParams["light_mode"] = defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1 || isset($arParams["light_mode"]) && $arParams["light_mode"] == 'Y';
        $io = CBXVirtualIo::GetInstance();
        $direction_rtl = false;
        if ($site) {
            $DOC_ROOT = CSite::GetSiteDocRoot($site);
            $abs_path = $DOC_ROOT . $__path;
            if ($io->FileExists($abs_path)) {
                $relPath = substr($relPath, 0, strrpos($relPath, "/"));
                if ($relPath == "") {
                    $relPath = "/";
                }
            }
        }
        static $bFirstUsed;
        $template = $arParams["templateID"];
        if (!isset($template) && defined('SITE_TEMPLATE_ID')) {
            $template = SITE_TEMPLATE_ID;
        }
        if (!isset($template) && isset($_GET['siteTemplateId'])) {
            $template = $_GET['siteTemplateId'];
        }
        if (!isset($template) && isset($site)) {
            $dbSiteRes = CSite::GetTemplateList($site);
            $SITE_TEMPLATE = array();
            while ($arSiteRes = $dbSiteRes->Fetch()) {
                if ($arSiteRes['CONDITION'] == "" || !isset($template)) {
                    $template = $arSiteRes['TEMPLATE'];
                }
            }
        }
        if (isset($arParams['use_editor_3'])) {
            $useEditor3 = $arParams['use_editor_3'] == "Y";
        } else {
            $useEditor3 = COption::GetOptionString('fileman', "use_editor_3", "Y") == "Y";
        }
        if ($useEditor3) {
            $Editor = new CHTMLEditor();
            $Editor->Show(array('name' => $name, 'id' => $name, 'siteId' => $arParams["site"], 'width' => $arParams["width"], 'height' => $arParams["height"], 'content' => $content, 'bAllowPhp' => !$arParams["bWithoutPHP"] && $USER->CanDoOperation('edit_php'), "limitPhpAccess" => $arParams["limit_php_access"], "display" => $arParams['bDisplay'], "componentFilter" => isset($arParams['componentFilter']) ? $arParams['componentFilter'] : false, "setFocusAfterShow" => isset($arParams['setFocusAfterShow']) ? $arParams['setFocusAfterShow'] : true, "relPath" => $relPath, "templateId" => $template));
            return;
        }
        //Taskbars
        $arTaskbars = isset($arParams["arTaskbars"]) ? $arParams["arTaskbars"] : array();
        //Toolbars
        $arToolbars = isset($arParams["arToolbars"]) ? $arParams["arToolbars"] : false;
        // Toolbar config
        $arParams["toolbarConfig"] = is_array($arParams["toolbarConfig"]) ? $arParams["toolbarConfig"] : false;
        $arParams["use_advanced_php_parser"] = COption::GetOptionString("fileman", "use_advanced_php_parser", "Y");
        $arParams["ar_entities"] = COption::GetOptionString("fileman", "ar_entities", 'umlya,greek,other');
        if ($arParams["ar_entities"] == 'none') {
            $arParams["ar_entities"] = '';
        }
        if (!isset($arParams["usePspell"])) {
            $arParams["usePspell"] = COption::GetOptionString("fileman", "use_pspell", "N");
        }
        if (!isset($arParams["useCustomSpell"])) {
            $arParams["useCustomSpell"] = COption::GetOptionString("fileman", "use_custom_spell", "Y");
        }
        $arParams['allowRenderComp2'] = COption::GetOptionString('fileman', "allow_render_components", "N") == 'Y';
        $arParams['renderComponents'] = $arParams['allowRenderComp2'] && CUserOptions::GetOption('fileman', "render_components", "Y") == 'Y';
        $lca = COption::GetOptionString("fileman", "use_lca", "N");
        $styleList_render_style = COption::GetOptionString("fileman", "render_styles_in_classlist", "Y") == 'Y' ? 'true' : 'false';
        $arAdditionalParams = isset($arParams["arAdditionalParams"]) ? $arParams["arAdditionalParams"] : array();
        $arResult = CFileman::GetAllTemplateParams($template, $site, $arParams["bWithoutPHP"] != true, $arAdditionalParams);
        $arParams["TEMPLATE"] = $arResult;
        if ($bUseOnlyDefinedStyles && !is_set($arResult, "STYLES_TITLE")) {
            $bUseOnlyDefinedStyles = false;
        }
        $arParams["body_class"] = COption::GetOptionString("fileman", "editor_body_class", "");
        $arParams["body_id"] = COption::GetOptionString("fileman", "editor_body_id", "");
        ?>
		<script bxrunfirst="true">
			var relPath = "<?php 
        echo CUtil::JSEscape($relPath);
        ?>
";
			var <?php 
        echo 'ar_' . $name . '_taskbars';
        ?>
 = {};
			<?php 
        for ($k = 0, $l = count($arTaskbars); $k < $l; $k++) {
            echo 'ar_' . $name . '_taskbars["' . $arTaskbars[$k] . '"] = true;';
        }
        if ($arToolbars !== false) {
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:fileman.php

示例4: Copyright

# Copyright (c) 2002-2006 Bitrix             #
# http://www.bitrixsoft.com                  #
# mailto:admin@bitrixsoft.com                #
##############################################
*/
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/prolog.php";
if (!$USER->CanDoOperation('fileman_view_file_structure') || !$USER->CanDoOperation('fileman_edit_existent_files')) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/include.php";
if (CModule::IncludeModule("compression")) {
    CCompress::Disable2048Spaces();
}
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : false;
if (!check_bitrix_sessid()) {
    die('<!--BX_EDITOR_DUBLICATE_ACTION_REQUEST' . bitrix_sessid() . '-->');
}
if ($action == 'sitetemplateparams') {
    $templateID = $_GET['templateID'];
    ?>
	<script>
	window.bx_template_params = <?php 
    echo CUtil::PhpToJSObject(CFileman::GetAllTemplateParams($templateID, $site));
    ?>
;
	</script>
	<?php 
}
define("ADMIN_AJAX_MODE", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_after.php";
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:fileman_editor_action.php


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