View Single Post
  #2  
Old 05-03-2011, 10:54 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 45,391
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

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 == || $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 == || $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.
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote