============================================================================================================================
Modification Title: Custom Field: Claimages

Version: 1.1

Author: John Briggs

Description: This modification will provide an additonal field to your profile and threads.

Copyright:  2010 John Briggs. All Rights Reserved.

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 Below & Click Submit:
===========================

ALTER TABLE `$table_members` ADD `claimages` varchar(100) NOT NULL default '';

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

loadtemplates(

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

loadtemplates(
'member_profile_claimages',

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

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

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

        // Custom Field: Claimages Mod Begin
        $claimages = isset($claimages) ? checkInput($claimages, '', '', 'javascript', false) : '';
        // Custom Field: Claimages Mod End

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

        $sig           = addslashes($sig);

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

        // Custom Field: Claimages Mod Begin
        $claimages = addslashes($claimages);
        // Custom Field: Claimages Mod End

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

) VALUES ('', '$username',

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

, claimages) VALUES ('', '$username',

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

)");

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

, '$claimages')");

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

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

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

            // Custom Field: Claimages Mod Begin
            // create claimages block
            $claimagesblock = '';
            if ($memberinfo['claimages'] != '') {
                $memberinfo['claimages'] = censor($memberinfo['claimages']);
                eval('$claimagesblock = "'.template('member_profile_claimages').'";');
            }
            // Custom Field: Claimages Mod End

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

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

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

        // Custom Field: Claimages Mod Begin
        $claimages = isset($claimages) ? checkInput($claimages, '', '', 'javascript', false) : '';
        // Custom Field: Claimages Mod End

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

        $sig            = addslashes($sig);

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

        // Custom Field: Claimages Mod Begin
        $claimages = addslashes($claimages);
        // Custom Field: Claimages Mod End

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

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

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

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

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

    // Custom Field: Claimages Mod Begin
    $claimages = isset($claimages) ? checkInput($claimages, '', '', 'javascript', false) : '';
    // Custom Field: Claimages Mod End

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

    $sig            = addslashes($sig);

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

    // Custom Field: Claimages Mod Begin
    $claimages = addslashes($claimages);
    // Custom Field: Claimages Mod End

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

, claimages='$claimages' 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:
===============

            // Custom Field: Claimages Mod Begin
            $claimages = '';
            if ($post['claimages'] != '') {
                $post['claimages'] = censor($post['claimages']);
                $claimages = '<br /><strong>'.$lang['claimages'].'</strong> '.$post['claimages'];
            }
            // Custom Field: Claimages Mod End

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

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

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

            // Custom Field: Claimages Mod Begin
            $claimages = '';
            // Custom Field: Claimages Mod End

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

// Custom Field: Claimages Mod Begin
$lang['claimages'] = "Claimages:";
// Custom Field: Claimages Mod End

============================================================================================================================
=======
Step 7:
=======
===============================
Go To Administration Panel --> Templates
===============================
===========================
Edit Template: admintool_editprofile
===========================
==========
Find Code:
==========

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

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

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

============================================================================================================================
=======
Step 8:
=======
===============================
Go To Administration Panel --> Templates
===============================
=====================
Edit Template: member_reg
=====================
==========
Find Code:
==========

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

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

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

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

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

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

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

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

$location

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

$claimages

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

<tr>
<td bgcolor="$altbg1" class="tablerow">$lang[textlocation]</td>
<td bgcolor="$altbg2" class="tablerow">$memberinfo[location]</td>
</tr>

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

$claimagesblock

===============================
Go To Administration Panel --> Templates
===============================
====================================
Create New Template: member_profile_claimages
====================================
==================
Add Code and Submit:
==================

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

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