=======================================================================================================================================
Title: Delete Read U2Us Tool

Version: 1.0

Author: John Briggs

Description: This modification will provide a new tool in the admin panel to delete all read U2Us from the incoming folder only to alleviate space.

Copyright:  2011 John Briggs. All Rights Reserved.

Compatability: XMB 1.9.5 SP1

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 v3. 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.user.inc.php
==========================
==========
Find Code:
==========

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

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

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

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

    case 'u2udump':

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

    // Delete Read U2Us Tool Mod Begin
    case 'readu2udump':
        if (!isset($_POST['yessubmit'])) {
            echo '<tr bgcolor="'.$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>';
        } elseif ($lang['textyes'] == $_POST['yessubmit']) {
            $db->query("DELETE FROM $table_u2u WHERE type='incoming' AND readstatus='yes'");
            nav($lang['tools']);
            echo '<tr bgcolor="'.$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 Tool 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!