114 : void
115 {
116 $tpl->setCurrentBlock(
'posts_row');
117
120 $this->ref_id,
121 $post->getPosAuthorId()
122 )) {
123 $rowCol = 'ilModeratorPosting';
124 } elseif (
$post->isAuthorModerator()) {
125 $rowCol = 'ilModeratorPosting';
126 } else {
128 }
129 } else {
131 }
132
133 $tpl->setVariable(
'ROWCOL',
' ' . $rowCol);
134
135 if (
$post->isCensored()) {
136 $tpl->setVariable(
'TXT_CENSORSHIP_ADVICE', $this->
lng->txt(
'post_censored_comment_by_moderator'));
137 $rowCol = 'tblrowmarked';
138 }
139
140 $tpl->setVariable(
'ROWCOL',
' ' . $rowCol);
141 if (!
$post->isActivated() &&
$post->isOwner($this->user->getId())) {
142 $tpl->setVariable(
'POST_NOT_ACTIVATED_YET', $this->
lng->txt(
'frm_post_not_activated_yet'));
143 }
144
146 $post->getPosAuthorId(),
147 $post->getDisplayUserId(),
148 (
string)
$post->getUserAlias(),
149 (
string)
$post->getImportName()
150 );
151
152 if ($authorinfo->hasSuffix()) {
153 if (!$authorinfo->isDeleted()) {
154 $tpl->setVariable(
'USR_NAME', $authorinfo->getAlias());
155 }
156 $tpl->setVariable(
'AUTHOR', $authorinfo->getSuffix());
157 } else {
158 if ($authorinfo->getAuthorName(true) && !$this->objProperties->isAnonymized()) {
159 $tpl->setVariable(
'USR_NAME', $authorinfo->getAuthorName(
true));
160 }
161 $tpl->setVariable(
'AUTHOR', $authorinfo->getAuthorShortName());
162 }
163
164 if (self::MODE_EXPORT_CLIENT === $mode) {
165 if ($authorinfo->getAuthor()->getPref('public_profile') !== 'n') {
166 $tpl->setVariable(
'TXT_REGISTERED', $this->
lng->txt(
'registered_since'));
168 'REGISTERED_SINCE',
169 $this->frm->convertDate($authorinfo->getAuthor()->getCreateDate())
170 );
171 }
172
173 if (
$post->getDisplayUserId()) {
174 if ($this->is_moderator) {
175 $num_posts = $this->frm->countUserArticles(
$post->getDisplayUserId());
176 } else {
177 $num_posts = $this->frm->countActiveUserArticles(
$post->getDisplayUserId());
178 }
179 $tpl->setVariable(
'TXT_NUM_POSTS', $this->
lng->txt(
'forums_posts'));
181 }
182 }
183
184 $tpl->setVariable(
'USR_IMAGE', $authorinfo->getProfilePicture());
186 $this->ref_id,
187 $post->getPosAuthorId()
188 )) {
189 if ($authorinfo->getAuthor()->getGender() === 'f') {
190 $tpl->setVariable(
'ROLE', $this->
lng->txt(
'frm_moderator_f'));
191 } elseif ($authorinfo->getAuthor()->getGender() === 'm') {
192 $tpl->setVariable(
'ROLE', $this->
lng->txt(
'frm_moderator_m'));
193 } else {
195 }
196 }
197
199 $spanClass = '';
201 $spanClass = 'moderator_small';
202 }
203
205
207 $post->getPosAuthorId(),
208 $post->getDisplayUserId(),
209 (
string)
$post->getUserAlias(),
210 ''
211 );
212
214 'POST_UPDATE_TXT',
215 $this->
lng->txt(
'edited_on') .
': ' . $this->frm->convertDate(
$post->getChangeDate()) .
' - ' . strtolower($this->
lng->txt(
'by'))
216 );
217 $tpl->
setVariable(
'UPDATE_AUTHOR', $authorinfo->getLinkedAuthorShortName());
218 if ($authorinfo->getAuthorName(true) && !$this->objProperties->isAnonymized()) {
219 $tpl->setVariable(
'UPDATE_USR_NAME', $authorinfo->getAuthorName(
true));
220 }
221 }
222
223 $post->setMessage($this->frm->prepareText(
$post->getMessage()));
224 $tpl->setVariable(
'POST_DATE', $this->frm->convertDate(
$post->getCreateDate()));
225 $tpl->setVariable(
'SUBJECT',
$post->getSubject());
226
227 if (!
$post->isCensored()) {
228 $spanClass = "";
230 $spanClass = 'moderator';
231 }
232
233
234 if (
$post->getMessage() === strip_tags(
$post->getMessage())) {
235
236 $post->setMessage(nl2br(
$post->getMessage()));
237 }
238
239 if ($spanClass !== '') {
241 'POST',
244 1
245 ) . "</span>"
246 );
247 } else {
249 }
250 } else {
251 $tpl->setVariable(
'POST',
"<span class=\"moderator\">" . nl2br((
string)
$post->getCensorshipComment()) .
"</span>");
252 }
253
254 $tpl->parseCurrentBlock(
'posts_row');
255 }
static _isModerator(int $a_ref_id, int $a_usr_id)
static _replaceMediaObjectImageSrc(string $a_text, int $a_direction=0, string $nic='')
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
static switchColor(int $a_num, string $a_css1, string $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
setVariable(string $variable, $value='')
Sets the given variable to the given value.