Alright. In the shoutbox php, just after the start script paste this:
PHP Code:
$act = $_GET['act'];
if($act == 'delete'){
// Delete the one shout.
$group = getgroup();
if($group == 1 || $group == 2){
$id = $_GET['id'];
runquery("DELETE FROM ".$prefix."shoutbox WHERE id='$id'");
$result = 'Shout was deleted.<br><br>';
}
}
Then replace the ENTIRE while loop(it's the only one on the page) with this:
PHP Code:
while ($i < $num) {
$id=@mysql_result($result,$i,"id");
$user=@mysql_result($result,$i,"user");
$date=@mysql_result($result,$i,"date");
$nolinecomment=@mysql_result($result,$i,"comment");
$nolinecomment = bbconvert($nolinecomment);
$comment=nl2br($nolinecomment);
$group = getgroup();
if($group == 1 || $group == 2){
$mod_shoutbox = '<br><a href="shoutbox.php?act=delete&id='.$id.'">Delete</a>';
}
$commentdiv = "<div class='comment' style='width:94%;padding:2%;background-color:aliceblue;margin-bottom:5px;'><div class='userdate' style='width:50%;height:25px;color:red;'>".$user." - ".$date."</div>".$comment.$mod_shoutbox"</div>";
$article_content = $article_content.$commentdiv;
$i++;
}
while to } (end bracket).
That should do it for ya. Let me know if there's any issues.