4 require_once
'Modules/Forum/classes/class.ilObjForumAccess.php';
5 require_once
'Modules/Forum/classes/class.ilForumAuthorInformationCache.php';
103 if(is_numeric($this->display_id) && $this->display_id > 0)
117 $this->author->setId(0);
118 $this->author->setPref(
'public_profile',
'n');
119 $this->author->setGender(
'');
142 protected function isCurrentUserSessionLoggedIn()
149 return !$ilUser->isAnonymous();
159 if($with_profile_link && $this->public_profile_link_attributes)
163 foreach($this->public_profile_link_attributes as $attr => $value)
165 $link .=
' ' . $attr .
'="' . $value .
'"';
174 if($with_profile_link && $this->public_profile_link_attributes)
177 $linked_login .=
'</a>';
180 $this->linked_public_name = $link;
181 $this->linked_short_name = $linked_login;
187 protected function init()
194 include_once
'Modules/Forum/classes/class.ilObjForumAccess.php';
203 $this->isCurrentUserSessionLoggedIn() && $this->
getAuthor()->getPref(
'public_profile') ==
'y' 205 $this->
getAuthor()->getPref(
'public_profile') ==
'g')
209 $this->author_name = $this->
getAuthor()->getPublicName();
210 $this->author_short_name = $this->
getAuthor()->getLogin();
212 if($this->
getAuthor()->getPref(
'public_upload') ==
'y')
214 $this->profilePicture = $this->
getAuthor()->getPersonalPicturePath(
'xsmall');
221 if($this->
getAuthor()->getPref(
'public_gender') !=
'y')
231 $this->author_short_name = $this->author_name = $this->
getAuthor()->getLogin();
240 $this->author_short_name = $this->author_name = $this->alias .
' (' . $lng->txt(
'deleted') .
')';
241 $this->suffix = $lng->txt(
'deleted');
245 else if(strlen($this->import_name))
248 $this->author_short_name = $this->author_name = $this->import_name .
' (' . $lng->txt(
'imported') .
')';
249 $this->suffix = $lng->txt(
'imported');
253 else if(strlen($this->alias))
256 $this->author_short_name = $this->author_name = $this->alias .
' (' . $lng->txt(
'frm_pseudonym') .
')';
257 $this->suffix = $lng->txt(
'frm_pseudonym');
264 $this->author_short_name = $this->author_name = $lng->txt(
'forums_anonymous');
292 if(!$without_short_name)
298 return trim(preg_replace(
'/\(' . $this->
getAuthorShortName() .
'\)/',
'', $this->author_name));
331 return strlen($this->suffix);
static getCachedUserInstance($usr_id)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)