============================================================================================================================
Modification Name: Extended Signature

Version: 2.0

Author: Area51mafia

Description:
This modification will create a link in posts for a Popup for an Extended Signature.
The link in posts will not appear for those that don't have a signature set.
This modification will also make the Extended Signature display in member profiles.
The Extended Signature block in the profile will be hidden if not filled out in the profile editor.
An image called extsig.gif is provided as an example or you can create your own image and upload it to all your theme folders.

Compatability: XMB 1.9.5 SP1

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 v3. 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 Administration Panel --> Insert Raw SQL
====================================
=========================
Paste Code and Submit Changes
=========================

ALTER TABLE `$table_members` ADD `extsig` TEXT NOT NULL ;

============================================================================================================================
=======
Step 2.
=======
=================
Edit File: member.php
=================
==========
Find Code:
==========

loadtemplates(

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

'member_profile_extsig',
'member_profile_extsig2',

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

    case 'coppa':
        nav($lang['textcoppa']);
        break;

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

    // Extended Signature Mod Begin
    case 'extsig':
        nav($lang['textextsig']);
        break;
    // Extended Signature Mod End
    
==========
Find Code:
==========

            if (X_SADMIN) {
                $admin_edit = "<br />$lang[adminoption] <a href=\"./editprofile.php?user=$encodeuser\">$lang[admin_edituseraccount]</a>";
            } else {
                $admin_edit = NULL;
            }
          
===============
Add Code Above:
===============

            // Extended Signature Mod Begin
            $extsigblock = '';
            if ($memberinfo['extsig'] != '') {
                $memberinfo['extsig'] = postify(censor($memberinfo['extsig']), 'no', 'no', 'yes', 'no', 'yes', 'yes', false, 'no', 'no');
                eval('$extsigblock = "'.template('member_profile_extsig').'";');
            }
            // Extended Signature Mod End

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

} else {
    error($lang['textnoaction']);

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

// Extended Signature Mod Begin
} elseif ($action == 'extsig') {
    eval('$bbcodescript = "'.template('functions_bbcode').'";');
        if (!$member) {
            error($lang['nomember']);
        } else {
            $memberinfo = $db->fetch_array($db->query("SELECT * FROM $table_members WHERE username='$member'"));

        if ($memberinfo['uid'] == '') {
            error($lang['nomember']);
            end_time();
        } else {
            $extsigblock = '';
            if (!empty($memberinfo['extsig'])) {
                $memberinfo['extsig'] = censor($memberinfo['extsig']);
                $memberinfo['extsig'] = postify($memberinfo['extsig'], 'no', 'no', 'yes', 'no', 'yes', 'yes', false, 'no', 'no');
                eval('$extsigblock = "'.template('member_profile_extsig').'";');
            }
            eval('echo stripslashes("'.template('member_profile_extsig2').'");');
        }
    }
    exit();
// Extended Signature Mod End

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

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

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

        // Extended Signature Mod Begin
        $extsig = isset($newextsig) ? checkInput($newextsig, '', $SETTINGS['sightml'], '', false) : '';
        // Extended Signature Mod End

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

        $sig            = addslashes($sig);

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

        // Extended Signature Mod Begin
        $extsig = addslashes($extsig);
        // Extended Signature Mod End

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

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

==================================
Find Code At End of Above Query Statement
==================================

 WHERE username='$xmbuser'");

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

, extsig='$extsig' WHERE username='$xmbuser'");

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

loadtemplates(

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

'viewthread_post_extsig',

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

            $yahoo = '';
            if ($post['yahoo'] != '') {
                eval('$yahoo = "'.template('viewthread_post_yahoo').'";');
            }

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

            // Extended Signature Mod Begin
            $extsig = '';
            if ($post['extsig'] != '') {
                eval('$extsig = "'.template('viewthread_post_extsig').'";');
            }
            // Extended Signature Mod End

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

            $mood = '';
            $onlinenow = '';

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

            // Extended Signature Mod Begin
            $extsig = '';
            // Extended Signature Mod End

============================================================================================================================
=======
Step 5.
=======
=======================
Edit File: lang/English.lang.php
=======================
========================
Add To End Of File Above  ?>
========================

// Extended Signature Mod Begin
$lang['textextsig'] = "Extended Signature:";
// Extended Signature Mod End

============================================================================================================================
=======
Step 6.
=======
===============================
Go To Administration Panel --> Templates
===============================
======================
Edit Template: memcp_profile
======================
==========
Find Code:
==========

<tr>
<td bgcolor="$altbg1" width="22%" class="tablerow">$lang[textsig]<br /><span class="smalltxt">$lang[texthtmlis] $htmlis<br />$lang[textbbcodeis] $bbcodeis</span></td>
<td bgcolor="$altbg2" class="tablerow"><textarea rows="5" cols="45" name="newsig">$member[sig]</textarea></td>
</tr>

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

<tr class="tablerow">
<td bgcolor="$altbg1" width="22%">$lang[textextsig]<br /><span class="smalltxt">$lang[texthtmlis] $htmlis<br />$lang[textbbcodeis] $bbcodeis</span></td>
<td bgcolor="$altbg2"><textarea rows="5" cols="45" name="newextsig">$member[extsig]</textarea></td>
</tr>

============================================================================================================================
=======
Step 7.
=======
===============================
Go To Administration Panel --> Templates
===============================
==================================
Create New Template: member_profile_extsig
==================================
========================
Add Code and Submit Changes:
========================

<br />
<table cellspacing="0" cellpadding="0" border="0" width="$tablewidth" align="center">
<tr>
<td bgcolor="$bordercolor">
<table border="0" cellspacing="$borderwidth" cellpadding="$tablespace" width="100%">
<tr>
<td colspan="2" class="category"><font color="$cattext"><strong>$lang[textsig]</strong></font></td>
</tr>
<tr class="tablerow">
<td bgcolor="$altbg2">$memberinfo[extsig]</td>
</tr>
</table>
</td>
</tr>
</table>

============================================================================================================================
=======
Step 8.
=======
===============================
Go To Administration Panel --> Templates
===============================
==================================
Create New Template: member_profile_extsig2
==================================
========================
Add Code and Submit Changes:
========================

$css
$extsigblock

============================================================================================================================
=======
Step 9.
=======
===============================
Go To Administration Panel --> Templates
===============================
==================================
Create New Template: viewthread_post_extsig
==================================
========================
Add Code and Submit Changes:
========================

<a href=\"#\" onclick=\"Popup('member.php?action=extsig&member=$encodename', 'Window', 475, 260);\"><img src="$imgdir/extsig.gif" alt="$encodename's $lang[textextsig]" border="0" /></a>

============================================================================================================================
========
Step 10.
========
===============================
Go To Administration Panel --> Templates
===============================
========================
Edit Template: viewthread_post
========================
==========
Find Code:
==========

$yahoo

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

$extsig

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

=======
Step 11
=======
===============================
Go To Administration Panel --> Templates
===============================
=======================
Edit Template: member_profile
=======================
==========
Find Code:
==========

<table cellspacing="0" cellpadding="0" border="0" width="$tablewidth" align="center">
<tr>
<td bgcolor="$bordercolor"><table border="0" cellspacing="$borderwidth" cellpadding="$tablespace" width="100%">
<tr>
<td colspan="2" class="category"><font color="$cattext"><strong>$lang[memcp_otheroptions]</strong></font></td>
</tr>

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

$extsigblock

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