Title: RPG Name v1.0

Author: John Briggs

Description:
This mod will provide an additonal field where members can show their RPG Name in threads/profiles with an on/off option.

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 Admin Panel -> Insert Raw SQL
===================================

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

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

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

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

loadtemplates(

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

loadtemplates('member_profile_rpgname',

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

        $useoldu2u     = (isset($useoldu2u) && $useoldu2u == 'yes') ? 'yes' : 'no';

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

        $rpgshow	= (isset($rpgshow) && $rpgshow == 'yes') ? 'yes' : 'no';

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

        $sig           = checkInput($_POST['sig']);

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

        $rpgname     = isset($rpgname) ? checkInput($rpgname, '', '', 'javascript', false) : '';

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

        $locationnew    = addslashes($locationnew);

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

        $rpgname        = addslashes($rpgname);

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

        $db->query("INSERT INTO $table_members (uid,

=====================================
Find Code In-Line In Above Statement:
=====================================

) VALUES ('', '$username',

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

, rpgname, rpgshow) VALUES ('', '$username',

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

)");

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

, '$rpgname', '$rpgshow')");

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

            if ($memberinfo['email'] != "" && $memberinfo['showemail'] == "yes") {
                $email = $memberinfo['email'];
            } else {
                $email = '';
            }

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

            $rpgnameblock = '';
            if ($memberinfo['rpgname'] != '' && $memberinfo['rpgshow'] == 'yes') {
                $memberinfo['rpgname'] = censor($memberinfo['rpgname']);
                eval('$rpgnameblock = "'.template('member_profile_rpgname').'";');
            }

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

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

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

        $invchecked = '';
        if ($member['invisible'] == 1) {
            $invchecked = "checked=\"checked\"";
        }

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

        $rpgshowchecked = '';
        if ($member['rpgshow'] == 'yes') {
            $rpgshowchecked = '"checked="checked"';
        }

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

        $useoldu2u      = ( isset($useoldu2u) && $useoldu2u == "yes" ) ? "yes" : "no";

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

        $rpgshow         = (isset($rpgshow) && $rpgshow == 'yes') ? 'yes' : 'no';

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

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

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

        $rpgname        = isset($rpgname) ? checkInput($rpgname, '', '', 'javascript', false) : '';

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

        $memlocation    = addslashes($memlocation);

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

        $rpgname        = addslashes($rpgname);

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

$db->query("UPDATE $table_members SET $pwtxt email='$email',

==================================================
Find Code In-Line At End Of Above Query Statement:
==================================================

 WHERE username='$xmbuser'");

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

, rpgname='$rpgname', rpgshow='$rpgshow' WHERE username='$xmbuser'");

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

==========================
Edit File: editprofile.php
==========================

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

    $eouchecked = '';
    if ( $member['emailonu2u'] == 'yes' )
    {
        $eouchecked = $cheHTML;
    }

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

    $rpgshowchecked = '';
    if ($member['rpgshow'] == 'yes') {
        $rpgshowchecked = '"checked="checked"';
    }

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

    $useoldu2u     = ( isset($useoldu2u) && $useoldu2u == 'yes' ) ? 'yes' : 'no';

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

    $rpgshow         = (isset($rpgshow) && $rpgshow == 'yes') ? 'yes' : 'no';

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

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

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

    $rpgname        = isset($rpgname) ? checkInput($rpgname, 'no', 'no', 'javascript', false) : '';

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

    $memlocation    = addslashes($memlocation);

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

    $rpgname          = addslashes($rpgname);

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

$db->query("UPDATE $table_members SET email='$email',

==================================================
Find Code In-Line At End Of Above Query Statement:
==================================================

 WHERE username='$user'");

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

, rpgname='$rpgname', rpgshow='$rpgshow' WHERE username='$user'");

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

=========================
Edit File: viewthread.php
=========================

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

            if ($post['location'] != '') {
                $post['location'] = censor($post['location']);
                $location = '<br />'.$lang['textlocation'].' '.$post['location'];
            } else {
                $location = '';
            }

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

            $rpgname = '';
            if ($post['rpgshow'] == 'yes') {
                if ($post['rpgname'] != '') {
                    $post['rpgname'] = censor($post['rpgname']);
                    $post['rpgname'] = stripslashes($post['rpgname']);
                    $rpgname = '<br /><strong>'.$lang['rpgname'].'</strong> '.$post['rpgname'];
                }
            }

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

            $location = '';
            $mood = '';

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

            $rpgname = '';

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

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

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

// RPG Name Mod Begin
$lang['rpgname'] = "RPG Name:";
$lang['rpgshow'] = "Show RPG name in threads &amp; profile?";
// RPG Name Mod End

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

=======================================================
Go To Admin Panel -> Templates -> admintool_editprofile
=======================================================

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

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

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

<input type="checkbox" name="emailonu2u" value="yes" $eouchecked /> $lang[textemailonu2u]<br />

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

<input type="checkbox" name="rpgshow" value="yes" $rpgshowchecked /> $lang[rpgshow]<br />

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

============================================
Go To Admin Panel -> Templates -> member_reg
============================================

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

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

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

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

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

<tr>
<td bgcolor="$altbg1" class="tablerow" width="22%">$lang[textemailonu2u]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="checkbox" name="emailonu2u" value="yes" /></td>
</tr>

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

<tr>
<td bgcolor="$altbg1" class="tablerow" width="22%">$lang[rpgshow]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="checkbox" name="rpgshow" value="yes" /></td>
</tr>

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

===============================================
Go To Admin Panel -> Templates -> 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:
===============

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

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

<tr>
<td bgcolor="$altbg1" class="tablerow" width="22%">$lang[textemailonu2u]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="checkbox" name="emailonu2u" value="yes" $eouchecked /></td>
</tr>

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

<tr>
<td bgcolor="$altbg1" class="tablerow" width="22%">$lang[rpgshow]</td>
<td bgcolor="$altbg2" class="tablerow"><input type="checkbox" name="rpgshow" value="yes" $rpgshowchecked /></td>
</tr>

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

=================================================
Go To Admin Panel -> Templates -> viewthread_post
=================================================

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

            <strong>$post[author]</strong>

===============
Add Code After:
===============

$rpgname

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

================================================
Go To Admin Panel -> Templates -> member_profile
================================================

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

<tr>
<td bgcolor="$altbg1" class="tablerow">$lang[textregistered]</td>
<td bgcolor="$altbg2" class="tablerow">$memberinfo[regdate] ($ppd $lang[textmesperday])</td>
</tr>

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

$rpgnameblock

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

=================================================================================
Go To Admin Panel -> Templates -> Create Template Name -> member_profile_rpgname
=================================================================================

================================
Add Code & Click Submit Changes:
================================

<tr>
<td bgcolor="$altbg1" class="tablerow" width="22%">$lang[rpgname]</td>
<td bgcolor="$altbg2" class="tablerow">$memberinfo[rpgname]</td>
</tr>

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