4 include_once
'Services/Object/classes/class.ilObjectListGUI.php';
27 $this->child_id = $a_child_id;
35 return $this->child_id;
40 $this->static_link_enabled =
true;
41 $this->delete_enabled =
true;
42 $this->cut_enabled =
true;
43 $this->copy_enabled =
true;
44 $this->subscribe_enabled =
true;
45 $this->link_enabled =
true;
46 $this->payment_enabled =
false;
47 $this->info_screen_enabled =
true;
49 $this->gui_class_name =
'ilobjforumgui';
52 include_once
'Modules/Forum/classes/class.ilObjForumAccess.php';
62 public function initItem($a_ref_id, $a_obj_id, $a_title =
"", $a_description =
"")
79 if(!$ilAccess->checkAccess(
'read',
'', $this->ref_id))
84 $lng->loadLanguageModule(
'forum');
88 include_once
'Modules/Forum/classes/class.ilObjForumAccess.php';
90 $num_posts_total = $properties[
'num_posts'];
91 $num_unread_total = $properties[
'num_unread_posts'];
92 $num_new_total = $properties[
'num_new_posts'];
95 if(!$ilUser->isAnonymous())
99 $alert = ($num_unread_total > 0) ?
true :
false;
102 'property' => $lng->txt(
'forums_articles') .
' (' . $lng->txt(
'unread') .
')',
103 'value' => $num_posts_total .
' (' . $num_unread_total .
')'
107 $alert = ($num_new_total > 0) ?
true :
false;
110 'property' => $lng->txt(
'forums_new_articles'),
111 'value' => $num_new_total
119 'property' => $lng->txt(
'forums_articles'),
120 'value' => $num_posts_total
124 include_once
'Modules/Forum/classes/class.ilForumProperties.php';
132 'property' => $lng->txt(
'forums_anonymized'),
133 'value' => $lng->txt(
'yes')
139 if((
int)$last_post[
'pos_pk'])
142 "\" href=\"ilias.php?baseClass=ilRepositoryGUI&cmd=viewThread&cmdClass=ilobjforumgui&target=true&pos_pk=" .
143 $last_post[
'pos_pk'] .
"&thr_pk=" . $last_post[
'pos_thr_fk'] .
"&ref_id=" .
144 $this->ref_id .
"#" . $last_post[
"pos_pk"] .
"\">" .
146 strtolower($lng->txt(
'from')) .
" ";
148 require_once
'Modules/Forum/classes/class.ilForumAuthorInformation.php';
150 $last_post[
'pos_usr_id'],
151 $last_post[
'pos_usr_alias'],
152 $last_post[
'import_name'],
154 'class' =>
'il_ItemProperty',
155 'href' =>
'ilias.php?baseClass=ilRepositoryGUI&cmd=showUser&cmdClass=ilobjforumgui&ref_id=' . $this->ref_id .
'&user='.$last_post[
'pos_usr_id'].
'&offset=0&backurl=' . urlencode(
'ilias.php?baseClass=ilRepositoryGUI&ref_id=' .
$_GET[
'ref_id'])
159 $lpCont .= $authorinfo->getLinkedAuthorName();
165 'property' => $lng->txt(
'forums_last_post'),
191 return 'ilias.php?baseClass=ilRepositoryGUI&cmd=viewThread&cmdClass=ilobjforumgui&ref_id=' . $this->ref_id .
'&thr_pk=' . $this->
getChildId();
195 return 'ilias.php?baseClass=ilRepositoryGUI&cmd=viewThread&cmdClass=ilobjforumgui&target=1&ref_id=' . $this->ref_id .
'&thr_pk=' . $thread_post[0] .
'&pos_pk=' . $thread_post[1] .
'#' . $thread_post[1];