22 parent::__construct();
25 $this->lng = $DIC->language();
26 $this->
user = $DIC->user();
27 $this->access = $DIC->access();
36 $this->child_id = $a_child_id;
44 return $this->child_id;
49 $this->static_link_enabled =
true;
50 $this->delete_enabled =
true;
51 $this->cut_enabled =
true;
52 $this->copy_enabled =
true;
53 $this->subscribe_enabled =
true;
54 $this->link_enabled =
true;
55 $this->info_screen_enabled =
true;
57 $this->gui_class_name =
'ilobjforumgui';
68 if (!$this->access->checkAccess(
'read',
'', $this->ref_id)) {
72 $this->lng->loadLanguageModule(
'forum');
77 $num_posts_total = $properties[
'num_posts'];
78 $num_unread_total = $properties[
'num_unread_posts'];
80 $num_drafts_total = 0;
83 $num_drafts_total = $drafts_statistics[
'total'];
86 $frm_overview_setting = (int) $this->
settings->get(
'forum_overview');
89 $num_new_total = $properties[
'num_new_posts'];
94 if (!$this->
user->isAnonymous()) {
98 'property' => $this->lng->txt(
'forums_articles') .
' (' . $this->lng->txt(
'unread') .
')',
99 'value' => $num_posts_total .
' (' . $num_unread_total .
')' 102 if ($num_new_total > 0) {
105 'alert' =>
false,
'property' => $this->lng->txt(
'forums_new_articles'),
'value' => $num_new_total
114 'property' => $this->lng->txt(
'drafts'),
115 'value' => $num_drafts_total
121 'property' => $this->lng->txt(
'forums_articles'),
122 'value' => $num_posts_total
131 'property' => $this->lng->txt(
'forums_anonymized'),
132 'value' => $this->lng->txt(
'yes')
138 if ((
int) $last_post[
'pos_pk']) {
140 "\" href=\"ilias.php?baseClass=ilRepositoryGUI&cmd=viewThread&cmdClass=ilobjforumgui&target=true&pos_pk=" .
141 $last_post[
'pos_pk'] .
"&thr_pk=" . $last_post[
'pos_thr_fk'] .
"&ref_id=" .
142 $this->ref_id .
"#" . $last_post[
"pos_pk"] .
"\">" .
144 strtolower($this->lng->txt(
'from')) .
" ";
147 $last_post[
'pos_author_id'],
148 $last_post[
'pos_display_user_id'],
149 $last_post[
'pos_usr_alias'],
150 $last_post[
'import_name'],
152 'class' =>
'il_ItemProperty',
153 'href' =>
'ilias.php?baseClass=ilRepositoryGUI&cmd=showUser&cmdClass=ilobjforumgui&ref_id=' . $this->ref_id .
'&user=' . $last_post[
'pos_display_user_id'] .
'&offset=0&backurl=' . urlencode(
'ilias.php?baseClass=ilRepositoryGUI&ref_id=' .
$_GET[
'ref_id'])
157 $lpCont .= $authorinfo->getLinkedAuthorName();
163 'property' => $this->lng->txt(
'forums_last_post'),
186 return 'ilias.php?baseClass=ilRepositoryGUI&cmd=viewThread&cmdClass=ilobjforumgui&ref_id=' . $this->ref_id .
'&thr_pk=' . $this->
getChildId();
190 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];
193 return parent::getCommandLink($a_cmd);
static getLastPostByRefId($ref_id)
getCommandFrame($a_cmd)
{}
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static getInstance($a_obj_id=0)
__construct()
Constructor.
getDetailsLevel()
Get current details level.
static isSavePostDraftAllowed()
const FORUM_OVERVIEW_WITH_NEW_POSTS
static getStatisticsByRefId($ref_id)
static prepareMessageForLists($text)
Prepare message for container view.
static getDraftsStatisticsByRefId($ref_id)
static _getCommands()
get commands this method returns an array of all possible commands/permission combinations example: $...