View Single Post
  #1  
Old 04-02-2011, 02:30 AM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 33,259
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default Delete All Messages in Inbox Mod [by Kae]

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 Code:
$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 Code:

<a href='messages.php?act=deleteallinbox'><img src='templates/icons/delete.gif' border=0Delete All</a><br><br
Scroll down and find this at about line 212:

PHP Code:
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 Code:
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!
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote