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


PHP CBlogImage::GetList方法代码示例

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


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

示例1: array

     }
 }
 if ($perms != BLOG_PERMS_DENY) {
     $SORT = array($arParams["SORT_BY1"] => $arParams["SORT_ORDER1"], $arParams["SORT_BY2"] => $arParams["SORT_ORDER2"]);
     if ($arParams["MESSAGE_COUNT"] > 0) {
         $COUNT = array("nTopCount" => $arParams["MESSAGE_COUNT"]);
     } else {
         $COUNT = false;
     }
     $ids = array();
     $dbPosts = CBlogPost::GetList($SORT, $arFilter, false, $COUNT, $arSelectedFields);
     $p = new blogTextParser(false, $arParams["PATH_TO_SMILE"]);
     $itemCnt = 0;
     while ($arPost = $dbPosts->GetNext()) {
         if (IntVal($arPost["ATTACH_IMG"]) <= 0) {
             $dbImage = CBlogImage::GetList(array("ID" => "ASC"), array("BLOG_ID" => $arPost["BLOG_ID"], "POST_ID" => $arPost["ID"], "IS_COMMENT" => "N"));
             if ($arImage = $dbImage->Fetch()) {
                 if ($file = CFile::ResizeImageGet($arImage["FILE_ID"], array("width" => $arParams["PREVIEW_WIDTH"], "height" => $arParams["PREVIEW_HEIGHT"]))) {
                     $arPost["IMG"] = CFile::ShowImage($file["src"], false, false, 'align="left" hspace="2" vspace="2"');
                 }
             }
         } else {
             $arPost["IMG"] = CFile::ShowImage($arPost["ATTACH_IMG"], false, false, 'align="left" hspace="2" vspace="2"');
         }
         $arTmp = $arPost;
         if ($arTmp["AUTHOR_ID"] == $arTmp["BLOG_OWNER_ID"]) {
             $arTmp["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arPost["BLOG_URL"], "user_id" => $arPost["AUTHOR_ID"]));
         } else {
             if ($arParams["USE_SOCNET"] == "Y" && IntVal($arParams["SOCNET_GROUP_ID"]) > 0) {
                 $arTmp["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arPost["AUTHOR_ID"]));
             } else {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例2: GetPost

    function GetPost($params, $arPath)
    {
        global $USER;
        $postId = IntVal(CBlogMetaWeblog::DecodeParams($params[0]["#"]["value"][0]["#"]));
        $user = CBlogMetaWeblog::DecodeParams($params[1]["#"]["value"][0]["#"]);
        $password = CBlogMetaWeblog::DecodeParams($params[2]["#"]["value"][0]["#"]);
        if (CBlogMetaWeblog::Authorize($user, $password)) {
            $result = '';
            $userId = $USER->GetID();
            if (IntVal($postId) > 0) {
                $arSelectedFields = array("ID", "BLOG_ID", "TITLE", "DATE_PUBLISH", "AUTHOR_ID", "DETAIL_TEXT", "DETAIL_TEXT_TYPE", "BLOG_URL", "BLOG_OWNER_ID");
                $dbPost = CBlogPost::GetList(array(), array("AUTHOR_ID" => $userId, "ID" => $postId), false, array("nTopCount" => 1), $arSelectedFields);
                if ($arPost = $dbPost->Fetch()) {
                    $parser = new blogTextParser();
                    $dateISO = date("Y-m-d\\TH:i:s", MakeTimeStamp($arPost["DATE_PUBLISH"]));
                    $title = htmlspecialcharsEx($arPost["TITLE"]);
                    $arImages = array();
                    $res = CBlogImage::GetList(array("ID" => "ASC"), array("POST_ID" => $arPost["ID"], "BLOG_ID" => $arPost["BLOG_ID"], "IS_COMMENT" => "N"));
                    while ($arImage = $res->Fetch()) {
                        $arImages[$arImage['ID']] = $arImage['FILE_ID'];
                    }
                    if ($arPost["DETAIL_TEXT_TYPE"] == "html") {
                        $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "IMG" => "Y", "SMILES" => "Y", "NL2BR" => "N", "VIDEO" => "N", "QUOTE" => "N", "CODE" => "N");
                        $text = $parser->convert_to_rss($arPost["DETAIL_TEXT"], $arImages, $arAllow, false);
                    } else {
                        $arAllow = array("HTML" => "N", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "QUOTE" => "N", "CODE" => "N", "FONT" => "Y", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "N", "VIDEO" => "N");
                        $text = $parser->convert_to_rss(htmlspecialcharsEx($arPost["DETAIL_TEXT"]), $arImages, $arAllow, false);
                    }
                    $text = "<![CDATA[" . $text . "]]>";
                    $category = "";
                    $dbCategory = CBlogPostCategory::GetList(array(), array("BLOG_ID" => $arPost["BLOG_ID"], "POST_ID" => $arPost["ID"]));
                    while ($arCategory = $dbCategory->Fetch()) {
                        $category .= '<value>' . htmlspecialcharsEx($arCategory["NAME"]) . '</value>';
                    }
                    $path2Post = "";
                    if (strlen($arPath["PATH_TO_POST"]) > 0) {
                        if (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0) {
                            $serverName = SITE_SERVER_NAME;
                        } else {
                            $serverName = COption::GetOptionString("main", "server_name", "www.bitrixsoft.com");
                        }
                        $path2Post = "http://" . $serverName . CComponentEngine::MakePathFromTemplate($arPath["PATH_TO_POST"], array("blog" => $arPost["BLOG_URL"], "user_id" => $arPost["BLOG_OWNER_ID"], "post_id" => $arPost["ID"]));
                    }
                    $result .= '
						<value>
							<struct>';
                    if (strlen($category) > 0) {
                        $result .= '<member>
									<name>categories</name>
									<value>
									<array>
									<data>
									' . $category . '
									</data>
									</array>
									</value>
								</member>
							';
                    }
                    $result .= '
								<member>
									<name>dateCreated</name>
									<value>
									<dateTime.iso8601>' . $dateISO . '</dateTime.iso8601>
									</value>
								</member>
								<member>
									<name>description</name>
									<value>' . $text . '</value>
								</member>
								<member>
									<name>link</name>
									<value>' . htmlspecialcharsEx($path2Post) . '</value>
								</member>
								<member>
									<name>postid</name>
									<value>
									<i4>' . $arPost["ID"] . '</i4>
									</value>
								</member>
								<member>
									<name>title</name>
									<value>' . $title . '</value>
								</member>
								<member>
									<name>publish</name>
									<value>
									<boolean>' . ($arPost["PUBLISH_STATUS"] == "D" ? "0" : "1") . '</boolean>
									</value>
								</member>
							</struct>
						</value>
						';
                }
            }
            return '<params>
						<param>
							<value>
								<array>
									<data>' . $result . '</data>
//.........这里部分代码省略.........
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:blog_metaweblog.php

示例3: htmlspecialcharsEx

                     $arPostField["EDIT_FORM_LABEL"] = htmlspecialcharsEx($arPostField["EDIT_FORM_LABEL"]);
                     $arPostField["~EDIT_FORM_LABEL"] = $arPostField["EDIT_FORM_LABEL"];
                     $arResult["POST_PROPERTIES"]["DATA"][$FIELD_NAME] = $arPostField;
                     if (!empty($arPostField["VALUE"])) {
                         $bHasProps = true;
                     }
                 }
             }
         }
         if (!empty($arResult["POST_PROPERTIES"]["DATA"])) {
             $arResult["POST_PROPERTIES"]["SHOW"] = "Y";
         }
     }
 }
 if ($arPost["HAS_IMAGES"] != "N") {
     $res = CBlogImage::GetList(array("ID" => "ASC"), array("POST_ID" => $arPost['ID'], "IS_COMMENT" => "N"));
     while ($arImage = $res->Fetch()) {
         $bHasImg = true;
         $arImages[$arImage['ID']] = $arImage['FILE_ID'];
         $arResult["images"][$arImage['ID']] = array("small" => "/bitrix/components/bitrix/blog/show_file.php?fid=" . $arImage['ID'] . "&width=" . $arParams["ATTACHED_IMAGE_MAX_WIDTH_SMALL"] . "&height=" . $arParams["ATTACHED_IMAGE_MAX_HEIGHT_SMALL"] . "&type=square");
         $arResult["images"][$arImage['ID']]["full"] = "/bitrix/components/bitrix/blog/show_file.php?fid=" . $arImage['ID'] . "&width=" . $arParams["ATTACHED_IMAGE_MAX_WIDTH_FULL"] . "&height=" . $arParams["ATTACHED_IMAGE_MAX_HEIGHT_FULL"];
     }
 }
 $arParserParams = array("imageWidth" => $arParams["IMAGE_MAX_WIDTH"], "imageHeight" => $arParams["IMAGE_MAX_HEIGHT"], "pathToUser" => $arParams["PATH_TO_USER"]);
 $arAllow = array("HTML" => "N", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "QUOTE" => "Y", "CODE" => "Y", "FONT" => "Y", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "N", "VIDEO" => "Y", "USER" => "Y", "TAG" => "Y", "SHORT_ANCHOR" => "Y");
 if (COption::GetOptionString("blog", "allow_video", "Y") != "Y") {
     $arAllow["VIDEO"] = "N";
 }
 if (is_array($arResult["POST_PROPERTIES"]["DATA"]["UF_BLOG_POST_FILE"])) {
     $p->arUserfields = array("UF_BLOG_POST_FILE" => array_merge($arResult["POST_PROPERTIES"]["DATA"]["UF_BLOG_POST_FILE"], array("TAG" => "DOCUMENT ID")));
 }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例4: BuildRSS

	public static function BuildRSS($postID, $blogID, $type = "RSS2.0", $numPosts = 10, $arPathTemplate = Array())
	{
		$blogID = IntVal($blogID);
		$postID = IntVal($postID);
		if($blogID <= 0)
			return false;
		if($postID <= 0)
			return false;
		$numPosts = IntVal($numPosts);
		$type = strtolower(preg_replace("/[^a-zA-Z0-9.]/is", "", $type));
		if ($type != "rss.92" && $type != "atom.03")
			$type = "rss2.0";

		$rssText = False;

		$arBlog = CBlog::GetByID($blogID);
		if ($arBlog && $arBlog["ACTIVE"] == "Y" && $arBlog["ENABLE_RSS"] == "Y")
		{
			$arGroup = CBlogGroup::GetByID($arBlog["GROUP_ID"]);
			if($arGroup["SITE_ID"] == SITE_ID)
			{
				$arPost = CBlogPost::GetByID($postID);
				if(!empty($arPost) && $arPost["BLOG_ID"] == $arBlog["ID"] && $arPost["ENABLE_COMMENTS"] == "Y")
				{
					$now = date("r");
					$nowISO = date("Y-m-d\TH:i:s").substr(date("O"), 0, 3).":".substr(date("O"), -2, 2);

					$serverName = "";
					$charset = "";
					$language = "";
					$dbSite = CSite::GetList(($b = "sort"), ($o = "asc"), array("LID" => SITE_ID));
					if ($arSite = $dbSite->Fetch())
					{
						$serverName = $arSite["SERVER_NAME"];
						$charset = $arSite["CHARSET"];
						$language = $arSite["LANGUAGE_ID"];
					}

					if (strlen($serverName) <= 0)
					{
						if (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0)
							$serverName = SITE_SERVER_NAME;
						else
							$serverName = COption::GetOptionString("main", "server_name", "");
					}

					if (strlen($charset) <= 0)
					{
						if (defined("SITE_CHARSET") && strlen(SITE_CHARSET) > 0)
							$charset = SITE_CHARSET;
						else
							$charset = "windows-1251";
					}

					if(strlen($arPathTemplate["PATH_TO_BLOG"])>0)
						$blogURL = htmlspecialcharsbx("http://".$serverName.CComponentEngine::MakePathFromTemplate($arPathTemplate["PATH_TO_BLOG"], array("blog" => $arBlog["URL"], "user_id" => $arBlog["OWNER_ID"], "group_id" => $arBlog["SOCNET_GROUP_ID"])));
					else
						$blogURL = htmlspecialcharsbx("http://".$serverName.CBlog::PreparePath($arBlog["URL"], $arGroup["SITE_ID"]));

					if(strlen($arPathTemplate["PATH_TO_POST"])>0)
						$url = htmlspecialcharsbx("http://".$serverName.CComponentEngine::MakePathFromTemplate($arPathTemplate["PATH_TO_POST"], array("blog" => $arBlog["URL"], "post_id" => CBlogPost::GetPostID($arPost["ID"], $arPost["CODE"], $arPathTemplate["ALLOW_POST_CODE"]), "user_id" => $arBlog["OWNER_ID"], "group_id" => $arBlog["SOCNET_GROUP_ID"])));
					else
						$url = htmlspecialcharsbx("http://".$serverName.CBlogPost::PreparePath($arBlog["URL"], $arPost["ID"], $arGroup["SITE_ID"]));

					$dbUser = CUser::GetByID($arPost["AUTHOR_ID"]);
					$arUser = $dbUser->Fetch();

					if($arPathTemplate["USE_SOCNET"] == "Y")
					{
						$blogName = GetMessage("BLG_GCM_RSS_TITLE_SOCNET", Array("#AUTHOR_NAME#" => htmlspecialcharsEx($arUser["NAME"]." ".$arUser["LAST_NAME"]), "#POST_TITLE#" => htmlspecialcharsEx($arPost["TITLE"])));
					}
					else
					{
						$blogName = GetMessage("BLG_GCM_RSS_TITLE", Array("#BLOG_NAME#" => htmlspecialcharsEx($arBlog["NAME"]), "#POST_TITLE#" => htmlspecialcharsEx($arPost["TITLE"])));
					}

					$rssText = "";
					if ($type == "rss.92")
					{
						$rssText .= "<"."?xml version=\"1.0\" encoding=\"".$charset."\"?".">\n\n";
						$rssText .= "<rss version=\".92\">\n";
						$rssText .= " <channel>\n";
						$rssText .= "	<title>".$blogName."</title>\n";
						$rssText .= "	<description>".$blogName."</description>\n";
						$rssText .= "	<link>".$url."</link>\n";
						$rssText .= "	<language>".$language."</language>\n";
						$rssText .= "	<docs>http://backend.userland.com/rss092</docs>\n";
						$rssText .= "\n";
					}
					elseif ($type == "rss2.0")
					{
						$rssText .= "<"."?xml version=\"1.0\" encoding=\"".$charset."\"?".">\n\n";
						$rssText .= "<rss version=\"2.0\">\n";
						$rssText .= " <channel>\n";
						$rssText .= "	<title>".$blogName."</title>\n";
						$rssText .= "	<description>".$blogName."</description>\n";
						//$rssText .= "	<guid>".$url."</guid>\n";
						$rssText .= "	<link>".$url."</link>\n";
						$rssText .= "	<language>".$language."</language>\n";
						$rssText .= "	<docs>http://backend.userland.com/rss2</docs>\n";
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:101,代码来源:blog_comment.php

示例5: array

         $arTmp["FIRST"] = "Y";
     }
     if (!in_array($arPost["AUTHOR_ID"], $arUsrTmp)) {
         $arUsrTmp[] = $arPost["AUTHOR_ID"];
     }
     $arUsrTmpPostId[$arPost["AUTHOR_ID"]][] = $arPost["ID"];
     if (strlen($arPost["BLOG_USER_ALIAS"]) > 0) {
         $arUsrTmpAlias[$arPost["AUTHOR_ID"]] = $arPost["BLOG_USER_ALIAS"];
     }
     $itemCnt++;
     $arResult[$arTmp["ID"]] = $arTmp;
     $ids[] = $arTmp["ID"];
 }
 $arResult["IDS"] = $ids;
 if (!empty($arImgPosts)) {
     $dbImage = CBlogImage::GetList(array("ID" => "ASC"), array("POST_ID" => $arImgPosts, "IS_COMMENT" => "N"));
     while ($arImage = $dbImage->Fetch()) {
         if (empty($arResult[$arImage["POST_ID"]]["IMG"])) {
             if ($file = CFile::ResizeImageGet($arImage["FILE_ID"], array("width" => $arParams["PREVIEW_WIDTH"], "height" => $arParams["PREVIEW_HEIGHT"]))) {
                 $arResult[$arImage["POST_ID"]]["IMG"] = CFile::ShowImage($file["src"], false, false, 'align="left" hspace="2" vspace="2"');
             }
         }
     }
 }
 if (!empty($arUsrTmp)) {
     $dbUser = CUser::GetList($b = "ID", $o = "DESC", array("ID" => implode(' | ', $arUsrTmp)), array("FIELDS" => array("ID", "LOGIN", "NAME", "LAST_NAME", "SECOND_NAME", "PERSONAL_PHOTO")));
     while ($arUser = $dbUser->GetNext()) {
         $urlToAuthor = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arUser["ID"]));
         $AuthorName = CBlogUser::GetUserName($arUsrTmpAlias[$arUser["ID"]], $arUser["NAME"], $arUser["LAST_NAME"], $arUser["LOGIN"], $arUser["SECOND_NAME"]);
         foreach ($arUsrTmpPostId[$arUser["ID"]] as $postId) {
             $arResult[$postId]["arUser"] = $arUser;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例6: array_merge

         $arResult["title"]["category"] = CBlogTools::htmlspecialcharsExArray($arCat);
     }
 }
 $arResult["filter"] = $arFilter;
 $dbPost = CBlogPost::GetList($SORT, array_merge($arParams["EXT_FILTER"], $arFilter), false, array("bDescPageNumbering" => true, "nPageSize" => $arParams["MESSAGE_COUNT"], "bShowAll" => false), array("ID", "TITLE", "BLOG_ID", "AUTHOR_ID", "PREVIEW_TEXT", "PREVIEW_TEXT_TYPE", "DETAIL_TEXT", "DETAIL_TEXT_TYPE", "DATE_CREATE", "DATE_PUBLISH", "KEYWORDS", "PUBLISH_STATUS", "ATRIBUTE", "ATTACH_IMG", "ENABLE_TRACKBACK", "ENABLE_COMMENTS", "VIEWS", "NUM_COMMENTS", "CODE", "MICRO", "CATEGORY_ID"));
 $arResult["NAV_STRING"] = $dbPost->GetPageNavStringEx($navComponentObject, GetMessage("MESSAGE_COUNT"), $arParams["NAV_TEMPLATE"], false, $this->__component->__parent ? $this->__component->__parent : $this->__component);
 $arResult["NAV_CACHED_DATA"] = $navComponentObject->GetTemplateCachedData();
 $arResult["POST"] = array();
 $arResult["IDS"] = array();
 $p = new blogTextParser(false, $arParams["PATH_TO_SMILE"]);
 $arParserParams = array("imageWidth" => $arParams["IMAGE_MAX_WIDTH"], "imageHeight" => $arParams["IMAGE_MAX_HEIGHT"]);
 while ($CurPost = $dbPost->GetNext()) {
     $CurPost["urlToPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST"], array("blog" => $arBlog["URL"], "post_id" => CBlogPost::GetPostID($CurPost["ID"], $CurPost["CODE"], $arParams["ALLOW_POST_CODE"])));
     $CurPost["urlToAuthor"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $CurPost["AUTHOR_ID"]));
     $arImages = array();
     $res = CBlogImage::GetList(array("ID" => "ASC"), array("POST_ID" => $CurPost['ID'], "BLOG_ID" => $arBlog['ID']));
     while ($arImage = $res->Fetch()) {
         $arImages[$arImage['ID']] = $arImage['FILE_ID'];
     }
     if ($CurPost["DETAIL_TEXT_TYPE"] == "html" && COption::GetOptionString("blog", "allow_html", "N") == "Y") {
         $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "IMG" => "Y", "SMILES" => "Y", "NL2BR" => "N", "VIDEO" => "Y", "QUOTE" => "Y", "CODE" => "Y");
         if (COption::GetOptionString("blog", "allow_video", "Y") != "Y") {
             $arAllow["VIDEO"] = "N";
         }
         $CurPost["TEXT_FORMATED"] = $p->convert($CurPost["~DETAIL_TEXT"], true, $arImages, $arAllow, $arParserParams);
     } else {
         $arAllow = array("HTML" => "N", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "QUOTE" => "Y", "CODE" => "Y", "FONT" => "Y", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "N", "VIDEO" => "Y");
         if (COption::GetOptionString("blog", "allow_video", "Y") != "Y") {
             $arAllow["VIDEO"] = "N";
         }
         $CurPost["TEXT_FORMATED"] = $p->convert($CurPost["~DETAIL_TEXT"], true, $arImages, $arAllow, $arParserParams);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例7: unset

                 unset($_SESSION[$varKey][$key]);
                 break;
             }
         }
         echo CUtil::PhpToJsObject(array('SUCCESS' => 'Y', "FILE_ID" => $file_id));
     }
 }
 if (isset($_REQUEST["post_id"]) && intval($_REQUEST["post_id"]) > 0) {
     // Blog Images
     $varKey = "MFU_UPLOADED_IMAGES_" . $GLOBALS["USER"]->GetId() . "_" . intval($_REQUEST["post_id"]);
     if (in_array($file_id, $_SESSION[$varKey])) {
         $rsFile = CFile::GetByID($file_id);
         if ($arFile = $rsFile->Fetch()) {
             $bFileFound = true;
             if (CModule::IncludeModule('blog')) {
                 $rsBlogImage = CBlogImage::GetList(array(), array("FILE_ID" => $file_id));
                 if ($arBlogImage = $rsBlogImage->Fetch()) {
                     CBlogImage::Delete($arBlogImage["ID"]);
                     BXClearCache(true, "/blog/socnet_post/" . intval($_REQUEST["post_id"]) . "/");
                     BXClearCache(true, "/blog/socnet_post/gen/" . intval($_REQUEST["post_id"]) . "/");
                 }
             }
             CFile::Delete($file_id);
             foreach ($_SESSION[$varKey] as $key => $session_file_id) {
                 if ($session_file_id == $file_id) {
                     unset($_SESSION[$varKey][$key]);
                     break;
                 }
             }
             echo CUtil::PhpToJsObject(array('SUCCESS' => 'Y', "FILE_ID" => $file_id));
         }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:ajax.php

示例8: array

     $arResult["userCache"] = CBlogUser::GetUserInfoArray($arIdToGet, $arParams["PATH_TO_USER"], array("AVATAR_SIZE" => isset($arParams["AVATAR_SIZE_COMMON"]) ? $arParams["AVATAR_SIZE_COMMON"] : $arParams["AVATAR_SIZE"], "AVATAR_SIZE_COMMENT" => $arParams["AVATAR_SIZE_COMMENT"]));
     foreach ($arResult["userCache"] as $userId => $arUserCache) {
         $arTmpUser = array("NAME" => $arUserCache["~NAME"], "LAST_NAME" => $arUserCache["~LAST_NAME"], "SECOND_NAME" => $arUserCache["~SECOND_NAME"], "LOGIN" => $arUserCache["~LOGIN"], "NAME_LIST_FORMATTED" => "");
         $arResult["userCache"][$userId]["NAME_FORMATED"] = CUser::FormatName($arParams["NAME_TEMPLATE"], $arTmpUser, $arParams["SHOW_LOGIN"] != "N" ? true : false);
     }
 }
 $i = 0;
 if (!empty($arCommentsAll[$i])) {
     $arComment = $arCommentsAll[$i];
     $p = new blogTextParser(false, $arParams["PATH_TO_SMILE"]);
     $p->LAZYLOAD = isset($arParams["LAZYLOAD"]) && $arParams["LAZYLOAD"] == "Y" ? "Y" : "N";
     $p->bMobile = isset($arParams["MOBILE"]) && $arParams["MOBILE"] == "Y";
     $arParserParams = array("imageWidth" => $arParams["IMAGE_MAX_WIDTH"], "imageHeight" => $arParams["IMAGE_MAX_HEIGHT"], "pathToUser" => $arParams["PATH_TO_USER"]);
     $bHasImg = false;
     if ($arPost["HAS_COMMENT_IMAGES"] != "N") {
         $res = CBlogImage::GetList(array("ID" => "ASC"), array("POST_ID" => $arPost['ID'], "BLOG_ID" => $arPost['BLOG_ID'], "IS_COMMENT" => "Y"), false, false, array("ID", "FILE_ID", "POST_ID", "BLOG_ID", "USER_ID", "TITLE", "COMMENT_ID", "IS_COMMENT"));
         while ($aImg = $res->Fetch()) {
             $bHasImg = true;
             $arImages[$aImg['ID']] = $aImg['FILE_ID'];
             if ($arResult["allowImageUpload"]) {
                 $aImgNew = CFile::ResizeImageGet($aImg["FILE_ID"], array("width" => 90, "height" => 90), BX_RESIZE_IMAGE_EXACT, true);
                 $aImgNew["source"] = CFile::ResizeImageGet($aImg["FILE_ID"], array("width" => $arParams["IMAGE_MAX_WIDTH"], "height" => $arParams["IMAGE_MAX_HEIGHT"]), BX_RESIZE_IMAGE_EXACT, true);
                 $aImgNew["ID"] = $aImg["ID"];
                 $aImgNew["fileName"] = substr($aImgNew["src"], strrpos($aImgNew["src"], "/") + 1);
                 $arResult["Images"][$aImg['ID']] = $aImgNew;
             }
             $arResult["arImages"][$aImg["COMMENT_ID"]][$aImg['ID']] = array("small" => "/bitrix/components/bitrix/blog/show_file.php?fid=" . $aImg['ID'] . "&width=" . $arParams["ATTACHED_IMAGE_MAX_WIDTH_SMALL"] . "&height=" . $arParams["ATTACHED_IMAGE_MAX_HEIGHT_SMALL"] . "&type=square");
             $arResult["arImages"][$aImg["COMMENT_ID"]][$aImg['ID']]["full"] = $arParams["MOBILE"] == "Y" ? SITE_DIR . "mobile/log/blog_image.php?bfid=" . $aImg['ID'] . "&fid=" . $aImg['FILE_ID'] . "&width=" . $arParams["ATTACHED_IMAGE_MAX_WIDTH_FULL"] . "&height=" . $arParams["ATTACHED_IMAGE_MAX_HEIGHT_FULL"] : "/bitrix/components/bitrix/blog/show_file.php?fid=" . $aImg['ID'] . "&width=" . $arParams["ATTACHED_IMAGE_MAX_WIDTH_FULL"] . "&height=" . $arParams["ATTACHED_IMAGE_MAX_HEIGHT_FULL"];
         }
     }
     $arFieldsHave = array();
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例9: GetRSS

 public function GetRSS($BlogCode, $type = "rss2.0", $numPosts = 10, $siteID = SITE_ID, $arPathTemplates = array(), $arFilterExt = array())
 {
     if (!$this->IsAvailable()) {
         return false;
     }
     global $USER;
     //Post CNT
     $numPosts = IntVal($numPosts);
     //RSS type
     $type = ToLower(preg_replace("/[^a-zA-Z0-9.]/is", "", $type));
     if (!in_array($type, array("rss2.0", "atom.03", "rss.92"))) {
         $type = "rss.92";
     }
     //Prepare Extended filter
     if (!is_array($arFilterExt)) {
         $arFilterExt = array();
     }
     $arSettings = array("BLOG_CODE" => $BlogCode, "NOW" => date("r"), "NOW_ISO" => date("Y-m-d\\TH:i:s") . substr(date("O"), 0, 3) . ":" . substr(date("O"), -2, 2), "SERVER_NAME" => "", "CHARSET" => "", "LANGUAGE" => "", "RSS" => "", "RSS_TYPE" => $type, "CURRENT_USER_ID" => $USER->IsAuthorized() ? $USER->GetID() : 0, "CATEGORIES" => CIdeaManagment::getInstance()->Idea()->GetCategoryList());
     //Get Settings if possible
     if ($arSite = CSite::GetList($s = "sort", $o = "asc", array("LID" => SITE_ID))->Fetch()) {
         $arSettings["SERVER_NAME"] = $arSite["SERVER_NAME"];
         $arSettings["CHARSET"] = $arSite["CHARSET"];
         $arSettings["LANGUAGE"] = $arSite["LANGUAGE_ID"];
     }
     //Get Server Name
     if (strlen($arSettings["SERVER_NAME"]) == 0) {
         if (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0) {
             $arSettings["SERVER_NAME"] = SITE_SERVER_NAME;
         } else {
             $arSettings["SERVER_NAME"] = COption::GetOptionString("main", "server_name", "");
         }
     }
     //Get Site Charset
     if (strlen($arSettings["CHARSET"]) == 0) {
         if (defined("SITE_CHARSET") && strlen(SITE_CHARSET) > 0) {
             $arSettings["CHARSET"] = SITE_CHARSET;
         } else {
             $arSettings["CHARSET"] = "windows-1251";
         }
     }
     $arSettings["BLOG_URL"] = "http://" . $arSettings["SERVER_NAME"];
     if (!empty($arPathTemplates) && strlen($arPathTemplates["INDEX"]) > 0) {
         $arSettings["BLOG_URL"] .= $arPathTemplates["INDEX"];
     }
     if (!empty($arPathTemplates) && strlen($arPathTemplates["CUSTOM_TITLE"]) > 0) {
         $arSettings["BLOG_NAME"] = htmlspecialcharsbx($arPathTemplates["CUSTOM_TITLE"]);
     } else {
         $arSettings["BLOG_NAME"] = "\"" . htmlspecialcharsbx($arSite["NAME"]) . "\" (" . $arSettings["SERVER_NAME"] . ")";
     }
     //Prepare Head Type part
     if ($arSettings["RSS_TYPE"] == "rss.92") {
         $arSettings["RSS"] .= "<" . "?xml version=\"1.0\" encoding=\"" . $arSettings["CHARSET"] . "\"?" . ">\n\n";
         $arSettings["RSS"] .= "<rss version=\".92\">\n";
         $arSettings["RSS"] .= " <channel>\n";
         $arSettings["RSS"] .= "\t<title>" . $arSettings["BLOG_NAME"] . "</title>\n";
         $arSettings["RSS"] .= "\t<link>" . $arSettings["BLOG_URL"] . "</link>\n";
         $arSettings["RSS"] .= "\t<guid>" . $arSettings["BLOG_URL"] . "</guid>\n";
         $arSettings["RSS"] .= "\t<language>" . $arSettings["LANGUAGE"] . "</language>\n";
         $arSettings["RSS"] .= "\t<docs>http://backend.userland.com/rss092</docs>\n";
         $arSettings["RSS"] .= "\n";
     } elseif ($arSettings["RSS_TYPE"] == "rss2.0") {
         $arSettings["RSS"] .= "<" . "?xml version=\"1.0\" encoding=\"" . $arSettings["CHARSET"] . "\"?" . ">\n\n";
         $arSettings["RSS"] .= "<rss version=\"2.0\">\n";
         $arSettings["RSS"] .= " <channel>\n";
         $arSettings["RSS"] .= "\t<title>" . $arSettings["BLOG_NAME"] . "</title>\n";
         $arSettings["RSS"] .= "\t<description>" . $arSettings["BLOG_NAME"] . "</description>\n";
         $arSettings["RSS"] .= "\t<link>" . $arSettings["BLOG_URL"] . "</link>\n";
         $arSettings["RSS"] .= "\t<language>" . $arSettings["LANGUAGE"] . "</language>\n";
         $arSettings["RSS"] .= "\t<docs>http://backend.userland.com/rss2</docs>\n";
         $arSettings["RSS"] .= "\t<pubDate>" . $arSettings["NOW"] . "</pubDate>\n";
         $arSettings["RSS"] .= "\n";
     } elseif ($arSettings["RSS_TYPE"] == "atom.03") {
         $atomID = "tag:" . htmlspecialcharsbx($arSettings["SERVER_NAME"]) . "," . date("Y-m-d");
         $arSettings["RSS"] .= "<" . "?xml version=\"1.0\" encoding=\"" . $arSettings["CHARSET"] . "\"?" . ">\n\n";
         $arSettings["RSS"] .= "<feed version=\"0.3\" xmlns=\"http://purl.org/atom/ns#\" xml:lang=\"" . $arSettings["LANGUAGE"] . "\">\n";
         $arSettings["RSS"] .= "  <title>" . $arSettings["BLOG_NAME"] . "</title>\n";
         $arSettings["RSS"] .= "  <tagline>" . $arSettings["BLOG_URL"] . "</tagline>\n";
         $arSettings["RSS"] .= "  <id>" . $atomID . "</id>\n";
         $arSettings["RSS"] .= "  <link rel=\"alternate\" type=\"text/html\" href=\"" . $arSettings["BLOG_URL"] . "\" />\n";
         $arSettings["RSS"] .= "  <copyright>Copyright (c) " . $arSettings["SERVER_NAME"] . "</copyright>\n";
         $arSettings["RSS"] .= "  <modified>" . $arSettings["NOW_ISO"] . "</modified>\n";
         $arSettings["RSS"] .= "\n";
     }
     $arParserParams = array("imageWidth" => $arPathTemplates["IMAGE_MAX_WIDTH"], "imageHeight" => $arPathTemplates["IMAGE_MAX_HEIGHT"]);
     //Text Parser
     $parser = new blogTextParser();
     //SELECT
     $arSelFields = array("ID", "TITLE", "DETAIL_TEXT", "DATE_PUBLISH", "AUTHOR_ID", "BLOG_USER_ALIAS", "BLOG_ID", "DETAIL_TEXT_TYPE", "BLOG_URL", "BLOG_OWNER_ID", "BLOG_SOCNET_GROUP_ID", "BLOG_GROUP_SITE_ID", "CODE", self::UFCategroryCodeField);
     //WHERE
     $arFilter = array("<=DATE_PUBLISH" => ConvertTimeStamp(false, "FULL", false), "PUBLISH_STATUS" => BLOG_PUBLISH_STATUS_PUBLISH, "BLOG_ENABLE_RSS" => "Y", "MICRO" => "N");
     if (intval($arSettings["BLOG_CODE"]) === $arSettings["BLOG_CODE"]) {
         $arFilter["BLOG_ID"] = $arSettings["BLOG_CODE"];
     } else {
         $arFilter["BLOG_URL"] = $arSettings["BLOG_CODE"];
     }
     //Extend standart filter
     $arFilter = array_merge($arFilter, $arFilterExt);
     CTimeZone::Disable();
     $dbPosts = CBlogPost::GetList(array("DATE_PUBLISH" => "DESC"), $arFilter, false, array("nTopCount" => $numPosts), $arSelFields);
     CTimeZone::Enable();
//.........这里部分代码省略.........
开发者ID:rasuldev,项目名称:torino,代码行数:101,代码来源:idea.php

示例10: FormatEvent_Blog

 function FormatEvent_Blog($arFields, $arParams, $bMail = false)
 {
     if ($bMail && strlen($arFields["MAIL_LANGUAGE_ID"]) > 0) {
         IncludeModuleLangFile(__FILE__, $arFields["MAIL_LANGUAGE_ID"]);
     }
     $arResult = array("EVENT" => $arFields, "CREATED_BY" => CSocNetLogTools::FormatEvent_GetCreatedBy($arFields, $arParams, $bMail), "ENTITY" => CSocNetLogTools::FormatEvent_GetEntity($arFields, $arParams, $bMail), "EVENT_FORMATTED" => array());
     $arResult["CREATED_BY"]["ACTION_TYPE"] = "wrote";
     if (!$bMail) {
         $arResult["AVATAR_SRC"] = CSocNetLogTools::FormatEvent_CreateAvatar($arFields, $arParams);
     }
     if ($bMail) {
         $title_tmp = GetMessage("SONET_GL_EVENT_TITLE_" . ($arFields["ENTITY_TYPE"] == SONET_SUBSCRIBE_ENTITY_GROUP ? "GROUP" : "USER") . "_BLOG_POST_MAIL");
         //if the title duplicates message, don't show it
         $arFields["TITLE"] = strpos($arFields["MESSAGE"], $arFields["TITLE"]) === 0 ? "" : ' "' . $arFields["TITLE"] . '"';
     } else {
         $title_tmp = GetMessage("SONET_GL_EVENT_TITLE_BLOG_POST");
     }
     $post_tmp = !$bMail && array_key_exists("URL", $arFields) && strlen($arFields["URL"]) > 0 ? '<a href="' . $arFields["URL"] . '">' . $arFields["TITLE"] . '</a>' : $arFields["TITLE"];
     $title = str_replace(array("#TITLE#", "#ENTITY#", "#CREATED_BY#"), array($post_tmp, $arResult["ENTITY"]["FORMATTED"], $bMail ? $arResult["CREATED_BY"]["FORMATTED"] : ""), $title_tmp);
     $title = trim(preg_replace('/\\s+/', ' ', $title));
     $arResult["EVENT_FORMATTED"] = array("TITLE" => $title, "TITLE_24" => GetMessage("SONET_GL_EVENT_TITLE_BLOG_POST_24"), "TITLE_24_2" => $arFields["TITLE"], "MESSAGE" => $bMail ? $arFields["TEXT_MESSAGE"] : $arFields["~MESSAGE"]);
     if (!$bMail) {
         if ($arParams["NEW_TEMPLATE"] != "Y" || $arFields["EVENT_ID"] == "idea") {
             if (CModule::IncludeModule("blog")) {
                 $parserLog = new blogTextParser(false, $arParams["PATH_TO_SMILE"]);
                 $arImages = array();
                 $arBlogPost = CBlogPost::GetByID($arFields["SOURCE_ID"]);
                 if ($arBlogPost["HAS_IMAGES"] != "N") {
                     $res = CBlogImage::GetList(array("ID" => "ASC"), array("POST_ID" => $arBlogPost['ID'], "IS_COMMENT" => "N"));
                     while ($arImage = $res->Fetch()) {
                         $arImages[$arImage['ID']] = $arImage['FILE_ID'];
                     }
                 }
             } else {
                 $parserLog = new logTextParser(false, $arParams["PATH_TO_SMILE"]);
             }
             $arAllow = array("HTML" => "N", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "QUOTE" => "Y", "CODE" => "Y", "FONT" => "Y", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "N", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N", "SHORT_ANCHOR" => "Y");
             if (get_class($parserLog) == "blogTextParser") {
                 $arResult["EVENT_FORMATTED"]["MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), true, $arImages, $arAllow), 10000);
             } else {
                 $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow));
             }
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = str_replace("#CUT#", '<br><a href="' . $arFields["URL"] . '">' . GetMessage("SONET_GL_EVENT_BLOG_MORE") . '</a>', $arResult["EVENT_FORMATTED"]["MESSAGE"]);
             $arResult["EVENT_FORMATTED"]["IS_MESSAGE_SHORT"] = CSocNetLogTools::FormatEvent_IsMessageShort($arResult["EVENT_FORMATTED"]["MESSAGE"], $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"]);
             if ($arFields["ENTITY_TYPE"] == SONET_SUBSCRIBE_ENTITY_GROUP) {
                 $arResult["EVENT_FORMATTED"]["DESTINATION"] = array(array("STYLE" => "sonetgroups", "TITLE" => $arResult["ENTITY"]["FORMATTED"]["NAME"], "URL" => $arResult["ENTITY"]["FORMATTED"]["URL"]));
             }
         }
         $dbRight = CSocNetLogRights::GetList(array(), array("LOG_ID" => $arFields["ID"]));
         while ($arRight = $dbRight->Fetch()) {
             $arRights[] = $arRight["GROUP_CODE"];
         }
         if ($arParams["MOBILE"] == "Y") {
             $arResult["EVENT_FORMATTED"]["DESTINATION"] = CSocNetLogTools::FormatDestinationFromRights($arRights, array_merge($arParams, array("CREATED_BY" => $arFields["USER_ID"], "USE_ALL_DESTINATION" => true)), $iMoreCount);
             if (intval($iMoreCount) > 0) {
                 $arResult["EVENT_FORMATTED"]["DESTINATION_MORE"] = $iMoreCount;
             }
         } else {
             $arResult["EVENT_FORMATTED"]["DESTINATION_CODE"] = CSocNetLogTools::GetDestinationFromRights($arRights, array_merge($arParams, array("CREATED_BY" => $arFields["USER_ID"])));
         }
     } else {
         $url = CSocNetLogTools::FormatEvent_GetURL($arFields);
         if (strlen($url) > 0) {
             $arResult["EVENT_FORMATTED"]["URL"] = $url;
         }
     }
     $arResult["HAS_COMMENTS"] = intval($arFields["SOURCE_ID"]) > 0 ? "Y" : "N";
     if ($bMail && strlen($arFields["MAIL_LANGUAGE_ID"]) > 0) {
         IncludeModuleLangFile(__FILE__, LANGUAGE_ID);
     }
     return $arResult;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:72,代码来源:log_tools.php

示例11: array

     $arOwnerBlog = CBlog::GetByOwnerID($arTmp["AUTHOR_ID"]);
     if (!empty($arOwnerBlog)) {
         $arTmp["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arOwnerBlog["URL"], "user_id" => $arOwnerBlog["OWNER_ID"]));
     } else {
         $arTmp["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arPost["BLOG_URL"], "user_id" => $arPost["AUTHOR_ID"]));
     }
 }
 if (IntVal($arPost["BLOG_SOCNET_GROUP_ID"]) > 0) {
     $arTmp["urlToPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP_BLOG_POST"], array("blog" => $arPost["BLOG_URL"], "post_id" => $arPost["ID"], "group_id" => $arPost["BLOG_SOCNET_GROUP_ID"]));
 } else {
     $arTmp["urlToPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST"], array("blog" => $arPost["BLOG_URL"], "post_id" => $arPost["ID"], "user_id" => $arPost["BLOG_OWNER_ID"]));
 }
 $arTmp["urlToAuthor"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arPost["AUTHOR_ID"]));
 $arTmp["AuthorName"] = CBlogUser::GetUserName($arPost["BLOG_USER_ALIAS"], $arPost["AUTHOR_NAME"], $arPost["AUTHOR_LAST_NAME"], $arPost["AUTHOR_LOGIN"]);
 $arImage = array();
 $res = CBlogImage::GetList(array("ID" => "ASC"), array("POST_ID" => $arPost['ID']));
 while ($arImage = $res->Fetch()) {
     $arImages[$arImage['ID']] = $arImage['FILE_ID'];
 }
 if (preg_match("/(\\[CUT\\])/i", $arTmp['DETAIL_TEXT']) || preg_match("/(<CUT>)/i", $arTmp['DETAIL_TEXT'])) {
     $arTmp["CUT"] = "Y";
 }
 if ($arTmp["DETAIL_TEXT_TYPE"] == "html") {
     $arTmp["TEXT_FORMATED"] = $p->convert($arTmp["~DETAIL_TEXT"], true, $arImages, array("HTML" => "Y", "ANCHOR" => "Y", "IMG" => "Y", "SMILES" => "Y", "NL2BR" => "N", "VIDEO" => "Y", "QUOTE" => "Y", "CODE" => "Y"));
 } else {
     $arTmp["TEXT_FORMATED"] = $p->convert($arTmp["~DETAIL_TEXT"], true, $arImages);
 }
 $arTmp["IMAGES"] = $arImages;
 $arTmp["DATE_PUBLISH_FORMATED"] = date($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($arTmp["DATE_PUBLISH"], CSite::GetDateFormat("FULL")));
 $dbCategory = CBlogPostCategory::GetList(array("NAME" => "ASC"), array("POST_ID" => $arTmp["ID"], "BLOG_ID" => $arPost["BLOG_ID"]));
 while ($arCategory = $dbCategory->GetNext()) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例12: BuildRSSAll

 function BuildRSSAll($GroupId = 0, $type = "RSS .92", $numPosts = 10, $siteID = SITE_ID, $postTemplate = "", $userTemplate = "", $arAvBlog = array(), $arPathTemplates = array(), $arGroupID = array(), $bUserSocNet = "N")
 {
     $GroupId = IntVal($GroupId);
     $numPosts = IntVal($numPosts);
     $user_id = IntVal($GLOBALS["USER"]->GetID());
     $type = strtolower(preg_replace("/[^a-zA-Z0-9.]/is", "", $type));
     if ($type != "rss2.0" && $type != "atom.03") {
         $type = "rss.92";
     }
     $rssText = False;
     $groupIdArray = array();
     $arGroup = array();
     if ($GroupId > 0) {
         if (!empty($arGroupID) && in_array($GroupId, $arGroupID) || empty($arGroupID)) {
             $arGroup = CBlogGroup::GetByID($GroupId);
         }
     }
     $now = date("r");
     $nowISO = date("Y-m-d\\TH:i:s") . substr(date("O"), 0, 3) . ":" . substr(date("O"), -2, 2);
     $serverName = "";
     $charset = "";
     $language = "";
     $dbSite = CSite::GetList($b = "sort", $o = "asc", array("LID" => SITE_ID));
     if ($arSite = $dbSite->Fetch()) {
         $serverName = $arSite["SERVER_NAME"];
         $charset = $arSite["CHARSET"];
         $language = $arSite["LANGUAGE_ID"];
     }
     if (strlen($serverName) <= 0) {
         if (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0) {
             $serverName = SITE_SERVER_NAME;
         } else {
             $serverName = COption::GetOptionString("main", "server_name", "");
         }
     }
     if (strlen($charset) <= 0) {
         if (defined("SITE_CHARSET") && strlen(SITE_CHARSET) > 0) {
             $charset = SITE_CHARSET;
         } else {
             $charset = "windows-1251";
         }
     }
     $blogURL = "http://" . $serverName;
     if ($GroupId > 0) {
         $blogName = GetMessage("BLG_RSS_ALL_GROUP_TITLE") . " \"" . htmlspecialcharsbx($arGroup["NAME"]) . "\" (" . $serverName . ")";
     } else {
         $blogName = GetMessage("BLG_RSS_ALL_TITLE") . " \"" . htmlspecialcharsbx($arSite["NAME"]) . "\" (" . $serverName . ")";
     }
     $rssText = "";
     if ($type == "rss.92") {
         $rssText .= "<" . "?xml version=\"1.0\" encoding=\"" . $charset . "\"?" . ">\n\n";
         $rssText .= "<rss version=\".92\">\n";
         $rssText .= " <channel>\n";
         $rssText .= "\t<title>" . $blogName . "</title>\n";
         $rssText .= "\t<link>" . $blogURL . "</link>\n";
         $rssText .= "\t<guid>" . $blogURL . "</guid>\n";
         $rssText .= "\t<language>" . $language . "</language>\n";
         $rssText .= "\t<docs>http://backend.userland.com/rss092</docs>\n";
         $rssText .= "\n";
     } elseif ($type == "rss2.0") {
         $rssText .= "<" . "?xml version=\"1.0\" encoding=\"" . $charset . "\"?" . ">\n\n";
         $rssText .= "<rss version=\"2.0\">\n";
         $rssText .= " <channel>\n";
         $rssText .= "\t<title>" . $blogName . "</title>\n";
         $rssText .= "\t<description>" . $blogName . "</description>\n";
         $rssText .= "\t<link>" . $blogURL . "</link>\n";
         $rssText .= "\t<language>" . $language . "</language>\n";
         $rssText .= "\t<docs>http://backend.userland.com/rss2</docs>\n";
         $rssText .= "\t<pubDate>" . $now . "</pubDate>\n";
         $rssText .= "\n";
     } elseif ($type == "atom.03") {
         $atomID = "tag:" . htmlspecialcharsbx($serverName) . "," . date("Y-m-d");
         $rssText .= "<" . "?xml version=\"1.0\" encoding=\"" . $charset . "\"?" . ">\n\n";
         $rssText .= "<feed version=\"0.3\" xmlns=\"http://purl.org/atom/ns#\" xml:lang=\"" . $language . "\">\n";
         $rssText .= "  <title>" . $blogName . "</title>\n";
         $rssText .= "  <tagline>" . $blogURL . "</tagline>\n";
         $rssText .= "  <id>" . $atomID . "</id>\n";
         $rssText .= "  <link rel=\"alternate\" type=\"text/html\" href=\"" . $blogURL . "\" />\n";
         $rssText .= "  <copyright>Copyright (c) " . $blogURL . "</copyright>\n";
         $rssText .= "  <modified>" . $nowISO . "</modified>\n";
         $rssText .= "\n";
     }
     $parser = new blogTextParser();
     $arParserParams = array("imageWidth" => $arPathTemplates["IMAGE_MAX_WIDTH"], "imageHeight" => $arPathTemplates["IMAGE_MAX_HEIGHT"]);
     $arFilter = array("<=DATE_PUBLISH" => ConvertTimeStamp(false, "FULL", false), "PUBLISH_STATUS" => BLOG_PUBLISH_STATUS_PUBLISH, "BLOG_ENABLE_RSS" => "Y", "MICRO" => "N");
     $arSelFields = array("ID", "TITLE", "DETAIL_TEXT", "DATE_PUBLISH", "AUTHOR_ID", "BLOG_USER_ALIAS", "BLOG_ID", "DETAIL_TEXT_TYPE", "BLOG_URL", "BLOG_OWNER_ID", "BLOG_SOCNET_GROUP_ID", "BLOG_GROUP_SITE_ID", "CODE", "PATH");
     if (!empty($arGroup)) {
         $arFilter["BLOG_GROUP_ID"] = $arGroup["ID"];
     } elseif (count($arGroupID) > 0) {
         $arFilter["BLOG_GROUP_ID"] = $arGroupID;
     }
     if (count($arAvBlog) > 0) {
         $arFilter["BLOG_ID"] = $arAvBlog;
     }
     if ($siteID !== false) {
         $arFilter["BLOG_GROUP_SITE_ID"] = $siteID;
     }
     if ($bUserSocNet == "Y") {
         $arFilter["BLOG_USE_SOCNET"] = "Y";
         $arFilter["FOR_USER"] = $user_id;
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:blog.php


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