|
static | checkParams ($arMessage=array(), &$arTopic, &$arForum) |
|
static | actionUpdate ($arOldTopic, $arTopic, $arForum=array()) |
|
static | actionDelete ($arTopic, $arForum=array()) |
|
static | actionAdd ($arMessage, $arTopic, $arForum=array()) |
|
См. определение в файле sitemapforum.php строка 19
◆ __callStatic()
static __callStatic |
( |
|
$name, |
|
|
|
$arguments |
|
) |
| |
|
static |
См. определение в файле sitemapforum.php строка 21
23 $name = ToUpper($name);
27 if ($arguments[1][
"APPROVED"] ==
"Y")
33 if ($arguments[1][
"APPROVED"] ==
"Y")
39 if ($arguments[1][
"APPROVED"] ==
"N")
43 else if (empty($arguments[2]) || $arguments[1][
"FORUM_ID"] == $arguments[2][
"FORUM_ID"])
45 self::actionUpdate((empty($arguments[2]) ? $arguments[1] : $arguments[2]), $arguments[1]);
54 if ($arguments[1][
"APPROVED"] ==
"Y")
◆ actionAdd()
static actionAdd |
( |
|
$arMessage, |
|
|
|
$arTopic, |
|
|
|
$arForum = array() |
|
) |
| |
|
staticprotected |
См. определение в файле sitemapforum.php строка 173
175 if (($arSitemaps = self::checkParams($arMessage, $arTopic, $arForum)) && $arSitemaps)
177 foreach($arSitemaps as $arSitemap)
179 $sitemapFile =
new SitemapFile($arSitemap[
"fileName"], $arSitemap);
180 $sitemapFile->appendIblockEntry($arSitemap[
'url'], $arSitemap[
'date']);
182 $sitemapIndex =
new SitemapIndex($arSitemap[
'SITEMAP_FILE'], $arSitemap);
183 $sitemapIndex->appendIndexEntry($sitemapFile);
185 if($arSitemap[
'ROBOTS'] ==
'Y')
187 $robotsFile =
new RobotsFile($arSitemap[
'SITE_ID']);
188 $robotsFile->addRule(
◆ actionDelete()
static actionDelete |
( |
|
$arTopic, |
|
|
|
$arForum = array() |
|
) |
| |
|
staticprotected |
См. определение в файле sitemapforum.php строка 129
131 if (($arSitemaps = self::checkParams(array(), $arTopic, $arForum)) && $arSitemaps)
133 foreach($arSitemaps as $arSitemap)
135 $sitemapFile =
new SitemapFile($arSitemap[
"fileName"], $arSitemap);
136 $sitemapFile->removeEntry($arSitemap[
'url']);
137 $informRobots =
false;
138 if (!$sitemapFile->isNotEmpty())
141 'url' => \CForumNew::PreparePath2Message(
142 $arForum[
"PATH2FORUM_MESSAGE"][$arSitemap[
"SITE_ID"]],
144 "FORUM_ID" => $arForum[
"ID"],
145 "TOPIC_ID" => $arForum[
"TID"],
146 "TITLE_SEO" => $arForum[
"TITLE_SEO"],
148 "SOCNET_GROUP_ID" => $arForum[
"SOCNET_GROUP_ID"],
149 "OWNER_ID" => $arForum[
"OWNER_ID"],
150 "PARAM1" => $arForum[
"PARAM1"],
151 "PARAM2" => $arForum[
"PARAM2"]
154 'date' => MakeTimeStamp($arForum[
'LAST_POST_DATE'])
156 $sitemapFile->appendIblockEntry($rule[
'url'], $rule[
'date']);
157 $informRobots =
true;
160 $sitemapIndex =
new SitemapIndex($arSitemap[
'SITEMAP_FILE'], $arSitemap);
161 $sitemapIndex->appendIndexEntry($sitemapFile);
162 if ($informRobots && $arSitemap[
'ROBOTS'] ==
'Y')
164 $robotsFile =
new RobotsFile($arSitemap[
'SITE_ID']);
165 $robotsFile->addRule(
◆ actionUpdate()
static actionUpdate |
( |
|
$arOldTopic, |
|
|
|
$arTopic, |
|
|
|
$arForum = array() |
|
) |
| |
|
staticprotected |
См. определение в файле sitemapforum.php строка 104
106 if (($arSitemaps = self::checkParams(array(), $arTopic, $arForum)) && $arSitemaps)
109 foreach($arSitemaps as $key => $arSitemap)
111 $sitemapFile =
new SitemapFile($arSitemap[
"fileName"], $arSitemap);
112 $sitemapFile->removeEntry($arSitemapsOld[$key][
'url']);
114 $sitemapFile->appendIblockEntry($arSitemap[
"url"], $arSitemap[
'date']);
116 $sitemapIndex =
new SitemapIndex($arSitemap[
'SITEMAP_FILE'], $arSitemap);
117 $sitemapIndex->appendIndexEntry($sitemapFile);
118 if($arSitemap[
'ROBOTS'] ==
'Y')
120 $robotsFile =
new RobotsFile($arSitemap[
'SITE_ID']);
121 $robotsFile->addRule(
◆ checkParams()
static checkParams |
( |
|
$arMessage = array() , |
|
|
& |
$arTopic, |
|
|
& |
$arForum |
|
) |
| |
|
staticprotected |
См. определение в файле sitemapforum.php строка 62
66 $arTopic = (!empty($arTopic) ? $arTopic : \CForumTopic::GetByID($arMessage[
"TOPIC_ID"]));
70 if (!empty($arSitemaps) && ($arForum = \CForumNew::GetByIDEx($arTopic[
"FORUM_ID"])) && $arForum)
72 $arForum[
"PATH2FORUM_MESSAGE"] = \CForumNew::GetSites($arTopic[
"FORUM_ID"]);
73 $date = MakeTimeStamp($arTopic[
'LAST_POST_DATE']);
75 foreach($arSitemaps as $arSitemap)
77 $path = $arForum[
"PATH2FORUM_MESSAGE"][$arSitemap[
"SITE_ID"]];
80 $arSitemap[
"fileName"] = str_replace(
"#FORUM_ID#", $arForum[
"ID"], $arSitemap[
'SITEMAP_FILE_FORUM']);
81 $arSitemap[
"url"] = \CForumNew::PreparePath2Message(
84 "FORUM_ID" => $arForum[
"ID"],
85 "TOPIC_ID" => $arTopic[
"ID"],
86 "TITLE_SEO" => $arTopic[
"TITLE_SEO"],
88 "SOCNET_GROUP_ID" => $arTopic[
"SOCNET_GROUP_ID"],
89 "OWNER_ID" => $arTopic[
"OWNER_ID"],
90 "PARAM1" => $arTopic[
"PARAM1"],
91 "PARAM2" => $arTopic[
"PARAM2"]
94 $arSitemap[
"date"] = $date;
95 $result[] = $arSitemap;
98 return (empty($result) ?
false : $result);
Объявления и описания членов класса находятся в файле: