Documentation

CForumNew::GetSites

array
CForumNew::GetSites(
 int ID
);

The method GetSites returns an associated array whose keys are the sites to which a specified forum is bound, and values are the templates of a path to a forum post on the corresponding site.

Parameters

ParameterDescription
ID The forum ID.

Example



// Obtain an array of real paths to the post $MID 
// from the topic $TID for the forum $FID

$arForumPaths = CForumNew::GetSites($FID);
$arForumPathsCodes = array_keys($arForumPaths);
for ($i = 0; $i < count($arForumPathsCodes); $i++)
{
    $arForumPaths[$arForumPathsCodes[$i]] = 
        CForumNew::PreparePath2Message($arForumPaths[$arForumPathsCodes[$i]],
                                       array("FORUM_ID"=>$FID,
                                             "TOPIC_ID"=>$TID,
                                             "MESSAGE_ID"=>$MID)
                                       );
}
© «Bitrix24», 2001-2024
Up