Title: City Custom Field v1.0

Author: John Briggs

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

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

=======================================================================
Go to Admin Panel -> Insert Raw SQL -> Paste Code Below & Click Submit:
=======================================================================

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

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

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

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

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

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

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

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

        $locationnew   = addslashes($locationnew);

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

        $city = addslashes($city);

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

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

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

) VALUES ('', '$username',

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

, city) VALUES ('', '$username',

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

)");

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

, '$city')");

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

            $memberinfo['msn'] = censor($memberinfo['msn']);

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

            $memberinfo['city'] = censor($memberinfo['city']);

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

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

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

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

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

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

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

        $memlocation    = addslashes($memlocation);

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

        $city = addslashes($city);

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

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

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

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

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

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

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

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

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

    $memlocation    = addslashes($newmemlocation);

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

    $city = addslashes($city);

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

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

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

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

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

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

            $city = '';

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

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

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

$lang['city'] = "City:";

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

=======================================================
Go To Admin Panel -> Templates -> 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[city]</td>
<td bgcolor="$altbg2"><input type="text" name="city" size="25" value="$member[city]" /></td>
</tr>

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

============================================
Go To Admin Panel -> Templates -> 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[city]</td>
<td bgcolor="$altbg2"><input type="text" name="city" size="25" value="" /></td>
</tr>

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

===============================================
Go To Admin Panel -> Templates -> 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[city]</td>
<td bgcolor="$altbg2"><input type="text" name="city" size="25" value="$member[city]" /></td>
</tr>

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

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

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

$location

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

$city

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

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

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

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