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


PHP CForumNew::GetByIDEx方法代码示例

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


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

示例1: checkParams

 protected static function checkParams($arMessage = array(), &$arTopic, &$arForum)
 {
     if (\Freetrix\Main\Loader::includeModule('forum')) {
         $arTopic = !empty($arTopic) ? $arTopic : \CForumTopic::GetByID($arMessage["TOPIC_ID"]);
         if (empty($arTopic)) {
             return false;
         }
         $arSitemaps = SitemapForumTable::getSitemapsByEntityId($arTopic["FORUM_ID"]);
         if (!empty($arSitemaps) && ($arForum = \CForumNew::GetByIDEx($arTopic["FORUM_ID"])) && $arForum) {
             $arForum["PATH2FORUM_MESSAGE"] = \CForumNew::GetSites($arTopic["FORUM_ID"]);
             $date = MakeTimeStamp($arTopic['LAST_POST_DATE']);
             $result = array();
             foreach ($arSitemaps as $arSitemap) {
                 $path = $arForum["PATH2FORUM_MESSAGE"][$arSitemap["SITE_ID"]];
                 if (!empty($path)) {
                     $arSitemap["fileName"] = str_replace("#FORUM_ID#", $arForum["ID"], $arSitemap['SITEMAP_FILE_FORUM']);
                     $arSitemap["url"] = \CForumNew::PreparePath2Message($path, array("FORUM_ID" => $arForum["ID"], "TOPIC_ID" => $arTopic["ID"], "TITLE_SEO" => $arTopic["TITLE_SEO"], "MESSAGE_ID" => "s", "SOCNET_GROUP_ID" => $arTopic["SOCNET_GROUP_ID"], "OWNER_ID" => $arTopic["OWNER_ID"], "PARAM1" => $arTopic["PARAM1"], "PARAM2" => $arTopic["PARAM2"]));
                     $arSitemap["date"] = $date;
                     $result[] = $arSitemap;
                 }
             }
             return empty($result) ? false : $result;
         }
     }
     return false;
 }
开发者ID:ASDAFF,项目名称:open_bx,代码行数:26,代码来源:sitemapforum.php

示例2: array

		)
	);
	if ($db_res && $res = $db_res->GetNext())
	{
		$arIblock = $res;
	}
	if ($arParams["CACHE_TIME"] > 0)
	{
		$cache->StartDataCache();
		CForumCacheManager::SetTag($cache_path_main, "forum_".$arParams["FORUM_ID"]);
		$cache->EndDataCache(array("arIblock" => $arIblock));
	}
}
$arResult["ELEMENT"] = $arIblock;
// FORUM
$arResult["FORUM"] = CForumNew::GetByIDEx($arParams["FORUM_ID"], SITE_ID);
// USER PERMISSION
$arResult["USER"] = array(
	"ID" => $USER->GetID(),
	"GROUPS" => $USER->GetUserGroupArray(),
	"PERMISSION" => ForumCurrUserPermissions($arParams["FORUM_ID"]),
	"SHOWED_NAME" => $GLOBALS["FORUM_STATUS_NAME"]["guest"],
	"SUBSCRIBE" => array(),
	"FORUM_SUBSCRIBE" => "N",
	"TOPIC_SUBSCRIBE" => "N");
/********************************************************************
				/Main Params
 ********************************************************************/

if (empty($arResult["FORUM"])):
	ShowError(str_replace("#FORUM_ID#", $arParams["FORUM_ID"], GetMessage("F_ERR_FID_IS_NOT_EXIST")));
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:component.php

