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


PHP CModule::IncludeModuleEx方法代码示例

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


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

示例1:

<?

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
	die();
if (CModule::IncludeModuleEx('prmedia.treelikecomments') != MODULE_DEMO_EXPIRED)
{

	if ($this->StartResultCache($arParams['CACHE_TIME']))
	{
		CModule::IncludeModule("prmedia.treelikecomments");
		CModule::IncludeModule("iblock");

		$arResult['TITLE'] = $arParams['TITLE'];

		$res = CTreelikeComments::getPopularElements($arParams['COUNT']);
		while ($arRes = $res->GetNext())
		{
			$element = CIBlockElement::GetByID($arRes['OBJECT_ID']);
			if ($arElement = $element->GetNext())
			{

				$detailURL = $arParams['DETAIL_PAGE_URL'];
				if (preg_match('/ID/i', $detailURL))
					$detailURL = str_replace('#ID#', $arElement['ID'], $detailURL);
				if (preg_match('/CODE/i', $detailURL))
					$detailURL = str_replace('#CODE#', $arElement['CODE'], $detailURL);
				if (preg_match('/DETAIL_PAGE_URL/i', $detailURL))
					$detailURL = str_replace('#DETAIL_PAGE_URL#', $arElement['DETAIL_PAGE_URL'], $detailURL);
				if (preg_match('/SECTION_ID/i', $detailURL))
					$detailURL = str_replace('#SECTION_ID#', $arElement['IBLOCK_SECTION_ID'], $detailURL);
				if (preg_match('/SECTION_CODE/i', $detailURL))
开发者ID:ASDAFF,项目名称:mp,代码行数:31,代码来源:component.php

示例2: __GetModuleInfo

 /** Возвращает экземпляр класса-инсталятора модуля по абсолютному пути $path **/
 public static function __GetModuleInfo($path)
 {
     $arModuleVersion = array();
     //		include($path."/install/version.php");
     //		if (is_array($arModuleVersion) && array_key_exists("VERSION", $arModuleVersion))
     //			return $arModuleVersion;
     include_once $path . "/install/index.php";
     $arr = explode("/", $path);
     $i = array_search("modules", $arr);
     $module_code = $arr[$i + 1];
     $class_name = str_replace(".", "_", $module_code);
     if (!class_exists($class_name)) {
         return array();
     }
     $cls = new $class_name();
     $result = array("VERSION" => $cls->MODULE_VERSION, "VERSION_DATE" => $cls->MODULE_VERSION_DATE, "IS_DEMO" => defined($class_name . "_DEMO") && constant($class_name . "_DEMO") ? "Y" : "N", "ACTIVE" => "Y");
     if ($result["IS_DEMO"] == "Y" && IsModuleInstalled($module_code) && CModule::IncludeModuleEx($module_code) == MODULE_DEMO_EXPIRED) {
         $result["ACTIVE"] = "N";
     }
     return $result;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:22,代码来源:update_client_partner.php

示例3: modifyMessageList

	public static function modifyMessageList (&$arMessages) {		
	
		if (method_exists("CModule", "IncludeModuleEx") && CModule::IncludeModuleEx(self::$module_id) != MODULE_INSTALLED) {
			$demo_mode = true;
		}
		
		if (!$demo_mode || $GLOBALS['USER']->IsAdmin()) {
				
			if (!is_array($arMessages) || !COption::GetOptionString(self::$module_id, "status")) {
				return true;
			}		
			if ($GLOBALS['USER']->IsAuthorized() && COption::GetOptionString(self::$module_id, "guests_only")) {
				return true;
			}
									
			$advert_code = COption::GetOptionString(self::$module_id, "advert_code");
			$message_positions = COption::GetOptionString(self::$module_id, "message_positions", "");
			$message_interval = COption::GetOptionString(self::$module_id, "message_interval", "4");
			$advert_forums = unserialize(COption::GetOptionString(self::$module_id, "advert_forums", ""));	
					
			if ($message_positions) { 
				$message_positions = explode(',', $message_positions); 
			}

			if(!is_array($advert_forums)) {
				return true;
			}
			
			$i_message = 0;
			$arNewMessages = array();
			$arBannerCache = array();
			foreach ($arMessages as $key=>$arMessage) {				
				$i_message++;
				$arNewMessages[] = $arMessage;

				if ($i_message > 0 && (is_array($message_positions) && in_array($i_message, $message_positions) || ($message_interval && $i_message%$message_interval === 0))) {
					
					if (in_array($arMessage['FORUM_ID'], $advert_forums)) {
						$id = $arMessage['ID']."advert"; 
						$css_id = 'beono_message'.$id;
						$current_post_message_text = '';
						
						// parsing bitrix banners
						if(preg_match_all('/#BXBANNER_([^#]+)#/', $advert_code, $matches)) {
							if (is_array($matches[1]) && !empty($matches[1]) && CModule::IncludeModule('advertising')) {
								$arBannerReplacements = array();
								foreach ($matches[1] as $banner_type) {
									
									if($banner_code = CAdvBanner::Show($banner_type)) {
										$arBannerCache[$banner_type] = $banner_code;
									}									
									$arBannerReplacements[] = $arBannerCache[$banner_type];																
								}
								if (count($arBannerReplacements) > 0) {
									$current_post_message_text = str_replace($matches[0], $arBannerReplacements, $advert_code);
								}					
							}
						} else {
							$current_post_message_text = $advert_code;
						}
						
						if ($current_post_message_text) {
						
							if ($demo_mode) {
								$current_post_message_text .= '<br/><br/><a style="font-weight: bold;" target="_blank" href="http://mp.1c-bitrix.ru/solutions/beono.forumadvert/">1 day demo. Buy full version</a>';
							}
							$current_post_message_text .= '<script type="text/javascript">
							var beono_forum_mess_id = document.getElementById("message_text_'.$id.'");
							if (beono_forum_mess_id) {
								beono_forum_mess_id.parentNode.parentNode.parentNode.parentNode.parentNode.setAttribute("id", "'.$css_id.'");
							}
							</script>
							';
							$current_post_message_text .= '<style type="text/css">#'.$css_id.' .forum-post-date, #'.$css_id.' .forum-cell-contact, #'.$css_id.' .forum-cell-actions, #'.$css_id.' .forum-user-moderate-info {display:none;}</style>';
												
							$arNewMessages[] = array("ID" => $id, "AUTHOR_NAME" => " ", "POST_MESSAGE_TEXT" => $current_post_message_text, "POST_DATE" => "&nbsp;", "APPROVED" => "Y");
						}
					}
				}
			}
			if (!empty($arNewMessages)) {
				$arMessages = $arNewMessages;
			}
		}
		return true;
	}
开发者ID:ASDAFF,项目名称:bitrix-forumadvert,代码行数:86,代码来源:include.php

示例4: array

<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
$module_mode = CModule::IncludeModuleEx("grain.customsettings");
$arCustomPage = array();
$arCustomSettings = array();
$handle = fopen($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/grain.customsettings/admin/settings_data.php", "r");
$settings_data = fread($handle, filesize($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/grain.customsettings/admin/settings_data.php"));
fclose($handle);
ob_start();
$settings_data_error = eval("?>" . $settings_data . "<?") === false;
$err = ob_get_contents();
ob_end_clean();
$settings_data_empty = is_array($arCustomSettings) && count($arCustomSettings) <= 0 || !is_array($arCustomSettings);
//require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/grain.customsettings/admin/settings_data.php");
IncludeModuleLangFile(__FILE__);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/grain.customsettings/prolog.php";
$GKS_RIGHT = $APPLICATION->GetGroupRight("grain.customsettings");
if ($GKS_RIGHT == "D") {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
$aTabs = array();
foreach ($arCustomSettings as $tab_id => $arTab) {
    $aTabs[] = array("DIV" => "edit" . $tab_id, "TAB" => $arTab["LANG"][LANGUAGE_ID]["NAME"], "ICON" => "main_user_edit", "TITLE" => $arTab["LANG"][LANGUAGE_ID]["TITLE"]);
}
$tabControl = new CAdminTabControl("tabControl", $aTabs);
if ($REQUEST_METHOD == "GET" && strlen($RestoreDefaults) > 0 && $GKS_RIGHT >= "S" && check_bitrix_sessid() && $module_mode != MODULE_DEMO_EXPIRED) {
    COption::RemoveOption("grain.customsettings");
    LocalRedirect("/bitrix/admin/gcustomsettings.php?lang=" . LANG);
}
if ($REQUEST_METHOD == "POST" && ($save != "" || $apply != "") && $GKS_RIGHT >= "S" && check_bitrix_sessid() && $module_mode != MODULE_DEMO_EXPIRED) {
开发者ID:Hawkart,项目名称:megatv,代码行数:31,代码来源:gcustomsettings.php

示例5: ConvertTimeStamp

				{
					$arModules[$dir]["MODULE_ID"] = $info->MODULE_ID;
					$arModules[$dir]["MODULE_NAME"] = $info->MODULE_NAME;
					$arModules[$dir]["MODULE_DESCRIPTION"] = $info->MODULE_DESCRIPTION;
					$arModules[$dir]["MODULE_VERSION"] = $info->MODULE_VERSION;
					$arModules[$dir]["MODULE_VERSION_DATE"] = $info->MODULE_VERSION_DATE;
					$arModules[$dir]["MODULE_SORT"] = $info->MODULE_SORT;
					$arModules[$dir]["MODULE_PARTNER"] = $info->PARTNER_NAME;
					$arModules[$dir]["MODULE_PARTNER_URI"] = $info->PARTNER_URI;
					$arModules[$dir]["IsInstalled"] = $info->IsInstalled();
					if(defined(str_replace(".", "_", $info->MODULE_ID)."_DEMO"))
					{
						$arModules[$dir]["DEMO"] = "Y";
						if($info->IsInstalled())
						{
							if(CModule::IncludeModuleEx($info->MODULE_ID) != MODULE_DEMO_EXPIRED)
							{
								$arModules[$dir]["DEMO_DATE"] = ConvertTimeStamp($GLOBALS["SiteExpireDate_".str_replace(".", "_", $info->MODULE_ID)], "SHORT");
							}
							else
								$arModules[$dir]["DEMO_END"] = "Y";
						}
					}
				}
			}
		}
		closedir($handle);
	}
}
uasort($arModules, create_function('$a, $b', 'if($a["MODULE_SORT"] == $b["MODULE_SORT"]) return strcasecmp($a["MODULE_NAME"], $b["MODULE_NAME"]); return ($a["MODULE_SORT"] < $b["MODULE_SORT"])? -1 : 1;'));
开发者ID:ASDAFF,项目名称:open_bx,代码行数:30,代码来源:partner_modules.php

示例6: IncludeModuleLangFile

<?
\Bitrix\Main\Localization\Loc::loadMessages(__FILE__);
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/options.php");

$module_id = "simple.module";

global $settings_id;
$settings_id = "simple_module";

$MODULE_RIGHT = $APPLICATION->GetGroupRight($module_id);
if($MODULE_RIGHT < "W")
{
	CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("ACCESS_DENIED"), "TYPE" => "ERROR"));
	return;
}
CModule::IncludeModuleEx($module_id);

$strWarning = "";

$aTabs = array(
        array("DIV" => "edit1", "TAB" => GetMessage("MAIN_TAB_SET"), "TITLE" => GetMessage("MAIN_TAB_TITLE_SET")),
        array("DIV" => "edit2", "TAB" => GetMessage("MAIN_TAB_RIGHTS"), "ICON" => $settings_id . "_settings", "TITLE" => GetMessage("MAIN_TAB_TITLE_RIGHTS")),
);

$arOptionGroups = array(
// 	array(
// 		GetMessage($settings_id . "_OPTION_GROUP_NAME"),
// 		array(
// 			array("option_text", GetMessage($settings_id . "option_text_OPTION_NAME"), "", array("text", 50)),
// 			array("option_checkbox", GetMessage($settings_id . "option_checkbox_OPTION_NAME"), "", array("checkbox"))
// 		)
开发者ID:alexshipil,项目名称:bitrix.simple.module,代码行数:31,代码来源:options.php

示例7: if

<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); ?>

<?

// component requirements
$MODULE_ID = "prmedia.treelikecomments";
if (CModule::IncludeModuleEx($MODULE_ID) == MODULE_DEMO_EXPIRED)
{
	echo '<div style="border: solid 1px #000; padding: 5px; font-weight: bold; color: #ff0000;">';
	echo GetMessage('PRMEDIA_TREELIKE_COMMENTS_DEMO_EXPIRED');
	echo '</div>';
	return;
}
if(!CModule::IncludeModule("iblock") || !CModule::IncludeModule($MODULE_ID))
{
	return;
}


// --- --- --- @todo move smiles from template folder to component folder
if (!$this->InitComponentTemplate())
{
	return;
}
$template = &$this->GetTemplate();
$templateFolder = $template->GetFolder();
// --- --- ---


// variables processing
$arParams['OBJECT_ID'] = intval($arParams['OBJECT_ID']);
开发者ID:ASDAFF,项目名称:mp,代码行数:31,代码来源:component.php

示例8: require_once

require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php");
define("ADMIN_MODULE_NAME", "beono.forumadvert");
$module_id = 'beono.forumadvert';
$module_path = $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$module_id."/";
global $MESS;
include(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$module_id."/lang/", "/options.php"));
$APPLICATION->SetTitle(GetMessage("BEONO_MODULE_FORUMADVERT_OPTIONS_TAB_1"));
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");

if(!CModule::IncludeModule('forum')) {
	CAdminMessage::ShowMessage(GetMessage('BEONO_MODULE_FORUMADVERT_ERROR_FORUMNOTFOUND'));	
} else {
		
	if ($APPLICATION->GetGroupRight("forum")>="R") {
				
		if (method_exists("CModule", "IncludeModuleEx") && CModule::IncludeModuleEx("beono.forumadvert") == MODULE_DEMO_EXPIRED) {
			CAdminMessage::ShowMessage(GetMessage('BEONO_MODULE_FORUMADVERT_ERROR_EXPIRED'));
		}
		
		$forum_advert_logfile = $module_path."/log.txt";
		
		$arTemplatePath = array();
		$arTemplateMask = array();
		
		// components
		$arTemplateMask[] = $_SERVER['DOCUMENT_ROOT']."/bitrix/components/*/forum.topic.read/templates/.default/template.php";
		$arTemplateMask[] = $_SERVER['DOCUMENT_ROOT']."/bitrix/components/*/forum.topic.read/templates/*/template.php";
		// complex compnents
		$arTemplateMask[] = $_SERVER['DOCUMENT_ROOT']."/bitrix/components/*/forum/templates/.default/*/forum.topic.read/.default/template.php";
		$arTemplateMask[] = $_SERVER['DOCUMENT_ROOT']."/bitrix/components/*/forum/templates/.default/*/forum.topic.read/*/template.php";
		$arTemplateMask[] = $_SERVER['DOCUMENT_ROOT']."/bitrix/components/*/forum/templates/*/*/forum.topic.read/.default/template.php";
开发者ID:ASDAFF,项目名称:bitrix-forumadvert,代码行数:31,代码来源:beono_forumadvert.php

示例9: GetMessage

<?IncludeTemplateLangFile(__FILE__);?><!DOCTYPE html>
<?php 
echo GetMessage("DVS_COPY");
?>
<?
	if(CModule::IncludeModuleEx('dvs.tyres') == 3) {
		echo GetMessage("TEST_END");
		return;
	}
?>
<html>
	<head>
		<link rel="shortcut icon" type="image/x-icon" href="<?php 
echo SITE_TEMPLATE_PATH;
?>
/favicon.ico" />
		<title><?$APPLICATION->ShowTitle()?></title>
		<?$APPLICATION->ShowHead()?>
		<link rel="stylesheet" href="<?php 
echo SITE_TEMPLATE_PATH;
?>
/colors.css" type="text/css" />
		<!--[if IE 9]><link rel="stylesheet" href="<?php 
echo SITE_TEMPLATE_PATH;
?>
/css/ie9.css" type="text/css" /><![endif]-->
		<!--[if IE 8]><link rel="stylesheet" href="<?php 
echo SITE_TEMPLATE_PATH;
?>
/css/ie8.css" type="text/css" /><![endif]-->
		<!--[if IE 7]><link rel="stylesheet" href="<?php 
开发者ID:Andreyjktl,项目名称:test_mega_template,代码行数:31,代码来源:header.php

示例10: array

<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
$arResult = array();

CPageOption::SetOptionString("main", "nav_page_in_session", "N");

if (method_exists("CModule", "IncludeModuleEx") && CModule::IncludeModuleEx("beono.yandexfotki") == MODULE_DEMO_EXPIRED) {
	ShowError('Demo expired');
	echo '<p><a href="http://mp.1c-bitrix.ru/solutions/beono.yandexfotki/">Buy full version</a></p>';
	return;
}

if (!CModule::IncludeModule('beono.yandexfotki')) {
	ShowError('Module beono.yandexfotki is not installed or demo expired');
	return;
}

if (!trim($arParams['AUTHOR'])) {
	ShowError(GetMessage('BEONO_YAFOTKI_ERROR_AUTHOR'));
	return;
}

if (!isset($arParams['SIZE'])) {
	$arParams['SIZE'] = "M";
}

if(!isset($arParams['ITEMS_LIMIT'])) {	
	$arParams['ITEMS_LIMIT'] = 9;
}

$arNavParams = array(
开发者ID:ASDAFF,项目名称:bitrix-yandexfotki,代码行数:31,代码来源:component.php

示例11: gksShowLinksDataSourcePopup

            }
            ?>

}

<?php 
            if (CGrain_CustomSettingsOptions::IsLinksInstalled()) {
                ?>

function gksShowLinksDataSourcePopup(name_prefix,hidden_inputs_container_id) {

	var name_prefix_tmp = 'GKS_TEMP_DSPARAMS';

	<?php 
                $popup = "";
                $module_mode = CModule::IncludeModuleEx("grain.links");
                if ($module_mode == MODULE_DEMO_EXPIRED) {
                    $popup .= GetMessage("GRAIN_CUSTOMSETTINGS_OPTIONS_SETTINGS_LINK_MODULE_TRIAL_EXPIRED");
                } else {
                    $arDataSourceList = CGrain_LinksAdminTools::GetDataSourceList(true);
                    $popup .= '<div style="text-align: center" id="grain_customsettings_data_source_window">\\n';
                    $popup .= GetMessage("GRAIN_CUSTOMSETTINGS_OPTIONS_SETTINGS_LINK_DATA_SOURCE") . ': ';
                    $popup .= '<select name="--NAME--PREFIX--[DATA_SOURCE]" onchange="window.grain_customsettings_dsparams_refresh(true,\\\'--NAME--PREFIX--\\\');" id="grain_customsettings_data_source_select">\\n';
                    $popup .= '\\t<option value=""></option>\\n';
                    foreach ($arDataSourceList as $k => $v) {
                        $popup .= '\\t<option value="' . $k . '">' . $v . '</option>\\n';
                    }
                    $popup .= '</select>\\n';
                    $popup .= '<div id="grain_customsettings_data_source_params">\\n';
                    $popup .= '</div>';
                    $popup .= '</div>';
开发者ID:Hawkart,项目名称:megatv,代码行数:31,代码来源:options.php

示例12: if

<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); ?>
<?

// demo version check
if (CModule::IncludeModuleEx("prmedia.treelikecomments") == MODULE_DEMO_EXPIRED)
{
  echo '<div style="border: solid 1px #000; padding: 5px; font-weight:bold; color: #ff0000;">';
	echo GetMessage('PRMEDIA_TREELIKE_COMMENTS_DEMO_EXPIRED');
	echo '</div>';
	return;
}

// check params
if (!CModule::IncludeModule("iblock"))
{
	// @todo show error (module IBLOCK is not installed)
	return;
}
$arParams["OBJECT_ID"] = intval($arParams["OBJECT_ID"]);
if(!$arParams["OBJECT_ID"])
{
	// @todo show error (OBJECT ID is not exists)
	return;
}
$arParams["NES_RATING"] = intval($arParams["NES_RATING"]);
if($arParams["NES_RATING"] <= 0)
{
	ShowError(GetMessage("PRMEDIA_BC_WRONG_RATING"));
	return;
}
$arParams["NES_COMMENTS_COUNT"] = intval($arParams["NES_COMMENTS_COUNT"]);
开发者ID:ASDAFF,项目名称:mp,代码行数:31,代码来源:component.php


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