Creates output for explorer view in admin menue recursive method public.
{
static $counter = 0;
include_once 'Services/JSON/classes/class.ilJsonUtil.php';
if (is_numeric($a_parent) && $objects = $this->objCurrentTopic->getPostChilds($a_parent, 'explorer'))
{
++$a_depth;
foreach ($objects as $key => $object)
{
{
continue;
}
$href_target = $this->target."&pos_pk=".$object['child'].'#'.$object['child'];
if($ilUser->getId() == ANONYMOUS_USER_ID ||
$this->forum_obj->isRead($ilUser->getId(), $object['pos_pk']))
{
$title =
"<span style='white-space:wrap;' class='frmTitle' id='frm_node_".$object[
'pos_pk'].
"'><a class='small' href='".$href_target.
"'>".stripslashes($object[
'subject']).
"</a></span>".
"<div style='white-space:nowrap; margin-bottom:5px;' class='small'>";
}
else
{
$mark_post_target = str_replace('viewThread', 'markPostRead', $href_target);
$href_target = $mark_post_target;
$title =
"<span style='white-space:wrap;' class='frmTitleBold' id='frm_node_".$object[
'pos_pk'].
"'><a class='small' href='".$href_target.
"'>".stripslashes($object[
'subject']).
"</a></span>".
"<div style='white-space:nowrap; margin-bottom:5px;' class='small'>";
}
if ($this->objProperties->isAnonymized())
{
if ($object[
'alias'] !=
'')
$title .= stripslashes($object[
'alias']);
else $title .= $lng->txt(
'forums_anonymous');
}
else
{
$title .= stripslashes($object[
'loginname']);
}
$title .=
", ".$this->forum->convertDate($object[
'date']).
"</div>";
$this->tpl->setVariable(
'OLD_THR_ID',
$_SESSION[
'thread_control'][
'old']);
$this->tpl->setVariable(
'NEW_THR_ID',
$_SESSION[
'thread_control'][
'new']);
$node = new stdClass();
if($object['child'] == $this->root_id)
{
$this->tpl->setVariable('FRM_TREE_ROOT_NODE_VARIABLE', 'frmNode'.$object['child']);
}
else
{
$this->tpl->setCurrentBlock('frm_nodes');
$this->tpl->setVariable('FRM_NODES_VARNAME', 'frmNode'.$object['child']);
$this->tpl->setVariable('FRM_NODES_PARENT_VARNAME', 'frmNode'.$object['parent']);
$this->tpl->parseCurrentBlock();
}
++$counter;
$this->
setOutput($object[
'child'], $a_depth);
}
}
}