Title: U2U As Full Page v1.0

Author: Huhnteufel

Updated and Revised for 1.9.11 Final by: Daniel Gouveia 

Description: This modification will make the U2U Interface a standard page rather than a pop-up.

Compatability: XMB 1.9.11 Final

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

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

Author Note:
You downloaded this hack from XMBGarage.com.
Please visit http://www.xmbgarage.com for support.

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

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

    $u2ulink = "<a href=\"u2u.php\" onclick=\"Popup(this.href, 'Window', 700, 450); return false;\">{$lang['banu2u']}</a> - ";

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

    $u2ulink = "<a href=\"u2u.php\">{$lang['banu2u']}</a> - ";


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

        $newu2umsg = "<a href=\"u2u.php\" onclick=\"Popup(this.href, 'Window', 700, 450); return false;\">{$lang['newu2u1']} $newu2unum {$lang['newu2u2']}</a>";

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

        $newu2umsg = "<a href=\"u2u.php\">{$lang['newu2u1']} $newu2unum {$lang['newu2u2']}</a>";
		
==========
Find Code:
==========

            // 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 With:
===============

            // Popup Alert
            if (($self['u2ualert'] == 2 And X_SCRIPT != 'u2u.php') 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)) { top.location='u2u.php'; } } setTimeout('u2uAlert();', 10);</script>";
            }

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

=================
Edit File: memcp.php
=================

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

    $output .= "<td bgcolor=\"$altbg2\" width=\"20%\" class=\"ctrtablerow\"><a href=\"u2u.php\" onclick=\"Popup(this.href, 'Window', 700, 450); return false;\">" .$lang['textu2umessenger']. "</a></td>";

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

    $output .= "<td bgcolor=\"$altbg2\" width=\"20%\" class=\"ctrtablerow\"><a href=\"u2u.php\">" .$lang['textu2umessenger']. "</a></td>";

=======================================================================================================================================
=======
Step 3:
=======

=================
Edit File: member.php
=================

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

            $memberlinks = " <small>(<a href=\"u2u.php?action=send&amp;username=$encodeuser\" onclick=\"Popup(this.href, 'Window', 700, 450); return false;\">{$lang['textu2u']}</a>)&nbsp;&nbsp;(<a href=\"buddy.php?action=add&amp;buddys=$encodeuser\" onclick=\"Popup(this.href, 'Window', 450, 400); return false;\">{$lang['addtobuddies']}</a>)</small>";

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

            $memberlinks = " <small>(<a href=\"u2u.php?action=send&amp;username=$encodeuser\">{$lang['textu2u']}</a>)&nbsp;&nbsp;(<a href=\"buddy.php?action=add&amp;buddys=$encodeuser\" onclick=\"Popup(this.href, 'Window', 450, 400); return false;\">{$lang['addtobuddies']}</a>)</small>";

=======================================================================================================================================
=======
Step 4:
=======
================================
Edit File: u2u.php
================================

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

