@@ 178-198 (lines=21) @@ | ||
175 | } else { |
|
176 | $this->tpl->assign('show_threadnav', false); |
|
177 | } |
|
178 | if (false != $admin_view) { |
|
179 | // admins can see all |
|
180 | $text = $tree[$comment_id]['obj']->getVar('text') |
|
181 | . '<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">' |
|
182 | . _MD_COMMENTS_STATUS . ': ' . $this->statusText[$tree[$comment_id]['obj']->getVar('status')] |
|
183 | . '<br />IP: <span style="font-weight: bold;">' . $tree[$comment_id]['obj']->getVar('ip') |
|
184 | . '</span></div>'; |
|
185 | } else { |
|
186 | // hide comments that are not active |
|
187 | if (COMMENTS_ACTIVE != $tree[$comment_id]['obj']->getVar('status')) { |
|
188 | // if there are any child comments, display them as root comments |
|
189 | if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) { |
|
190 | foreach ($tree[$comment_id]['child'] as $child_id) { |
|
191 | $this->renderThreadView($child_id, $admin_view, false); |
|
192 | } |
|
193 | } |
|
194 | return; |
|
195 | } else { |
|
196 | $text = $tree[$comment_id]['obj']->getVar('text'); |
|
197 | } |
|
198 | } |
|
199 | $replies = array(); |
|
200 | $this->renderThreadReplies($tree, $comment_id, $replies, ' ', $admin_view); |
|
201 | $show_replies = (count($replies) > 0) ? true : false; |
|
@@ 289-308 (lines=20) @@ | ||
286 | $tree = $xot->getTree(); |
|
287 | $image = (false != $this->useIcons) ? $this->getTitleIcon($tree[$comment_id]['obj']->getVar('icon')) : ''; |
|
288 | $title = $tree[$comment_id]['obj']->getVar('title'); |
|
289 | if (false != $admin_view) { |
|
290 | $text = $tree[$comment_id]['obj']->getVar('text') |
|
291 | . '<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">' |
|
292 | . _MD_COMMENTS_STATUS . ': ' . $this->statusText[$tree[$comment_id]['obj']->getVar('status')] |
|
293 | . '<br />IP: <span style="font-weight: bold;">' . $tree[$comment_id]['obj']->getVar('ip') |
|
294 | . '</span></div>'; |
|
295 | } else { |
|
296 | // skip this comment if it is not active and continue on processing its child comments instead |
|
297 | if (COMMENTS_ACTIVE != $tree[$comment_id]['obj']->getVar('status')) { |
|
298 | // if there are any child comments, display them as root comments |
|
299 | if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) { |
|
300 | foreach ($tree[$comment_id]['child'] as $child_id) { |
|
301 | $this->renderNestView($child_id, $admin_view); |
|
302 | } |
|
303 | } |
|
304 | return; |
|
305 | } else { |
|
306 | $text = $tree[$comment_id]['obj']->getVar('text'); |
|
307 | } |
|
308 | } |
|
309 | $replies = array(); |
|
310 | $this->renderNestReplies($tree, $comment_id, $replies, 25, $admin_view); |
|
311 | $this->tpl->append('comments', array( |