============================================================================================================================
Modification Title: U2U Recipient Dropdown List v2.0

Modification Description:
This modification will add a dropdown list of all members in the U2U messenger replacing the Message To text box.
This modification will replace the Message To text box preventing the use of send to multi recipient functionality.
This modification will display all members from the Member List for you to choose from.
This modification will display all buddies in your Buddys List first if any exist.

Compatibility: XMB 1.9.8 SP3

Developed By: John Briggs

Copyright: Copyright:  2010 XMB Garage. All Rights Reserved.

Contributors: fulcrum4XENO, GuldantheWarlock, WormHole

InstallNote: Before installing this modification, you should back up all files and databases related to this modification.

License Note: This modification is released under the GPL v3 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/u2u.inc.php
======================
==========
Find Code:
==========

    global $forward, $reply, $sendsubmit, $savesubmit, $previewsubmit, $table_buddys, $table_members, $selHTML;

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

    global $forward, $reply, $sendsubmit, $savesubmit, $previewsubmit, $selHTML;

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

    eval('$leftpane = "'.template('u2u_send').'";');

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

    // U2U Recipient Dropdown List Mod Begin
    $u2uselect = array();
    $u2uselect[] = '<select name="msgto">';
    $u2uselect[] = '<option value="">'.$lang['u2udrop_selectrecipiant'].'</option>';
    $qb = $db->query("SELECT * FROM ".X_PREFIX."buddys WHERE username='$xmbuser'");
    if ($db->num_rows($qb) != 0) {
        $u2uselect[] = '<option value="">'.$lang['u2udrop_buddyshead'].'</option>';
        while($buddys = $db->fetch_array($qb)) {
            if ($buddys['buddyname'] != '') {
                $u2uselect[] = '<option value="'.$buddys['buddyname'].'">'.$buddys['buddyname'].'</option>';
            }
        }
        $db->free_result($qb);
    }

    $qm = $db->query("SELECT username FROM ".X_PREFIX."members ORDER BY username ASC");
    $u2uselect[] = '<option value="">'.$lang['u2udrop_memshead'].'</option>';
    while($members = $db->fetch_array($qm)) {
        if ($members['username'] == $username) {
            $u2uselect[] = '<option value="'.$members['username'].'" '.$selHTML.'>'.$members['username'].'</option>';
        } else {
            $u2uselect[] = '<option value="'.$members['username'].'">'.$members['username'].'</option>';
        }
    }
    $u2uselect[] = '</select>';
    $u2uselect = implode("\n", $u2uselect);
    $db->free_result($qm);
    // U2U Recipient Dropdown List Mod End

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

// U2U Recipient Dropdown List Begin
$lang['u2udrop_selectrecipiant'] = "Select A Recipient...";
$lang['u2udrop_buddyshead'] = "--- Buddy List ---";
$lang['u2udrop_memshead'] = "--- Member List ---";
// U2U Recipient Dropdown List End

============================================================================================================================
=======
Step 3:
=======
===============================
Go To Administration Panel --> Templates
===============================
===================
Edit Template: u2u_send
===================
==========
Find Code:
==========

<td bgcolor="$altbg2"><input type="text" name="msgto" id="msgto" size="20" value="$username" /></td>

================
Replace Code with:
================

<td bgcolor="$altbg2">$u2uselect</td>

============================================================================================================================
=======
Step 4:
=======

Upload all edited files.

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