Title: Delete Read U2Us v1.0

Author: John Briggs

Description:
This modification will provide a new tool in the admin panel to delete all read U2Us from all incoming folders to free up disk space.

Copyright:  2009 John Briggs. All rights reserved.

Compatability: XMB 1.9.8 SP3

Install Note: Before adding this modification to your forum you should back up all files related to this modification.

License Note: This modification is released under the GPL License. A copy is provided with this software package.

Author Note:
You downloaded this modification from XMBGarage.com, the #1 source for XMB related downloads.
Please visit http://www.xmbgarage.com/ for support.

=======================================================================================================================================
=======
Step 1:
=======
=======================
Edit File: include/admin.inc.php
=======================
==========
Find Code:
==========

    &raquo;&nbsp;<a href="tools.php?action=whosonlinedump"><?php echo $lang['cpwodump']?></a><br />

===============
Add Code Below:
===============

    <!-- Delete Read U2Us Mod Begin -->
    &raquo;&nbsp;<a href="tools.php?action=readu2udump"><?php echo $lang['readu2udumptool']?></a><br />
    <!-- Delete Read U2Us Mod End -->

=======================================================================================================================================
=======
Step 2:
=======
===============
Edit File: tools.php
===============
==========
Find Code:
==========

    case 'whosonlinedump':

===============
Add Code Above:
===============

    // Delete Read U2Us Mod Begin
    case 'readu2udump':
        if (noSubmit('yessubmit')) {
            echo '<tr bgcolor="'.$THEME['altbg2'].'" class="ctrtablerow"><td>'.$lang['readu2udump_confirm'].'<br /><form action="tools.php?action=readu2udump" method="post"><input class="submit" type="submit" name="yessubmit" value="'.$lang['textyes'].'" /> - <input class="submit" type="submit" name="yessubmit" value="'.$lang['textno'].'" /></form></td></tr>';
        } else if ($lang['textyes'] == $yessubmit) {
            $db->query("DELETE FROM ".X_PREFIX."u2u WHERE type='incoming' AND readstatus='yes'");
            nav($lang['tools']);
            echo '<tr bgcolor="'.$THEME['altbg2'].'" class="ctrtablerow"><td>'.$lang['tool_completed'].' - '.$lang['tool_readu2udump'].'</td></tr></table></table>';
            end_time();
            eval('echo "'.template('footer').'";');
            exit;
        } else {
            redirect('cp.php', 0);
        }
        break;
    // Delete Read U2Us Mod End

=======================================================================================================================================
=======
Step 4:
=======
=======================
Edit File: lang/English.lang.php
=======================
============================
Add Code To End Of File Above ?>
============================

// Delete Read U2Us Tool Mod Begin
$lang['readu2udump_confirm'] = "Are you sure you want to delete all read U2Us from all incoming folders?";
$lang['tool_readu2udump'] = "All Read U2Us Cleared From All Incoming Folders.";
$lang['readu2udumptool'] = "Clear All Read U2Us";
// Delete Read U2Us Tool Mod End

=======================================================================================================================================
Enjoy!