Server IP : 85.193.89.191 / Your IP : 3.145.104.137 Web Server : Apache System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : bitrix ( 600) PHP Version : 8.1.27 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/bitrix/www/bitrix/components/bitrix/socialnetwork.forum.topic.read/ |
Upload File : |
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); if (!CModule::IncludeModule("forum")) return 0; $this->IncludeComponentLang("functions.php"); if (!function_exists("WrapLongWord")) // Need for custom templates. Do not delete. { function WrapLongWord(&$value, $WordLength=false, $WordBoundary=false, $WordSeparator=false) { if ($WordBoundary === false) $WordBoundary = " \s\n\r\t\x01"; if ($WordSeparator === false) $WordSeparator = '<WBR/>­'; if (intval($WordLength) <= 0) $WordLength = 20; if (is_array($value)) { foreach ($value as $key => $val) WrapLongWord($value[$key], $WordLength, $WordBoundary); } else { $value = str_replace( array(chr(1), chr(2), chr(3), chr(4), chr(5), "&", "<", ">", """, " ", "©", "®", "™"), array("", "", "", "", "", chr(5), "<", ">", "\"", chr(1), chr(2), chr(3), chr(4)), $value); $value = trim(preg_replace("/([^".$WordBoundary."]{".$WordLength."})/", '\\1<WBR/>­', " ".$value." ")); $value = str_replace( array(chr(5), "<", ">", "\"", chr(1), chr(2), chr(3), chr(4), "<WBR/>", "<WBR>", "&shy;"), array("&", "<", ">", """, " ", "©", "®", "™", "<WBR/>", "<WBR/>", "­"), $value); } $value = str_replace( array("<WBR/>","&shy;"), array("<WBR/>", "­"), $value); return $value; } } if (!function_exists("ForumNumberEnding")) { function ForumNumberEnding($num) { if (LANGUAGE_ID=="ru") { if (mb_strlen($num) > 1 && mb_substr($num, mb_strlen($num) - 2, 1) == "1") { return GetMessage("F_END_OV"); } else { $c = intval(mb_substr($num, mb_strlen($num) - 1, 1)); if ($c==0 || ($c>=5 && $c<=9)) return GetMessage("F_END_OV"); elseif ($c==1) return ""; else return GetMessage("F_END_A"); } } else { if (intval($num)>1) return "s"; return ""; } } } if (!function_exists("endingTopicsPosts")) { function endingTopicsPosts($mark, $count) { $text = ""; $count = intval($count%10); if ($count==1) $text = "_1"; elseif (($count>2) && ($count<5)) $text = "_2_4"; // GetMessage("F_STAT_TOPICS"); // GetMessage("F_STAT_TOPICS_1"); // GetMessage("F_STAT_TOPICS_2_4"); // GetMessage("F_STAT_POSTS"); // GetMessage("F_STAT_POSTS_1"); // GetMessage("F_STAT_POSTS_2_4"); return GetMessage("F_STAT_".mb_strtoupper($mark).$text); } } ?>