reading custom_profil_fields_data for better use in memberlist

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
cpg-at-work
Registered User
Posts: 46
Joined: Sat Sep 22, 2012 6:38 pm
Location: Germany

reading custom_profil_fields_data for better use in memberlist

Post by cpg-at-work » Thu Nov 16, 2017 1:46 pm

Hallo,

is there a chance to sort the memberlist "Order by a special custom field?"

The memberlist.php reads the database and shows the custom_profil_fields_data in the memberlist_body.html (if elected)

I want to "extract" one of these custom profile fields :) - to work with it

In phpBB3.0 worked it fine and so I tried in memberlist.php
// Sorting
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'n' => $user->lang['SORT_LOCATION_MYSEARCH']);
$sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'n' => 'u.location_mysearch');
$sort_key_text['n'] = $user->lang['LOCATION_MYSEARCH'];
$sort_key_sql['n'] = 'pf_location_mysearch';
location_mysearch is the custom field I want to use



Best regards
cpg

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: No registered users and 5 guests

cron