|
@@ 173-198 (lines=26) @@
|
| 170 |
|
} else { |
| 171 |
|
$this->_tpl->assign('show_threadnav', false); |
| 172 |
|
} |
| 173 |
|
if (false != $admin_view) { |
| 174 |
|
// admins can see all |
| 175 |
|
$com_email = $tree[$comment_id]['obj']->getVar('com_email'); |
| 176 |
|
$text = $tree[$comment_id]['obj']->getVar('com_text'); |
| 177 |
|
$text .= '<div style="text-align:right; margin-top: 2px; margin-bottom: 0; margin-right: 2px;">'; |
| 178 |
|
$text .= _CM_STATUS . ': ' . $this->_statusText[$tree[$comment_id]['obj']->getVar('com_status')] . '<br />'; |
| 179 |
|
$text .= 'IP: <span style="font-weight: bold;">' . $tree[$comment_id]['obj']->getVar('com_ip') . '</span>'; |
| 180 |
|
if (!empty($com_email)) { |
| 181 |
|
$text .= '<br />' . _CM_EMAIL . ' :<span style="font-weight: bold;"><a href="mailto:' . $com_email . '" title="' . $com_email . '">' . $com_email . '</a></span>'; |
| 182 |
|
} |
| 183 |
|
$text .= '</div>'; |
| 184 |
|
} else { |
| 185 |
|
// hide comments that are not active |
| 186 |
|
if (XOOPS_COMMENT_ACTIVE != $tree[$comment_id]['obj']->getVar('com_status')) { |
| 187 |
|
// if there are any child comments, display them as root comments |
| 188 |
|
if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) { |
| 189 |
|
foreach ($tree[$comment_id]['child'] as $child_id) { |
| 190 |
|
$this->renderThreadView($child_id, $admin_view, false); |
| 191 |
|
} |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
return null; |
| 195 |
|
} else { |
| 196 |
|
$text = $tree[$comment_id]['obj']->getVar('com_text'); |
| 197 |
|
} |
| 198 |
|
} |
| 199 |
|
$replies = array(); |
| 200 |
|
$this->_renderThreadReplies($tree, $comment_id, $replies, ' ', $admin_view); |
| 201 |
|
$show_replies = (count($replies) > 0);// ? true : false; |
|
@@ 287-311 (lines=25) @@
|
| 284 |
|
} else { |
| 285 |
|
$title = $tree[$comment_id]['obj']->getVar('com_title'); |
| 286 |
|
} |
| 287 |
|
if (false != $admin_view) { |
| 288 |
|
$com_email = $tree[$comment_id]['obj']->getVar('com_email'); |
| 289 |
|
$text = $tree[$comment_id]['obj']->getVar('com_text'); |
| 290 |
|
$text .= '<div style="text-align:right; margin-top: 2px; margin-bottom: 0; margin-right: 2px;">'; |
| 291 |
|
$text .= _CM_STATUS . ': ' . $this->_statusText[$tree[$comment_id]['obj']->getVar('com_status')] . '<br />'; |
| 292 |
|
$text .= 'IP: <span style="font-weight: bold;">' . $tree[$comment_id]['obj']->getVar('com_ip') . '</span>'; |
| 293 |
|
if (!empty($com_email)) { |
| 294 |
|
$text .= '<br />' . _CM_EMAIL . ' :<span style="font-weight: bold;"><a href="mailto:' . $com_email . '" title="' . $com_email . '">' . $com_email . '</a></span>'; |
| 295 |
|
} |
| 296 |
|
$text .= '</div>'; |
| 297 |
|
} else { |
| 298 |
|
// skip this comment if it is not active and continue on processing its child comments instead |
| 299 |
|
if (XOOPS_COMMENT_ACTIVE != $tree[$comment_id]['obj']->getVar('com_status')) { |
| 300 |
|
// if there are any child comments, display them as root comments |
| 301 |
|
if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) { |
| 302 |
|
foreach ($tree[$comment_id]['child'] as $child_id) { |
| 303 |
|
$this->renderNestView($child_id, $admin_view); |
| 304 |
|
} |
| 305 |
|
} |
| 306 |
|
|
| 307 |
|
return null; |
| 308 |
|
} else { |
| 309 |
|
$text = $tree[$comment_id]['obj']->getVar('com_text'); |
| 310 |
|
} |
| 311 |
|
} |
| 312 |
|
$replies = array(); |
| 313 |
|
$this->_renderNestReplies($tree, $comment_id, $replies, 25, $admin_view); |
| 314 |
|
// Start edit by voltan |