Delete All Messages in Inbox Mod [by Kae]

Forum
Last Post
Threads / Messages

Kaeliah

Premium Member
Premium Member
Joined
Sep 28, 2010
Messages
475
Points
0
Age
31
Location
Pennsylvania, United States
Mysidian Dollar
21,285
Delete All Messages in Inbox Mod
By Kaeliah


Modification TOS
**Note that there is no viewable credit required for this mod**

RoconzaArt requested this mod and it was an easy enough one to do so here we are! This mod adds a link at the bottom of your inbox that allows you to delete ALL the messages in your inbox, even unread one so be careful!

Installing: Open messages.php and find this at about line 78:

PHP:
$article_content = $article_content."<tr>
    <td><b><a href='messages.php?act=read&id=".$nid."'>".$messagetitle."</a></b></td>
    <td>".$fromuser."</td>
    <td><center>".$status."</center></td>
    <td><center>".$datesent."</center></td>
    <td><center><a href='messages.php?act=delete&id=".$nid."'><img src='templates/icons/delete.gif' border=0></a></center></td>
  </tr>";

$i++;
}

$article_content = $article_content."</table><br>

Add after(BUT BEFORE THE ";)

PHP:
<a href='messages.php?act=deleteallinbox'><img src='templates/icons/delete.gif' border=0> Delete All</a><br><br>

Scroll down and find this at about line 212:

PHP:
else if($act == "delete"){

// We are deleting a message...

$query = "DELETE FROM ".$prefix."messages WHERE touser='".$loggedinname."' and id='".$id."'";
runquery($query);

$article_title = $lang_delete_successful_t;
$article_content = $lang_delete_successful;

}

Add after:
PHP:
else if($act == "deleteallinbox"){

$article_title = "Delete All Messages In Inbox";
$article_content = "Are you sure you want to delete all the messages in your inbox?<br><br>

<a href='messages.php?act=deleteallconfirm'>Confirm</a> - <a href='messages.php'>Nevermind</a>";

}
else if($act == "deleteallconfirm"){
$query = "DELETE FROM ".$prefix."messages WHERE touser='".$loggedinname."'";
runquery($query);

$article_title = $lang_delete_successful_t;
$article_content = $lang_delete_successful;

}

And that's it! Enjoy!
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,119
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top