4 include_once
'Services/Object/classes/class.ilObjectListGUI.php';
19 parent::__construct();
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->info_screen_enabled =
true;
48 $this->gui_class_name =
'ilobjforumgui';
51 include_once
'Modules/Forum/classes/class.ilObjForumAccess.php';
68 if(!$ilAccess->checkAccess(
'read',
'', $this->ref_id))
73 $lng->loadLanguageModule(
'forum');
77 include_once
'Modules/Forum/classes/class.ilObjForumAccess.php';
79 $num_posts_total = $properties[
'num_posts'];
80 $num_unread_total = $properties[
'num_unread_posts'];
82 include_once
'Modules/Forum/classes/class.ilForumPostDraft.php';
83 $num_drafts_total = 0;
87 $num_drafts_total = $drafts_statistics[
'total'];
90 $frm_overview_setting = (int)$ilSetting::_lookupValue(
'frma',
'forum_overview');
94 $num_new_total = $properties[
'num_new_posts'];
99 if(!$ilUser->isAnonymous())
103 $alert = ($num_unread_total > 0) ?
true :
false;
106 'property' => $lng->txt(
'forums_articles') .
' (' . $lng->txt(
'unread') .
')',
107 'value' => $num_posts_total .
' (' . $num_unread_total .
')' 111 if($num_new_total > 0)
114 $alert = ($num_new_total > 0) ?
true :
false;
116 'alert' => $alert,
'property' => $lng->txt(
'forums_new_articles'),
'value' => $num_new_total
125 'alert' => ($num_drafts_total > 0) ?
true :
false,
126 'property' => $lng->txt(
'drafts'),
127 'value' => $num_drafts_total
135 'property' => $lng->txt(
'forums_articles'),
136 'value' => $num_posts_total
140 include_once
'Modules/Forum/classes/class.ilForumProperties.php';
148 'property' => $lng->txt(
'forums_anonymized'),
149 'value' => $lng->txt(
'yes')
155 if((
int)$last_post[
'pos_pk'])
158 "\" href=\"ilias.php?baseClass=ilRepositoryGUI&cmd=viewThread&cmdClass=ilobjforumgui&target=true&pos_pk=" .
159 $last_post[
'pos_pk'] .
"&thr_pk=" . $last_post[
'pos_thr_fk'] .
"&ref_id=" .
160 $this->ref_id .
"#" . $last_post[
"pos_pk"] .
"\">" .
162 strtolower($lng->txt(
'from')) .
" ";
164 require_once
'Modules/Forum/classes/class.ilForumAuthorInformation.php';
166 $last_post[
'pos_author_id'],
167 $last_post[
'pos_display_user_id'],
168 $last_post[
'pos_usr_alias'],
169 $last_post[
'import_name'],
171 'class' =>
'il_ItemProperty',
172 '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'])
176 $lpCont .= $authorinfo->getLinkedAuthorName();
182 'property' => $lng->txt(
'forums_last_post'),
206 return 'ilias.php?baseClass=ilRepositoryGUI&cmd=viewThread&cmdClass=ilobjforumgui&ref_id=' . $this->ref_id .
'&thr_pk=' . $this->
getChildId();
210 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];
213 return parent::getCommandLink($a_cmd);
static getLastPostByRefId($ref_id)
getCommandFrame($a_cmd)
{}
static getInstance($a_obj_id=0)
getProperties()
Get item properties.
static formatDate(ilDateTime $date)
Format a date public.
__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: $...