Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: JBlaze on July 05, 2009, 03:42:38 PM

Title: [TIP/TRICK] Add Member Location to Memberlist
Post by: JBlaze on July 05, 2009, 03:42:38 PM
This will add a location field to your Memberlist and is also sortable by location.




SMF v2.0 RC1-1
/Sources/Memberlist.php
Code (find) Select
'real_name' => array(
'label' => $txt['username']
),

Code (add after) Select
'location' => array(
'label' => $txt['location']
),


Code (find) Select
'real_name' => array(
'down' => 'mem.real_name DESC',
'up' => 'mem.real_name ASC'
),

Code (add after) Select
'location' => array(
'down' => 'mem.location DESC',
'up' => 'mem.location ASC'
),


/Themes/default/Memeberlist.template.php
Code (find) Select
<td class="windowbg" align="left">', $member['link'], '</td>
Code (add after) Select
<td class="windowbg2">', $member['location'], '</td>




SMF v1.1.9
/Sources/Memberlist.php
Code (find) Select
'realName' => array(
'label' => $txt[35]
),

Code (add after) Select
'location' => array(
'label' => $txt['location']
),


Code (find) Select
'realName' => array(
'down' => 'mem.realName ASC',
'up' => 'mem.realName DESC'
),

Code (add after) Select
'location' => array(
'down' => 'mem.location ASC',
'up' => 'mem.location DESC'
),


/Themes/default/Memberlist.template.php
Code (find) Select
<td class="windowbg" align="left">', $member['link'], '</td>
Code (add after) Select
<td class="windowbg" align="left">', $member['location'], '</td>

/Themes/default/languages/Modifications.{your_lang}.php
Code (add at end of file) Select
$txt['location'] = 'Location';
Title: Re: [TIP/TRICK] Add Member Location to Memberlist
Post by: Joshua Dickerson on September 25, 2009, 02:21:29 PM
Any relation to http://custom.simplemachines.org/mods/index.php?mod=931 ?
Title: Re: [TIP/TRICK] Add Member Location to Memberlist
Post by: JBlaze on September 25, 2009, 04:00:22 PM
Quote from: groundup on September 25, 2009, 02:21:29 PM
Any relation to http://custom.simplemachines.org/mods/index.php?mod=931 ?

Yea...
Title: Re: [TIP/TRICK] Add Member Location to Memberlist
Post by: Joshua Dickerson on September 25, 2009, 04:48:00 PM
Would you say that this Tip/Trick is "Now Available"?
Title: Re: [TIP/TRICK] Add Member Location to Memberlist
Post by: JBlaze on September 25, 2009, 05:28:49 PM
Sure
Title: Re: [TIP/TRICK] Add Member Location to Memberlist
Post by: dkharp on January 06, 2010, 07:14:55 PM
Has this tip/trick been updated to current version?