4 include_once
'Services/Object/classes/class.ilObjectListGUI.php';
24 parent::__construct();
27 $this->lng = $DIC->language();
28 $this->
user = $DIC->user();
29 $this->access = $DIC->access();
38 $this->child_id = $a_child_id;
46 return $this->child_id;
51 $this->static_link_enabled =
true;
52 $this->delete_enabled =
true;
53 $this->cut_enabled =
true;
54 $this->copy_enabled =
true;
55 $this->subscribe_enabled =
true;
56 $this->link_enabled =
true;
57 $this->info_screen_enabled =
true;
59 $this->gui_class_name =
'ilobjforumgui';
62 include_once
'Modules/Forum/classes/class.ilObjForumAccess.php';
71 if (!$this->access->checkAccess(
'read',
'', $this->ref_id)) {
75 $this->lng->loadLanguageModule(
'forum');
79 include_once
'Modules/Forum/classes/class.ilObjForumAccess.php';
81 $num_posts_total = $properties[
'num_posts'];
82 $num_unread_total = $properties[
'num_unread_posts'];
84 include_once
'Modules/Forum/classes/class.ilForumPostDraft.php';
85 $num_drafts_total = 0;
88 $num_drafts_total = $drafts_statistics[
'total'];
91 $frm_overview_setting = (int) $this->
settings->get(
'forum_overview');
94 $num_new_total = $properties[
'num_new_posts'];
99 if (!$this->
user->isAnonymous()) {
101 $alert = ($num_unread_total > 0) ?
true :
false;
104 'property' => $this->lng->txt(
'forums_articles') .
' (' . $this->lng->txt(
'unread') .
')',
105 'value' => $num_posts_total .
' (' . $num_unread_total .
')' 108 if ($num_new_total > 0) {
110 $alert = ($num_new_total > 0) ?
true :
false;
112 'alert' => $alert,
'property' => $this->lng->txt(
'forums_new_articles'),
'value' => $num_new_total
120 'alert' => ($num_drafts_total > 0) ?
true :
false,
121 'property' => $this->lng->txt(
'drafts'),
122 'value' => $num_drafts_total
128 'property' => $this->lng->txt(
'forums_articles'),
129 'value' => $num_posts_total
133 include_once
'Modules/Forum/classes/class.ilForumProperties.php';
139 'property' => $this->lng->txt(
'forums_anonymized'),
140 'value' => $this->lng->txt(
'yes')
146 if ((
int) $last_post[
'pos_pk']) {
148 "\" href=\"ilias.php?baseClass=ilRepositoryGUI&cmd=viewThread&cmdClass=ilobjforumgui&target=true&pos_pk=" .
149 $last_post[
'pos_pk'] .
"&thr_pk=" . $last_post[
'pos_thr_fk'] .
"&ref_id=" .
150 $this->ref_id .
"#" . $last_post[
"pos_pk"] .
"\">" .
152 strtolower($this->lng->txt(
'from')) .
" ";
154 require_once
'Modules/Forum/classes/class.ilForumAuthorInformation.php';
156 $last_post[
'pos_author_id'],
157 $last_post[
'pos_display_user_id'],
158 $last_post[
'pos_usr_alias'],
159 $last_post[
'import_name'],
161 'class' =>
'il_ItemProperty',
162 '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'])
166 $lpCont .= $authorinfo->getLinkedAuthorName();
172 'property' => $this->lng->txt(
'forums_last_post'),
195 return 'ilias.php?baseClass=ilRepositoryGUI&cmd=viewThread&cmdClass=ilobjforumgui&ref_id=' . $this->ref_id .
'&thr_pk=' . $this->
getChildId();
199 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];
202 return parent::getCommandLink($a_cmd);
static getLastPostByRefId($ref_id)
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
getCommandFrame($a_cmd)
{}
static getInstance($a_obj_id=0)
__construct()
Constructor.
getDetailsLevel()
Get current details level.
Create styles array
The data for the language used.
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: $...