loadtemplates(
'u2u_header',
'u2u_footer',

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

loadtemplates(
'u2u_header',
'u2u_footer',
'header',
'footer',

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

$action = postedVar('action', '', FALSE, FALSE, FALSE, 'g');
$sendmode = ($action == 'send') ? "true" : "false";

eval('$u2uheader = "'.template('u2u_header').'";');
eval('$u2ufooter = "'.template('u2u_footer').'";');

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

$action = postedVar('action', '', FALSE, FALSE, FALSE, 'g');
$sendmode = ($action == 'send') ? "true" : "false";

nav($lang['banu2u']);
eval('$u2uheader1 = "'.template('header').'";');
eval('$u2uheader2 = "'.template('u2u_header').'";');
$u2uheader = $u2uheader1.''.$u2uheader2;
end_time();
eval('$u2ufooter = "'.template('footer').'";');

=======
Step 5:
=======

====================
Go To --> Administration Panel --> Translations --> Details
====================

=======
Find Code and Edit:
=======

textfaqans6

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

<a href="u2u.php" onclick="Popup(this.href, 'Window', 700, 450); return false;">

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

<a href="u2u.php">

=======
Find Code and Edit:
=======

textfaqans9

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

<a href="u2u.php" onclick="Popup(this.href, 'Window', 700, 450); return false;">

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

<a href="u2u.php">

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

=======================================================================================================================================
=======
Step 6:
=======

========================================
Go to admin panel -> templates -> header
========================================

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

<script language="JavaScript" type="text/javascript" src="./js/header.js"></script>

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

<script language="JavaScript" type="text/javascript" src="./js/u2uheader.js"></script>

=======================================================================================================================================
=======
Step 7:
=======

========================================
Go to admin panel -> templates -> index_welcome_member
========================================

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

<td width="33%"><a href="u2u.php" onclick="Popup(this.href,'Window', 700, 450); return false;"><strong>{$lang['textu2umessenger']}</strong></a></td>

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

<td width="33%"><a href="u2u.php"><strong>{$lang['textu2umessenger']}</strong></a></td>


=======================================================================================================================================
=======
Step 8:
=======

========================================
Go to admin panel -> templates -> memcp_home
========================================

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

<td colspan="4" class="header" valign="top"><a href="u2u.php" onclick="Popup(this.href,'Window', 700, 450); return false;">{$lang['viewcompleteinbox']}</a></td>

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

<td colspan="4" class="header" valign="top"><a href="u2u.php">{$lang['viewcompleteinbox']}</a></td>

=======================================================================================================================================
=======
Step 9:
=======

========================================
Go to admin panel -> templates -> u2u_header
========================================

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=$charset" />
<title>$bbname - $lang[textpowered]</title>
<script language="JavaScript" type="text/javascript" src="./js/u2uheader.js"></script>
$css
</head>
<body text="$text">

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

<table border="0" cellspacing="0" cellpadding="0" width="$tablewidth" align="center">
<tr>
<td bgcolor="$bordercolor">
<table border="0" cellspacing="{$THEME['borderwidth']}" cellpadding="4" width="100%">
<tr align="center" class="tablerow">
<td bgcolor="$altbg2" width="15%" class="ctrtablerow"><a href="memcp.php">$lang[textmyhome]</a></td>
<td bgcolor="$altbg2" width="15%" class="ctrtablerow"><a href="memcp.php?action=profile">$lang[texteditpro]</a></td>
<td bgcolor="$altbg2" width="15%" class="ctrtablerow"><a href="memcp.php?action=subscriptions">$lang[textsubscriptions]</a></td>
<td bgcolor="$altbg2" width="15%" class="ctrtablerow"><a href="memcp.php?action=favorites">$lang[textfavorites]</a></td>
<td bgcolor="$altbg1" width="20%" class="ctrtablerow">$lang[textu2umessenger]</td>
<td bgcolor="$altbg2" width="15%" class="ctrtablerow"><a href="#" onclick="Popup('buddy.php?', 'Window', 450, 400);">$lang[textbuddylist]</a></td>
<td bgcolor="$altbg2" width="10%" class="ctrtablerow"><a href="faq.php">$lang[helpbar]</a></td>
</tr>
</table>
</td>
</tr>
</table>
<br />

=======================================================================================================================================
=======
Step 10:
=======

========================================
Go to admin panel -> templates -> viewthread_post_u2u
========================================

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

<a href="u2u.php?action=send&amp;username=$encodename" onclick="Popup(this.href, 'Window', 700, 500); return false;" title="{$lang['altu2umember']}"><img src="$imgdir/u2u.gif" border="0" alt="{$lang['altu2umember']}" /></a>

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

<a href="u2u.php?action=send&amp;username=$encodename" title="{$lang['altu2umember']}"><img src="$imgdir/u2u.gif" border="0" alt="{$lang['altu2umember']}" /></a>

=======================================================================================================================================
=======
Step 11:
=======

========================================
Go to admin panel -> templates -> buddylist_buddy_offline
========================================

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

<td bgcolor="$altbg1"><a href="u2u.php?action=send&amp;username=$recodename" onclick="Popup(this.href, 'Window', 700, 450); return false;">$lang[textoffline]</a></td>

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

<td bgcolor="$altbg1"><a href="u2u.php?action=send&amp;username=$recodename" target="_blank">$lang[textoffline]</a></td>

=======================================================================================================================================
=======
Step 12:
=======

========================================
Go to admin panel -> templates -> buddylist_buddy_online
========================================

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

<td bgcolor="$altbg1"><a href="u2u.php?action=send&amp;username=$recodename" onclick="Popup(this.href, 'Window', 700, 450); return false;">$buddystatus</a></td>

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

<td bgcolor="$altbg1"><a href="u2u.php?action=send&amp;username=$recodename" target="_blank">$buddystatus</a></td>

=======================================================================================================================================
=======
Step 13:
=======

========================================
Go to admin panel -> templates -> memcp_home_u2u_row
========================================

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

<td bgcolor="$altbg2"><a href="u2u.php?action=view&amp;u2uid={$message['u2uid']}" onclick="Popup(this.href, 'Window', 700, 450); return false;">{$message['subject']}</a></td>

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

<td bgcolor="$altbg2"><a href="u2u.php?action=view&amp;u2uid={$message['u2uid']}">{$message['subject']}</a></td>

=======================================================================================================================================
===============
Done ;)
===============