============================================================================================================================
Modification Title: Inactive Members Newsletter Option v1.0

Author: John Briggs

Last Updated: 04/13/10

Description:
This modification provides an option to U2U/E-mail all members with zero post count and inactive for 30 days via newsletter.
This modification is great for giving members ample warning before deleting there accounts.
This modification is intended to accompany the "Delete Inactive Members" modification.

Supported Version: XMB 1.9.5 SP1

Installation 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:
For security purposes, Please Check: http://www.xmbgarage.com for the latest version of this modification.
Downloading this modification from other sites could cause malicious code to enter into your XMB Forum software.
As such, XMBGarage.com will not offer support for modifications not offered at our web site.
============================================================================================================================
=======
Step 1:
=======
=======================
Edit File: /lang/English.lang.php
=======================
========================
Add To End Of File Above  ?>
========================

// Inactive Members Newsletter Option Mod Begin
$lang['inactivemems'] = 'All Inactive Members <small>(With 0 post count)</small>';
// Inactive Members Newsletter Option Mod End

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

        <input type="radio" value="mod" name="to" /> <?php echo $lang['textsendmod']?></td>

================
Replace Code With:
================

        <input type="radio" value="mod" name="to" /> <?php echo $lang['textsendmod']?><br />
        <!-- Inactive Members Newsletter Option Mod Begin -->
        <input type="radio" value="inactivemems" name="to" /> <?php echo $lang['inactivemems']?></td>
        <!-- Inactive Members Newsletter Option Mod End -->

==========
Find Code:
==========

        } elseif ($to == "mod") {
            $query = $db->query("SELECT username, email FROM $table_members WHERE status='Moderator' ORDER BY uid");

================
Replace Code With:
================

        } elseif ($to == "mod") {
            $query = $db->query("SELECT username, email FROM $table_members WHERE status='Moderator' ORDER BY uid");
        // Inactive Members Newsletter Option Mod Begin
        } elseif ($to == "inactivemems") {
            $thirtydays = (60*60*24*30);
            $thedate = time();
            $old = $thedate - $thirtydays;
            $query = $db->query("SELECT username, email FROM $table_members WHERE lastvisit < $old AND postnum = '0' AND status = 'Member' ORDER BY uid");
        // Inactive Members Newsletter Option Mod End

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