Title: U2U Quota Per Member v1.0

Author: John Briggs

Description:
This modification will provide a u2u quota on a per member basis with the ability to set it in admin panel members settings.

Copyright:  2009 John Briggs. All rights reserved.

Compatability: XMB 1.9.8 SP3

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. 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:
=======
==============================
Go To Admin Panel --> Insert Raw SQL
==============================

Upload provided file named "SQL.txt" & click "Submit Changes" button.

=======================================================================================================================================
=======
Step 2:
=======
=================
Edit File: member.php
=================
=================
Find Code (2 Times):
=================

) VALUES ('$username'

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

, u2uquota) VALUES ('$username'

==================================
Find Code At End Of Above Query Statement:
==================================

)");

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

, '$u2uquota')");

=======================================================================================================================================
=======
Step 3:
=======
==============
Edit File: cp.php
==============
==========
Find Code:
==========

            <td><strong><font color="<?php echo $cattext?>"><?php echo $lang['textposts']?></font></strong></td>

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

            <!-- U2U Quota Per Member Mod Begin -->
            <td><strong><font color="<?php echo $THEME['cattext']?>"><?php echo $lang['u2uuserquota']?></font></strong></td>
            <!-- U2U Quota Per Member Mod End -->

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

                <td><input type="text" size="3" name="postnum<?php echo $member['uid']?>" value="<?php echo $member['postnum']?>"></td>

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

                <!-- U2U Quota Per Member Mod Begin -->
                <td class="ctrtablerow"><input type="text" size="3" name="u2uuserquota<?php echo $member['uid']?>" value="<?php echo $member['u2uquota']?>" /></td>
                <!-- U2U Quota Per Member Mod End -->

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

            $postnum = "postnum".$mem['uid'];
            $postnum = isset($_POST[$postnum]) ? $_POST[$postnum] : '';

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

            // U2U Quota Per Member Mod Begin
            $u2uuserquota = "u2uuserquota".$mem['uid'];
            $u2uuserquota = isset($_POST[$u2uuserquota]) ? $_POST[$u2uuserquota] : '';
            // U2U Quota Per Member Mod End

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

colspan="7"

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

colspan="8"

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

, postnum='$postnum'

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

, postnum='$postnum', u2uquota='$u2uuserquota'

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

    $percentage = (0 == $SETTINGS['u2uquota']) ? 0 : (float)(($u2ucount / $SETTINGS['u2uquota']) * 100);

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

    // U2U Quota Per Member Mod Begin
    $u2uquota = ($self['u2uquota'] > 0) ? $self['u2uquota'] : $SETTINGS['u2uquota'];
    // U2U Quota Per Member Mod End

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

======================
Edit File: u2u.inc.php
======================

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

    if (!X_STAFF && $u2ucount >= $u2uquota && $u2uquota > 0) {

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

    // U2U Quota Per Member Mod Begin
    $u2uquota = ($self['u2uquota'] > 0) ? $self['u2uquota'] : $SETTINGS['u2uquota'];
    // U2U Quota Per Member Mod End

=======================================================================================================================================
=======
Step 5:
=======
=======================
Edit File: lang/English.lang.php
=======================
==========
Find Code:
==========

$lang['u2uquota'] = "U2U Quota:";

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

// U2U Quota Per Member Mod Begin
$lang['u2uquota'] = 'Default U2U Quota:';
$lang['u2uuserquota'] = 'U2U Quota';
// U2U Quota Per Member Mod End

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