News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Option to search 'Select Box' custom profile field options on Memberlist

Started by GL700Wing, August 21, 2019, 10:29:30 AM

Previous topic - Next topic

GL700Wing

Note: This tip works well in conjunction with the Custom Fields On Memberlist mod which enables the displaying of custom profile fields on the Memberlist.

This tip enables the searching of 'Select Box' custom profile field options on the Memberlist.

In ./Themes/default/Admin.template.php

Find:
document.getElementById("can_search_dt").style.display = curType == "text" || curType == "textarea" ? "" : "none";
document.getElementById("can_search_dd").style.display = curType == "text" || curType == "textarea" ? "" : "none";


Replace With:
document.getElementById("can_search_dt").style.display = curType == "text" || curType == "textarea" || curType == "select" ? "" : "none";
document.getElementById("can_search_dd").style.display = curType == "text" || curType == "textarea" || curType == "select" ? "" : "none";



In ./Sources/Memberlist.php

Find:
AND (field_type = {string:field_type_text} OR field_type = {string:field_type_textarea})',

Replace With:
AND (field_type = {string:field_type_text} OR field_type = {string:field_type_textarea} OR field_type = {string:field_type_select})',


Find:
'field_type_textarea' => 'textarea',

Add After:
'field_type_select' => 'select',



The attached images show 'Before' and 'After' screenshots for the 'Custom Profile Field' screen and the 'Search For Members' screen.
Life doesn't have to be perfect to be wonderful ...

Advertisement: