Title: Custom Status Quota v1.0

Author: John Briggs

Description:
This mod will add the option for members to edit there custom status after so many posts.
This mod will add the option for administrator to control how many posts a member must have in order to edit custom status.

Copyright:  2006 John Briggs. All rights reserved.

Compatability: XMB 1.9.5 Final

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

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

Author Note:
You downloaded this hack from XMBMods.com, the #1 source for XMB related downloads.
Please visit http://www.xmbmods.com/ for support.

=======================================================================================================================================
=======
Step 1:
=======

============================================
Go to administration panel -> Insert raw sql
============================================

Upload provided file named SQL.txt and click submit changes

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

================================
Edit file: lang/English.lang.php
================================

====================================
Add Code Directly At Bottom Of File:
====================================

$lang['customquota_no'] = " posts are required to change your ";
$lang['set_customquota'] = "Custom status quota:<br /><small>The total will be the amount of posts required to edit custom status.</small>";

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

=================
Edit file: cp.php
=================

==========
Find code:
==========

        $lang['spell_checker'] .= $spell_off_reason;

===============
Add code below:
===============

        $SETTINGS['customquota'] = (int) $SETTINGS['customquota'];

==========
Find code:
==========

        printsetting2($lang['u2uquota'], "u2uquotanew", $SETTINGS['u2uquota'], 3);

===============
Add code below:
===============

        printsetting2($lang['set_customquota'], 'customquotanew', $SETTINGS['customquota'], 3);

==========
Find code:
==========

        $max_avatar_size_h_new = (int) $max_avatar_size_h_new;

===============
Add code below:
===============

        $customquotanew = (int) $customquotanew;

=====================
Find query statement:
=====================

$db->query("UPDATE $table_settings SET

=====================================================
Find code in-line at very end of the above statement:
=====================================================

");

==================
Replace code with:
==================

, customquota='$customquotanew'");

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

====================
Edit file: memcp.php
====================

==========
Find code:
==========

loadtemplates(

==================
Replace code with:
==================

loadtemplates('memcp_profile_custom', 'memcp_profile_custom_none',

==========
Find code:
==========

        eval("\$profile = \"".template("memcp_profile")."\";");
        $profile = stripslashes($profile);
        echo $profile;
    }

===============
Add code above:
===============

        $customblock = 'memcp_profile_custom_none';
        if (X_STAFF || (X_MEMBER && $member['postnum'] > $SETTINGS['customquota'])) {
            $customblock = 'memcp_profile_custom';
        }
        eval('$customblock = "'.template($customblock).'";');

==========
Find code:
==========

        $sig            = isset($newsig) ? checkInput($newsig, '', $SETTINGS['sightml'], '', false) : '';

===============
Add code below:
===============

        $cstatus = '';
        if (X_STAFF || (X_MEMBER && $member['postnum'] > $SETTINGS['customquota'])) {
            $customstatus = isset($newcustomstatus) ? checkInput($newcustomstatus, '', '', 'javascript', false) : '';
            $customstatus = addslashes($customstatus);
            $cstatus = "customstatus = '$customstatus',";
        }

==========
Find code:
==========

$db->query("UPDATE $table_members SET $pwtxt

==================
Replace code with:
==================

$db->query("UPDATE $table_members SET $pwtxt $cstatus

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

=======================================
Go to administration panel -> templates
=======================================

==========================================
Create template name: memcp_profile_custom
==========================================

==========================
Add code and click submit:
==========================

<tr class="tablerow">
<td bgcolor="$altbg1" width="22%">$lang[textcusstatus]:</td>
<td bgcolor="$altbg2"><input type="text" name="newcustomstatus" size="25" value="$member[customstatus]" /></td>
</tr>

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

=======================================
Go to administration panel -> templates
=======================================

=================================
Edit template name: memcp_profile
=================================

==========
Find code:
==========

<tr>
<td bgcolor="$altbg1" width="22%" class="tablerow">$lang[textsite]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="text" name="newsite" size="25" value="$member[site]" /></td>
</tr>

===============
Add code above:
===============

$customblock

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

=======================================
Go to administration panel -> templates
=======================================

===============================================
Create template name: memcp_profile_custom_none
===============================================

==========================
Add code and click submit:
==========================

<tr class="tablerow">
<td bgcolor="$altbg1" width="22%">$lang[textcusstatus]:</td>
<td bgcolor="$altbg2"><strong><span class="smalltxt">$SETTINGS[customquota]$lang[customquota_no]$lang[textcusstatus].</span></strong></td>
</tr>

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