Advertisement:

Author Topic: [TIP/TRICK] Add Member Location to Memberlist  (Read 6515 times)

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,178
  • Gender: Male
    • jason.p.clemons on Facebook
    • jasonclemons on GitHub
    • jasonclemons1 on LinkedIn
    • @fragicide on Twitter
    • clemons.io
[TIP/TRICK] Add Member Location to Memberlist
« 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';
Jason Clemons
Former Team Member 2009 - 2012

Offline Joshua Dickerson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,781
  • Gender: Male
    • joshuaadickerson on GitHub
    • joshuaadickerson on LinkedIn
Re: [TIP/TRICK] Add Member Location to Memberlist
« Reply #1 on: September 25, 2009, 02:21:29 PM »
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?

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,178
  • Gender: Male
    • jason.p.clemons on Facebook
    • jasonclemons on GitHub
    • jasonclemons1 on LinkedIn
    • @fragicide on Twitter
    • clemons.io
Jason Clemons
Former Team Member 2009 - 2012

Offline Joshua Dickerson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,781
  • Gender: Male
    • joshuaadickerson on GitHub
    • joshuaadickerson on LinkedIn
Re: [TIP/TRICK] Add Member Location to Memberlist
« Reply #3 on: September 25, 2009, 04:48:00 PM »
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?

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,178
  • Gender: Male
    • jason.p.clemons on Facebook
    • jasonclemons on GitHub
    • jasonclemons1 on LinkedIn
    • @fragicide on Twitter
    • clemons.io
Re: [TIP/TRICK] Add Member Location to Memberlist
« Reply #4 on: September 25, 2009, 05:28:49 PM »
Sure
Jason Clemons
Former Team Member 2009 - 2012

dkharp

  • Guest
Re: [TIP/TRICK] Add Member Location to Memberlist
« Reply #5 on: January 06, 2010, 07:14:55 PM »
Has this tip/trick been updated to current version?