Quote:
Originally Posted by GHC Webmaster
I notice one thing however. Using this code all profile fields from the extra page show on the advanced search form, even if they are set to not be searchable. Anyone an idea why?
|
Solved this myself, put brackets around the "form = 0 OR form = 6" bit, which makes the complete code edit of memberlist.php for the search function:
FIND line 233 (vB 3.8.1)
Code:
// Process Custom Fields..
$userfields = '';
$profilefields = $db->query_read_slave("
SELECT profilefieldid, type, data, optional, memberlist, searchable
FROM " . TABLE_PREFIX . "profilefield
WHERE form = 0 "
REPLACE WITH
Code:
// Process Custom Fields.. EDITED
$userfields = '';
$profilefields = $db->query_read_slave("
SELECT profilefieldid, type, data, optional, memberlist, searchable
FROM " . TABLE_PREFIX . "profilefield
WHERE form = 0 OR form = 6"
FIND line 905 (vB 3.8.1)
Code:
// get extra profile fields
$profilefields = $db->query_read_slave("
SELECT *
FROM " . TABLE_PREFIX . "profilefield
WHERE searchable = 1
AND form = 0
REPLACE WITH
Code:
// get extra profile fields.. Edited
$profilefields = $db->query_read_slave("
SELECT *
FROM " . TABLE_PREFIX . "profilefield
WHERE searchable = 1
AND (form = 0 OR form = 6)