• Welcome to Simple Machines Community Forum. Please login or sign up.
September 28, 2021, 09:35:37 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


[TIP/TRICK] Add Member Location to Memberlist

Started by jblazeofek, July 05, 2009, 03:42:38 PM

Previous topic - Next topic

JBlaze

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';
Jason Clemons
Former Team Member 2009 - 2012

Joshua Dickerson

Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?


Joshua Dickerson

Would you say that this Tip/Trick is "Now Available"?
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

JBlaze

Jason Clemons
Former Team Member 2009 - 2012

dkharp

Has this tip/trick been updated to current version?

Advertisement: