not on channel (".$channelInfoNew[$channelInfoKey]["chanid"].") use: channelstatus
";
return $returnMsg;
}
$peerID=$channelInfoNew[$channelInfoKey]["peerid"];
$out=made("messages", "getPeerDialogs", array("peers" => array($channelInfoNew[$channelInfoKey]["peerid"])));
usleep(200000); //0,2 Sekunden
$returnMsg="";
if ($out['chats'][0]['forum']==1) { // channel is theme channel
$forumTopics=made("channels", "getForumTopics", array("channel" => $channelInfoNew[$channelInfoKey]["peerid"], "limit" => 100));
$returnMsg.="- topics on channel: ".htmlspecialchars($channelInfoNew[$channelInfoKey]["name"]).":
";
foreach ($forumTopics['topics'] as $forum) {
$titel=$forum['title'];
$id=$forum['id'];
$returnMsg.="[".$id."
] - ".htmlspecialchars($titel)."
";
}
} else {
$returnMsg="no topics on channel: ".htmlspecialchars($channelInfoNew[$channelInfoKey]["name"])."(".$channelInfoNew[$channelInfoKey]["chanid"]."
)
";
}
return $returnMsg;
} // function end
function getTopicName($chanid, $topic_id) {
$peerid="-100".$chanid;
$out=made("messages", "getPeerDialogs", array("peers" => array($peerid)));
usleep(200000); //0,2 Sekunden
$returnMsg="";
if ($out['chats'][0]['forum']==1) { // channel is theme channel
$forumTopics=made("channels", "getForumTopics", array("channel" => $peerid, "limit" => 100));
foreach ($forumTopics['topics'] as $forum) {
$id=$forum['id'];
if ($id==$topic_id) {
$titel=$forum['title'];
$returnMsg=cleanupString($titel);
}
}
} else {
$returnMsg="no topics on channel(".$chanid.")";
}
return $returnMsg;
} // function end