示例3: setForum

 protected function setForum($id)
 {
     if (!$this->checkForumId($id)) {
         throw new ArgumentTypeException(Loc::getMessage("FORUM_CM_FORUM_IS_WRONG"), self::ERROR_PARAMS_FORUM_ID);
     }
     $this->forum = \CForumNew::GetByIDEx($id, SITE_ID);
     if (!$this->forum) {
         throw new ArgumentException(Loc::getMessage("FORUM_CM_FORUM_IS_LOST"), self::ERROR_PARAMS_FORUM_ID);
     }
     return $this;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:11,代码来源:baseobject.php

示例4: array

 if (count($FilterMess) > 0) {
     $dbMessage = CForumMessage::GetList(array("FORUM_ID" => "ASC", "TOPIC_ID" => "ASC"), array("AUTHOR_ID" => $UID, "PERMISSION" => $FilterMess));
     $dbMessage->NavStart($PAGE_ELEMENTS, false);
     if ($dbMessage) {
         $arMessage = array();
         $arTopic = array();
         $arForum = array();
         // User right`s
         $arUserGroup = CUser::GetUserGroup($UID);
         if (!in_array(2, $arUserGroup)) {
             $arUserGroup[] = 2;
         }
         while ($arMessage = $dbMessage->Fetch()) {
             if ($arForum["ID"] != $arMessage["FORUM_ID"]) {
                 // »нформаци¤ о форуме 1 запрос
                 $arForum = CForumNew::GetByIDEx($arMessage["FORUM_ID"]);
                 $arForum["NUM_POSTS_ALL"] = $arForum_posts[$arForum["ID"]];
                 $arAllow = array("HTML" => $arForum["ALLOW_HTML"], "ANCHOR" => $arForum["ALLOW_ANCHOR"], "BIU" => $arForum["ALLOW_BIU"], "IMG" => $arForum["ALLOW_IMG"], "LIST" => $arForum["ALLOW_LIST"], "QUOTE" => $arForum["ALLOW_QUOTE"], "CODE" => $arForum["ALLOW_CODE"], "FONT" => $arForum["ALLOW_FONT"], "SMILES" => $arForum["ALLOW_SMILES"], "UPLOAD" => $arForum["ALLOW_UPLOAD"], "NL2BR" => $arForum["ALLOW_NL2BR"]);
                 // «вание пользовател¤ из списка на форуме 1 запрос
                 $UserPerm = CForumNew::GetUserPermission($arForum["ID"], $arUserGroup);
                 if (array_key_exists($UserPerm, $ForumsPerms)) {
                     $UserPermStr = $ForumsPerms[$UserPerm];
                 } elseif (COption::GetOptionString("forum", "SHOW_VOTES", "Y") == "Y") {
                     $arUserRank = CForumUser::GetUserRank($UID, LANGUAGE_ID);
                     $UserPermStr = $arUserRank["NAME"];
                 }
                 $UserPermStr = strlen(trim($UserPermStr)) > 0 ? $UserPermStr : $ForumsPerms["user"];
                 //
                 $main[$arForum["ID"]] = $arForum;
                 $main[$arForum["ID"]]["ALLOW"] = $arAllow;
                 $main[$arForum["ID"]]["USER_PERM"] = $UserPerm;
开发者ID:,项目名称:,代码行数:31,代码来源:

示例5: LocalRedirect

     }
 }
 if (count($arTopic) <= 0) {
     LocalRedirect("list.php?FID=" . $FID);
     die;
 }
 define("FORUM_MODULE_PAGE", "MOVE");
 if (ForumCurrUserPermissions($FID) < "Q") {
     $APPLICATION->AuthForm(GetMessage("FM_NO_FPERMS"));
 }
 if ($_SERVER["REQUEST_METHOD"] == "POST" && $_POST["action"] == "move" && check_bitrix_sessid()) {
     if (IntVal($newFID) <= 0) {
         $strErrorMessage .= GetMessage("FM_EMPTY_DEST_FORUM") . ". \n";
     }
     if (strlen($strErrorMessage) <= 0) {
         $NewForum = CForumNew::GetByIDEx($newFID);
         if (ForumCurrUserPermissions($newFID) < "Q" && $NewForum["ALLOW_MOVE_TOPIC"] != "Y") {
             $strErrorMessage .= GetMessage("FM_NO_DEST_FPERMS") . ". \n";
         }
     }
     if (strlen($strErrorMessage) <= 0) {
         foreach ($arTopic as $Topic) {
             $res = CForumTopic::MoveTopic2Forum($Topic["ID"], $newFID);
             if (!$res) {
                 $strErrorMessage .= GetMessage("FM_ERR_MOVE_TOPIC") . ". \n";
             }
             //			elseif ($MakeNew)
             //			{
             //				foreach ($res as $MID)
             //				{
             //					CForumMessage::SendMailMessage($MID, array(), false, "NEW_FORUM_MESSAGE");
开发者ID:,项目名称:,代码行数:31,代码来源:


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