本文整理汇总了PHP中CWizardUtil::ReplaceMacrosRecursive方法的典型用法代码示例。如果您正苦于以下问题:PHP CWizardUtil::ReplaceMacrosRecursive方法的具体用法?PHP CWizardUtil::ReplaceMacrosRecursive怎么用?PHP CWizardUtil::ReplaceMacrosRecursive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWizardUtil
的用法示例。
在下文中一共展示了CWizardUtil::ReplaceMacrosRecursive方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ReplaceMacrosRecursive
function ReplaceMacrosRecursive($filePath, $arReplace)
{
CWizardUtil::ReplaceMacrosRecursive($filePath, $arReplace);
}
示例2: array
$dbRes = CForumNew::GetListEx(array(), array("SITE_ID" => WIZARD_SITE_ID, "XML_ID" => $forumCode));
if ($arRes = $dbRes->Fetch()) {
$tasksForumId = $arRes["ID"];
} else {
$arGroupID = array("GENERAL" => 0, "COMMENTS" => 0, "HIDDEN" => 0);
$dbExistsGroup = CForumGroup::GetListEx(array(), array("LID" => LANGUAGE_ID));
while ($arExistsGroup = $dbExistsGroup->Fetch()) {
foreach ($arGroupID as $xmlID => $ID) {
if ($arExistsGroup["NAME"] == GetMessage($xmlID . "_GROUP_NAME")) {
$arGroupID[$xmlID] = $arExistsGroup["ID"];
}
}
}
$arFields = array("XML_ID" => $forumCode, "NAME" => "Intranet Tasks", "DESCRIPTION" => false, "SORT" => 1, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "A", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "DEDUPLICATION" => "N", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR . "community/forum/messages/forum#FORUM_ID#/topic#TOPIC_ID#/message#MESSAGE_ID#/#message#MESSAGE_ID#"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array("2" => "E", WIZARD_PORTAL_ADMINISTRATION_GROUP => "Y", WIZARD_EMPLOYEES_GROUP => "M", WIZARD_PERSONNEL_DEPARTMENT_GROUP => "M"), "FORUM_GROUP_ID" => $arGroupID["HIDDEN"]);
$tasksForumId = CForumNew::Add($arFields);
}
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/_index.php", array("TASKS_IBLOCK_ID" => $tasksIblockId));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/desktop.php", array("TASKS_IBLOCK_ID" => $tasksIblockId));
$arReplace = array("BLOG_GROUP_ID" => $blogGroupID, "FORUM_ID" => $forumID, "FILES_USER_IBLOCK_ID" => $filesUserIBlockID, "CALENDAR_USER_IBLOCK_ID" => $calendarUserIBlockID, "PHOTO_USER_IBLOCK_ID" => $photoUserIBlockID, "PHOTO_FORUM_ID" => $photoForumID, "TASKS_IBLOCK_ID" => $tasksIblockId, "TASKS_FORUM_ID" => $tasksForumId);
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/company/personal.php", $arReplace);
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/index_b24.php", $arReplace);
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/index.php", $arReplace);
$arReplace = array("BLOG_GROUP_ID" => $blogGroupID, "FORUM_ID" => $forumID, "FILES_GROUP_IBLOCK_ID" => $filesGroupIBlockID, "CALENDAR_IBLOCK_ID" => $calendarGroupIBlockID, "PHOTO_GROUP_IBLOCK_ID" => $photoGroupIBlockID, "PHOTO_FORUM_ID" => $photoForumID, "TASKS_IBLOCK_ID" => $tasksIblockId, "TASKS_FORUM_ID" => $tasksForumId);
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/workgroups/index.php", $arReplace);
$arReplace = array("FILES_GROUP_IBLOCK_ID" => $filesGroupIBlockID, "FILES_USER_IBLOCK_ID" => $filesUserIBlockID);
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/docs/index.php", $arReplace);
$arReplace = array("FILES_GROUP_IBLOCK_ID" => $filesGroupIBlockID, "FILES_USER_IBLOCK_ID" => $filesUserIBlockID, "TASKS_FORUM_ID" => $tasksForumId);
CWizardUtil::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "/m/", $arReplace);
}
}
示例3: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
COption::SetOptionString("form", "SIMPLE", "N");
/*if (WIZARD_IS_RERUN)
return;
*/
if (!CModule::IncludeModule("form")) {
return;
}
$arMenuItem = array(GetMessage("FSMENUT"), WIZARD_SITE_DIR . "services/requests/", array(), array(), "");
WizardServices::AddMenuItem(WIZARD_SITE_DIR . "services/.left.menu.php", $arMenuItem, WIZARD_SITE_ID, 4);
WizardServices::CopyFile(WIZARD_SERVICE_RELATIVE_PATH . "/public/" . LANGUAGE_ID . "/requests", WIZARD_SITE_DIR . "services/requests");
//WizardServices::CopyFile(WIZARD_SERVICE_RELATIVE_PATH."/public/".LANGUAGE_ID."/resume.php", WIZARD_SITE_DIR . "about/resume.php");
CWizardUtil::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "services/", array("SITE_DIR" => WIZARD_SITE_DIR));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "services/requests/index.php", array("SITE_ID" => WIZARD_SITE_ID));
COption::SetOptionString("form", "FORM_DEFAULT_PERMISSION", 10);
COption::SetOptionString("form", "GROUP_DEFAULT_RIGHT", "D");
$APPLICATION->SetGroupRight("form", WIZARD_PERSONNEL_DEPARTMENT_GROUP, "W");
$APPLICATION->SetGroupRight("form", WIZARD_PORTAL_ADMINISTRATION_GROUP, "W");
示例4: DeleteDirFilesEx
}
if (file_exists(WIZARD_SITE_PATH . "bitrix/templates/login")) {
DeleteDirFilesEx(WIZARD_SITE_DIR . "bitrix/templates/login");
}
if (file_exists(WIZARD_SITE_PATH . "company/meeting")) {
DeleteDirFilesEx(WIZARD_SITE_DIR . "company/meeting");
}
}
}
}
if (WIZARD_SITE_ID == 's1' && !WIZARD_NEW_2011) {
CopyDirFiles(WIZARD_ABSOLUTE_PATH . "/site/public/.department.menu_ext.php", WIZARD_SITE_PATH . "/.department.menu_ext.php", false);
}
$dateTimeFormat = LANGUAGE_ID == "en" ? "F j, Y h:i a" : (LANGUAGE_ID == "de" ? "j. F Y H:i:s" : "d.m.Y H:i:s");
$dateFormat = LANGUAGE_ID == "en" ? "F j, Y" : (LANGUAGE_ID == "de" ? "j. F Y" : "d.m.Y");
$dateFormatNoYear = LANGUAGE_ID == "en" ? "F j" : (LANGUAGE_ID == "de" ? "j. F" : "d.m");
CWizardUtil::ReplaceMacrosRecursive(WIZARD_SITE_PATH, array("SITE_DIR" => WIZARD_SITE_DIR, "DATE_TIME_FORMAT" => $dateTimeFormat, "DATE_FORMAT" => $dateFormat, "DATE_FORMAT_NO_YEAR" => $dateFormatNoYear));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/desktop.php", array("SITE_ID" => WIZARD_SITE_ID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/_index.php", array("SITE_ID" => WIZARD_SITE_ID));
if (WIZARD_INSTALL_DEMO_DATA || WIZARD_B24_TO_CP) {
$arUrlRewrite = array();
if (file_exists(WIZARD_SITE_ROOT_PATH . "/urlrewrite.php")) {
include WIZARD_SITE_ROOT_PATH . "/urlrewrite.php";
}
$arNewUrlRewrite = array(array("CONDITION" => "#^" . WIZARD_SITE_DIR . "company/gallery/#", "RULE" => "", "ID" => "bitrix:photogallery_user", "PATH" => WIZARD_SITE_DIR . "company/gallery/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "company/personal/#", "RULE" => "", "ID" => "bitrix:socialnetwork_user", "PATH" => WIZARD_SITE_DIR . "company/personal.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "about/gallery/#", "RULE" => "", "ID" => "bitrix:photogallery", "PATH" => WIZARD_SITE_DIR . "about/gallery/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "workgroups/#", "RULE" => "", "ID" => "bitrix:socialnetwork_group", "PATH" => WIZARD_SITE_DIR . "workgroups/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "services/lists/#", "RULE" => "", "ID" => "bitrix:lists", "PATH" => WIZARD_SITE_DIR . "services/lists/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "services/faq/#", "RULE" => "", "ID" => "bitrix:support.faq", "PATH" => WIZARD_SITE_DIR . "services/faq/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "services/bp/#", "RULE" => "", "ID" => "bitrix:bizproc.wizards", "PATH" => WIZARD_SITE_DIR . "services/bp/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "services/idea/#", "RULE" => "", "ID" => "bitrix:idea", "PATH" => WIZARD_SITE_DIR . "services/idea/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "tasks/getfile/(\\d+)/(\\d+)/([^/]+)#", "RULE" => "taskid=\$1&fileid=\$2&filename=\$3", "ID" => "bitrix:tasks_tools_getfile", "PATH" => WIZARD_SITE_DIR . "tasks/getfile.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "docs/pub/#", "RULE" => "", "ID" => "bitrix:disk.external.link", "PATH" => WIZARD_SITE_DIR . "docs/pub/extlinks.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "/docs/all#", "RULE" => "", "ID" => "bitrix:disk.aggregator", "PATH" => WIZARD_SITE_DIR . "docs/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "docs/sale/#", "RULE" => "", "ID" => "bitrix:disk.common", "PATH" => WIZARD_SITE_DIR . "docs/sale/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "docs/shared#", "RULE" => "", "ID" => "bitrix:disk.common", "PATH" => WIZARD_SITE_DIR . "docs/shared/index.php"), array("CONDITION" => "#^" . WIZARD_SITE_DIR . "docs/manage/#", "RULE" => "", "ID" => "bitrix:disk.common", "PATH" => WIZARD_SITE_DIR . "docs/manage/index.php"), array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'services/processes/#', 'RULE' => '', 'ID' => 'bitrix:lists', 'PATH' => WIZARD_SITE_DIR . '/services/processes/index.php'));
foreach ($arNewUrlRewrite as $arUrl) {
if (!in_array($arUrl, $arUrlRewrite)) {
CUrlRewriter::Add($arUrl);
}
}
}
示例5: InstallPublic
function InstallPublic($iblock_type = false, $iblock_id = false, $site_dir = "/")
{
global $APPLICATION;
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/eshopapp/public/" . LANGUAGE_ID . "/eshop_app/", $_SERVER["DOCUMENT_ROOT"] . $site_dir . "eshop_app/", true, true);
/*if (!intval($_REQUEST["eshopapp_iblock_type"]))
$this->errors = GetMessage("APP_IBLOCK_TYPE_ERROR");
if (!intval($_REQUEST["eshopapp_iblock_id"]))
$this->errors = GetMessage("APP_IBLOCK_ID_ERROR");
if($this->errors !== false)
{
$APPLICATION->ThrowException(implode("<br>", $this->errors));
return false;
} */
$curCatalogIblockId = $iblock_id ? $iblock_id : intval($_REQUEST["eshopapp_iblock_id"]);
$curCatalogIblockType = $iblock_type ? $iblock_type : $_REQUEST["eshopapp_iblock_type"];
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/classes/general/wizard_util.php";
CWizardUtil::ReplaceMacrosRecursive($_SERVER["DOCUMENT_ROOT"] . $site_dir . "eshop_app/", array("CATALOG_IBLOCK_ID" => $curCatalogIblockId));
CWizardUtil::ReplaceMacrosRecursive($_SERVER["DOCUMENT_ROOT"] . $site_dir . "eshop_app/", array("CATALOG_IBLOCK_TYPE" => $curCatalogIblockType));
CWizardUtil::ReplaceMacrosRecursive($_SERVER["DOCUMENT_ROOT"] . $site_dir . "eshop_app/", array("SITE_DIR" => $site_dir));
return true;
}
示例6: array
} else {
$arSites = array();
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/_index.php", array("OUR_LIFE_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/desktop.php", array("OUR_LIFE_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/about/life.php", array("OUR_LIFE_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "/m/", array("OUR_LIFE_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/services/event_list.php", array("OUR_LIFE_IBLOCK_ID" => $iblockID));
// set code for iblock that shoul be logged in sonet
$val = COption::GetOptionString("intranet", "sonet_log_news_iblock", "", WIZARD_SITE_ID);
if (strlen($val) > 0) {
$arVal = unserialize($val);
if (!is_array($arVal) || count($arVal) <= 0) {
$arVal = array();
}
} else {
$arVal = array();
}
if (!in_array("our_life_" . WIZARD_SITE_ID, $arVal)) {
$arVal[] = "our_life_" . WIZARD_SITE_ID;
}
$val = serialize($arVal);
示例7: array
$arSites = array();
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/_index.php", array("OFFICIAL_NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/desktop.php", array("OFFICIAL_NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/about/index.php", array("OFFICIAL_NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/about/official.php", array("OFFICIAL_NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "/m/", array("OFFICIAL_NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/services/event_list.php", array("OFFICIAL_NEWS_IBLOCK_ID" => $iblockID));
$val = COption::GetOptionString("intranet", "sonet_log_news_iblock", "", WIZARD_SITE_ID);
if (strlen($val) > 0) {
$arVal = unserialize($val);
if (!is_array($arVal) || count($arVal) <= 0) {
$arVal = array();
}
} else {
$arVal = array();
}
if (!in_array("official_news_" . WIZARD_SITE_ID, $arVal)) {
$arVal[] = "official_news_" . WIZARD_SITE_ID;
}
$val = serialize($arVal);
COption::SetOptionString("intranet", "sonet_log_news_iblock", $val, false, WIZARD_SITE_ID);