function showThreadPost($order, $mode, $adminview = 0, $color_num = 1) { global $xoopsConfig, $xoopsUser; $edit_image = ""; $reply_image = ""; $delete_image = ""; $post_date = formatTimestamp($this->getVar("date"), "m"); if ($this->getVar("user_id") != 0) { $poster = new XoopsUser($this->getVar("user_id")); if (!$poster->isActive()) { $poster = 0; } } else { $poster = 0; } if ($this->getVar("icon") != null && $this->getVar("icon") != "") { $subject_image = "<a name='" . $this->getVar("comment_id") . "' id='" . $this->getVar("comment_id") . "'></a><img src='" . XOOPS_URL . "/images/subject/" . $this->getVar("icon") . "' alt='' />"; } else { $subject_image = "<a name='" . $this->getVar("comment_id") . "' id='" . $this->getVar("comment_id") . "'></a><img src='" . XOOPS_URL . "/images/icons/no_posticon.gif' alt='' />"; } if ($adminview) { $ip_image = "<img src='" . XOOPS_URL . "/images/icons/ip.gif' alt='" . $this->getVar("ip") . "' />"; } else { $ip_image = "<img src='" . XOOPS_URL . "/images/icons/ip.gif' alt='' />"; } if ($adminview || $xoopsUser && $this->getVar("user_id") == $xoopsUser->getVar("uid")) { $edit_image = "<a href='editcomment.php?comment_id=" . $this->getVar("comment_id") . "&mode=" . $mode . "&order=" . intval($order) . "'><img src='" . XOOPS_URL . "/images/icons/edit.gif' alt='" . _EDIT . "' /></a>"; } if ($xoopsConfig['anonpost'] || $xoopsUser) { $reply_image = "<a href='replycomment.php?comment_id=" . $this->getVar("comment_id") . "&mode=" . $mode . "&order=" . intval($order) . "'><img src='" . XOOPS_URL . "/images/icons/reply.gif' alt='" . _REPLY . "' /></a>"; } if ($adminview) { $delete_image = "<a href='deletecomment.php?comment_id=" . $this->getVar("comment_id") . "&mode=" . $mode . "&order=" . intval($order) . "'><img src='" . XOOPS_URL . "/images/icons/delete.gif' alt='" . _DELETE . "' /></a>"; } if ($poster) { $text = $this->getVar("comment"); if ($poster->getVar("attachsig")) { $text .= "<p><br />_________________<br />" . $poster->user_sig() . "</p>"; } $reg_date = _CM_JOINED; $reg_date .= formatTimestamp($poster->getVar("user_regdate"), "s"); $posts = _CM_POSTS; $posts .= $poster->getVar("posts"); $user_from = _CM_FROM; $user_from .= $poster->getVar("user_from"); $rank = $poster->rank(); if ($rank['image'] != "") { $rank['image'] = "<img src='" . XOOPS_UPLOAD_URL . "/" . $rank['image'] . "' alt='' />"; } $avatar_image = "<img src='" . XOOPS_UPLOAD_URL . "/" . $poster->getVar("user_avatar") . "' alt='' />"; if ($poster->isOnline()) { $online_image = "<span style='color:#ee0000;font-weight:bold;'>" . _ONLINE . "</span>"; } else { $online_image = ""; } $profile_image = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $poster->getVar("uid") . "'><img src='" . XOOPS_URL . "/images/icons/profile.gif' alt='" . _PROFILE . "' /></a>"; if ($xoopsUser) { $pm_image = "<a href='javascript:openWithSelfMain(\"" . XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $poster->getVar("uid") . "\",\"pmlite\",450,370);'><img src='" . XOOPS_URL . "/images/icons/pm.gif' alt='" . sprintf(_SENDPMTO, $poster->getVar("uname", "E")) . "' /></a>"; } else { $pm_image = ""; } if ($poster->getVar("user_viewemail")) { $email_image = "<a href='mailto:" . $poster->getVar("email", "E") . "'><img src='" . XOOPS_URL . "/images/icons/email.gif' alt='" . sprintf(_SENDEMAILTO, $poster->getVar("uname", "E")) . "' /></a>"; } else { $email_image = ""; } $posterurl = $poster->getVar("url"); if ($posterurl != "") { $www_image = "<a href='{$posterurl}' target='_blank'><img src='" . XOOPS_URL . "/images/icons/www.gif' alt='" . _VISITWEBSITE . "' /></a>"; } else { $www_image = ""; } if ($poster->getVar("user_icq") != "") { $icq_image = "<a href='http://wwp.icq.com/scripts/search.dll?to=" . $poster->getVar("user_icq", "E") . "'><img src='" . XOOPS_URL . "/images/icons/icq_add.gif' alt='" . _ADD . "' /></a>"; } else { $icq_image = ""; } if ($poster->getVar("user_aim") != "") { $aim_image = "<a href='aim:goim?screenname=" . $poster->getVar("user_aim", "E") . "&message=Hi+" . $poster->getVar("user_aim") . "+Are+you+there?'><img src='" . XOOPS_URL . "/images/icons/aim.gif' alt='aim' /></a>"; } else { $aim_image = ""; } if ($poster->getVar("user_yim") != "") { $yim_image = "<a href='http://edit.yahoo.com/config/send_webmesg?.target=" . $poster->getVar("user_yim", "E") . "&.src=pg'><img src='" . XOOPS_URL . "/images/icons/yim.gif' alt='yim' /></a>"; } else { $yim_image = ""; } if ($poster->getVar("user_msnm") != "") { $msnm_image = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $poster->getVar("uid") . "'><img src='" . XOOPS_URL . "/images/icons/msnm.gif' alt='msnm' /></a>"; } else { $msnm_image = ""; } showThread($color_num, $subject_image, $this->getVar("subject"), $text, $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $poster->getVar("uname"), $rank['title'], $rank['image'], $avatar_image, $reg_date, $posts, $user_from, $online_image, $profile_image, $pm_image, $email_image, $www_image, $icq_image, $aim_image, $yim_image, $msnm_image); } else { showThread($color_num, $subject_image, $this->getVar("subject"), $this->getVar("comment"), $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $xoopsConfig['anonymous']); } }
<thead class="thead-inverse"> <tr> <th colspan="2">Topic : <?php echo $top->topic; ?> </th> </tr> </thead> <tbody> <?php $isThread = false; foreach ($threads as $thr) { if ($cat->id == $thr->category and $top->id == $thr->topic) { $isThread = true; if ($thr->type == 'close') { showThread($thr, $visitors, $comments, $threadMembers, $thr->id, $userID); } else { ?> <tr> <td> <div class="thread-list-title"> <h4><?php echo anchor('author/view/' . $thr->id, $thr->title); ?> <?php if ($thr->type == 'close') { echo '<small class="label label-default"><i class="fa fa-lock"></i> Close Group</small>'; } ?> </h4>
function showHeaders(&$headers, $group, $article_first = 0, $article_last = 0, $ajax) { global $thread_showDate, $thread_showTable; global $thread_showAuthor, $thread_showSubject; global $text_thread, $thread_treestyle; $article_count = 0; if ($headers == false) { echo "<p><b>" . $text_thread["no_articles"] . "</b></p>"; } else { reset($headers); $c = current($headers); for ($i = 0; $i <= count($headers) - 1; $i++) { // create the array $liste if ($c->isAnswer == false) { // where are all the articles $liste[] = $c->id; // in that don't have } // references $c = next($headers); } reset($liste); if (count($liste) > 0) { if ($thread_treestyle == 2 || $thread_treestyle == 6 || $thread_treestyle == 7) { echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n"; echo "<tr>\n"; if ($thread_showDate) { echo "<td><b>" . $text_thread["date"] . "</b> </td>"; } if ($thread_showSubject) { echo "<td><b>" . $text_thread["subject"] . "</b></td>"; } if ($thread_showAuthor) { echo "<td> </td>"; echo "<td><b>" . $text_thread["author"] . "</b></td>\n"; } echo "</tr>\n"; showThread($headers, $liste, 1, "", $group, $article_first, $article_last, $article_count, $ajax); echo "</table>\n"; } else { if ($thread_treestyle == 1) { echo "<ul>\n"; } showThread($headers, $liste, 1, "", $group, $article_first, $article_last, $article_count, $ajax); if ($thread_treestyle == 1) { echo "</ul>\n"; } } } } }