Jump to the post that solved this thread.
Not Solved [How To?] Search custom profile field in memberlist
#1
Not Solved
I've been trying to customise the website search field at the base of my memberlist to instead search for a custom profile field.


[Image: 31f846aca26e430baaafd8fe920e4e83.png]

I have been following instructions on how to do so from this rather old thread:
http://community.mybb.com/thread-132199.html

but as a result and carefully following and repeating the instructions I receive an SQL error which I thought may have been the problem with using a tutorial made for an older version of the software.

My sql error: 

[Image: 5b407530716349fdae17347e68c1b623.png]

I'm wondering if there's an updated way for me to be able to search for a custom profile field in the memberlist quick search.

Thanks in advance for any help.
Reply
#2
Not Solved
you can try removing editable=1 AND from the data used for $query [step 2]
$query = $db->simple_select("profilefields", "*", "type!='checkbox' AND type!='multiselect' AND type!='textarea' AND hidden=0", array('order_by' => 'disporder'));
Reply
#3
Not Solved
Thank you, 

the solution was to amend the code to:
$query = $db->simple_select("profilefields", "*", "type!='checkbox' AND type!='multiselect' AND type!='textarea'", array('order_by' => 'disporder'));
Reply
#4
Not Solved
^ oh! yes, hidden field also doesn't exist in the table of profilefields in MyBB 1.8.x - somehow missed that!
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)