opentable("Latest Comments");
echo "<div style='width:auto;height:225px;overflow:scroll'>";
$i = 0;
$result = dbquery(
"SELECT * FROM ".DB_PREFIX."comments
LEFT JOIN ".$db_prefix."users ON ".$db_prefix."comments.comment_name=".$db_prefix."users.user_id ORDER BY comment_datestamp DESC LIMIT 0,10"
);
if (dbrows($result)) {
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
while ($i <10) {$data = dbarray($result);
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>";
if ($data['user_avatar'] != "") {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' ><img height='35' width='35' src='".BASEDIR."images/avatars/".$data['user_avatar']."' alt='profile'></a>\n";
} else {
echo " ";
}
if ($data['user_name']) {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."' class='slink'>".$data['user_name']."</a>";
} else {
echo $data['comment_name'];
}
$comment_message = nl2br(parseubb($data['comment_message']));
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
if ($data['comment_smileys'] == "1") $comment_message = parsesmileys($comment_message);
echo "</span>
<span class='small'>".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br>
".$comment_message."<br>";
if ($data['comment_type'] == "N") {
echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>View News Comment</a><br>";
}
else if ($data['comment_type'] == "A") {
echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>View Article Comment</a><br>";
}
else if ($data['comment_type'] == "P") {
echo "<a href='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."'>View Photo Comment</a><br>";
}
else if ($data['comment_type'] == "C") {
echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>View Custom Page Comment</a><br>";
}
else {
echo "No link";
}
echo "</td>\n</tr>\n";
$i++;
}
echo "</table>\n";
} else {
echo "<center><br>There are no comments<br><br></center>\n";
}
?>
echo "</div>";
closetable();
Quote
muscapaul wrote:See if adding this panel gives a way to access comment management to delete the comment.
*code*
Quote
slaughter wrote:Does it look like this:
http://examplede/administration/comments.php?aid=db4e8kaba341eb9a&ctype=N&cid=53
Is there something like this "?aid=xxxxx"?
Quote
slaughter wrote:
So it works now?
Category Forum
Bugs and Errors - 6Labels
None yet
Statistics
0 participants
Notifications
You are not receiving notifications from this thread.
Related Questions