本文整理汇总了PHP中__bx_share_get_handlers函数的典型用法代码示例。如果您正苦于以下问题:PHP __bx_share_get_handlers函数的具体用法?PHP __bx_share_get_handlers怎么用?PHP __bx_share_get_handlers使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了__bx_share_get_handlers函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __bx_share_get_handlers
<?php
/**
* Bitrix Framework
* @package bitrix
* @subpackage main
* @copyright 2001-2013 Bitrix
*/
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/bitrix/main.share/util.php";
/**
* Come from GetTemplateProps()
* @param string $templateName
* @param string $siteTemplate
* @param array $arCurrentValues
*/
$arHandlers = __bx_share_get_handlers($templateName, $siteTemplate);
$arTemplateParameters = array("HIDE" => array("NAME" => GetMessage("BOOKMARK_HIDE"), "TYPE" => "CHECKBOX", "VALUE" => "Y", "DEFAULT" => "N"), "HANDLERS" => array("NAME" => GetMessage("BOOKMARK_SYSTEM"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arHandlers["HANDLERS"], "DEFAULT" => $arHandlers["HANDLERS_DEFAULT"], "REFRESH" => "Y"), "PAGE_URL" => array("NAME" => GetMessage("BOOKMARK_URL"), "TYPE" => "STRING", "DEFAULT" => ""), "PAGE_TITLE" => array("NAME" => GetMessage("BOOKMARK_TITLE"), "TYPE" => "STRING", "DEFAULT" => ""));
if (is_array($arCurrentValues["HANDLERS"]) && in_array("twitter", $arCurrentValues["HANDLERS"]) > 0) {
$arTemplateParameters["SHORTEN_URL_LOGIN"] = array("NAME" => GetMessage("BOOKMARK_SHORTEN_URL_LOGIN"), "TYPE" => "STRING", "DEFAULT" => "");
$arTemplateParameters["SHORTEN_URL_KEY"] = array("NAME" => GetMessage("BOOKMARK_SHORTEN_URL_KEY"), "TYPE" => "STRING", "DEFAULT" => "");
}
示例2: array
die;
}
if (!CModule::IncludeModule("blog")) {
return false;
}
$arThemesMessages = array("blue" => GetMessage("BLG_THEME_BLUE"), "green" => GetMessage("BLG_THEME_GREEN"), "red" => GetMessage("BLG_THEME_RED"), "red2" => GetMessage("BLG_THEME_RED2"), "orange" => GetMessage("BLG_THEME_ORANGE"));
$arThemes = array();
$dir = trim(preg_replace("'[\\\\/]+'", "/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/bitrix/blog/templates/.default/themes/"));
if (is_dir($dir) && ($directory = opendir($dir))) {
while (($file = readdir($directory)) !== false) {
if ($file != "." && $file != ".." && is_dir($dir . $file)) {
$arThemes[$file] = !empty($arThemesMessages[$file]) ? $arThemesMessages[$file] : strtoupper(substr($file, 0, 1)) . strtolower(substr($file, 1));
}
}
closedir($directory);
}
$arTemplateParameters = array("THEME" => array("PARENT" => "TEMPLATE_TEMPLATES_SETTINGS", "NAME" => GetMessage("BLG_THEME"), "TYPE" => "LIST", "VALUES" => $arThemes, "MULTIPLE" => "N", "DEFAULT" => "blue"), "USER_PROPERTY_NAME" => array("NAME" => GetMessage("USER_PROPERTY_NAME"), "TYPE" => "STRING", "DEFAULT" => ""), "BLOG_URL" => array("NAME" => GetMessage("ONE_BLOG_BLOG_URL"), "TYPE" => "STRING", "DEFAULT" => "", "PARENT" => "BASE"), "NAME_TEMPLATE" => array("TYPE" => "LIST", "NAME" => GetMessage("BC_NAME_TEMPLATE"), "VALUES" => CComponentUtil::GetDefaultNameTemplates(), "MULTIPLE" => "N", "ADDITIONAL_VALUES" => "Y", "DEFAULT" => GetMessage("BC_NAME_TEMPLATE_DEFAULT")), "SHOW_LOGIN" => array("NAME" => GetMessage("BC_SHOW_LOGIN"), "TYPE" => "CHECKBOX", "MULTIPLE" => "N", "VALUE" => "Y", "DEFAULT" => "Y"), "DO_NOT_SHOW_SIDEBAR" => array("NAME" => GetMessage("BC_DO_NOT_SHOW_SIDEBAR"), "TYPE" => "CHECKBOX", "MULTIPLE" => "N", "VALUE" => "Y", "DEFAULT" => "N"), "DO_NOT_SHOW_MENU" => array("NAME" => GetMessage("BC_DO_NOT_SHOW_MENU"), "TYPE" => "CHECKBOX", "MULTIPLE" => "N", "VALUE" => "Y", "DEFAULT" => "N"), "USE_SHARE" => array("NAME" => GetMessage("BC_USE_SHARE"), "TYPE" => "CHECKBOX", "MULTIPLE" => "N", "VALUE" => "Y", "DEFAULT" => "N", "REFRESH" => "Y"));
if ($arCurrentValues["USE_SHARE"] == "Y") {
$arTemplateParameters["SHARE_HIDE"] = array("NAME" => GetMessage("BC_SHARE_HIDE"), "TYPE" => "CHECKBOX", "VALUE" => "Y", "DEFAULT" => "N");
$arTemplateParameters["SHARE_TEMPLATE"] = array("NAME" => GetMessage("BC_SHARE_TEMPLATE"), "DEFAULT" => "", "TYPE" => "STRING", "MULTIPLE" => "N", "COLS" => 25, "REFRESH" => "Y");
if (strlen(trim($arCurrentValues["SHARE_TEMPLATE"])) <= 0) {
$shareComponentTemlate = false;
} else {
$shareComponentTemlate = trim($arCurrentValues["SHARE_TEMPLATE"]);
}
include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/bitrix/main.share/util.php";
$arHandlers = __bx_share_get_handlers($shareComponentTemlate);
$arTemplateParameters["SHARE_HANDLERS"] = array("NAME" => GetMessage("BC_SHARE_SYSTEM"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arHandlers["HANDLERS"], "DEFAULT" => $arHandlers["HANDLERS_DEFAULT"]);
$arTemplateParameters["SHARE_SHORTEN_URL_LOGIN"] = array("NAME" => GetMessage("BC_SHARE_SHORTEN_URL_LOGIN"), "TYPE" => "STRING", "DEFAULT" => "");
$arTemplateParameters["SHARE_SHORTEN_URL_KEY"] = array("NAME" => GetMessage("BC_SHARE_SHORTEN_URL_KEY"), "TYPE" => "STRING", "DEFAULT" => "");
}
示例3: __bx_share_get_handlers
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/bitrix/main.share/util.php";
$arHandlers = __bx_share_get_handlers($templateName);
$arTemplateParameters = array("HIDE" => array("NAME" => GetMessage("BOOKMARK_HIDE"), "TYPE" => "CHECKBOX", "VALUE" => "Y", "DEFAULT" => "N"), "HANDLERS" => array("NAME" => GetMessage("BOOKMARK_SYSTEM"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arHandlers["HANDLERS"], "DEFAULT" => $arHandlers["HANDLERS_DEFAULT"], "REFRESH" => "Y"), "PAGE_URL" => array("NAME" => GetMessage("BOOKMARK_URL"), "TYPE" => "STRING", "DEFAULT" => ""), "PAGE_TITLE" => array("NAME" => GetMessage("BOOKMARK_TITLE"), "TYPE" => "STRING", "DEFAULT" => ""));
if (is_array($arCurrentValues["HANDLERS"]) && in_array("twitter", $arCurrentValues["HANDLERS"]) > 0) {
$arTemplateParameters["SHORTEN_URL_LOGIN"] = array("NAME" => GetMessage("BOOKMARK_SHORTEN_URL_LOGIN"), "TYPE" => "STRING", "DEFAULT" => "");
$arTemplateParameters["SHORTEN_URL_KEY"] = array("NAME" => GetMessage("BOOKMARK_SHORTEN_URL_KEY"), "TYPE" => "STRING", "DEFAULT" => "");
}