=======================================================================================================================================
Modification Title: U2U Image

Modification Version: 1.0

Modification Author: John Briggs

Modification Description:
This modification will provide an image to display in upper right hand corner when you receive a new U2U message.
This modification will provide an image to display in Who's Online that will allow registered members to click and send a U2U.
This modification will provide an image to display in Who's Online Today on index that will allow registered members to click and send a U2U.
This modification will provide an image to display in Who's Online Today that will allow registered members to click and send a U2U.

Modification Copyright:  2009 John Briggs. All rights reserved.

Modification Compatibility: XMB 1.9.11

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

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

=======================================================================================================================================
=======
Step 1:
=======
=================
Edit File: header.php
=================
==========
Find Code:
==========

$newu2umsg = '';

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

// U2U Image Mod Begin
$newu2uimg = '';
// U2U Image Mod End

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

    // check for new u2u's
    if (X_MEMBER) {
        $query = $db->query("SELECT COUNT(*) FROM ".X_PREFIX."u2u WHERE owner='$xmbuser' AND folder='Inbox' AND readstatus='no'");
        $newu2unum = $db->result($query, 0);
        $db->free_result($query);
        if ($newu2unum > 0) {
            $newu2umsg = "<a href=\"u2u.php\" onclick=\"Popup(this.href, 'Window', 700, 450); return false;\">{$lang['newu2u1']} $newu2unum {$lang['newu2u2']}</a>";
            // Popup Alert
            if ($self['u2ualert'] == 2 Or ($self['u2ualert'] == 1 And X_SCRIPT == 'index.php')) {
                $newu2umsg .= '<script language="JavaScript" type="text/javascript">function u2uAlert() { ';
                if ($newu2unum == 1) {
                    $newu2umsg .= 'u2uAlertMsg = "'.$lang['newu2u1'].' '.$newu2unum.$lang['u2ualert5'].'"; ';
                } else {
                    $newu2umsg .= 'u2uAlertMsg = "'.$lang['newu2u1'].' '.$newu2unum.$lang['u2ualert6'].'"; ';
                }
                $newu2umsg .= "if (confirm(u2uAlertMsg)) { Popup('u2u.php', 'testWindow', 700, 450); } } setTimeout('u2uAlert();', 10);</script>";
            }
        }
    }

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

    // check for new u2u's
    if (X_MEMBER) {
        $query = $db->query("SELECT COUNT(*) FROM ".X_PREFIX."u2u WHERE owner='$xmbuser' AND folder='Inbox' AND readstatus='no'");
        $newu2unum = $db->result($query, 0);
        $db->free_result($query);
        if ($newu2unum > 0) {
            $newu2uimg = '<img src="'.$imgdir.'/u2u_in.gif" border="0" alt="'.$lang['newu2u1'].' '.$newu2unum.' '.$lang['newu2u2'].'" title="'.$lang['newu2u1'].' '.$newu2unum.' '.$lang['newu2u2'].'" /> ';
            $newu2umsg = "$newu2uimg<a href=\"u2u.php\" onclick=\"Popup(this.href, 'Window', 700, 450); return false;\">{$lang['newu2u1']} $newu2unum {$lang['newu2u2']}</a>";
            // Popup Alert
            if ($self['u2ualert'] == 2 Or ($self['u2ualert'] == 1 And X_SCRIPT == 'index.php')) {
                $newu2umsg .= '<script language="JavaScript" type="text/javascript">function u2uAlert() { ';
                if ($newu2unum == 1) {
                    $newu2umsg .= 'u2uAlertMsg = "'.$lang['newu2u1'].' '.$newu2unum.$lang['u2ualert5'].'"; ';
                } else {
                    $newu2umsg .= 'u2uAlertMsg = "'.$lang['newu2u1'].' '.$newu2unum.$lang['u2ualert6'].'"; ';
                }
                $newu2umsg .= "if (confirm(u2uAlertMsg)) { Popup('u2u.php', 'testWindow', 700, 450); } } setTimeout('u2uAlert();', 10);</script>";
            }
        }
    }

=======================================================================================================================================
=======
Step 2:
=======

Upload provided images "u2u_in.gif" to all theme folders.

=======================================================================================================================================