Advertisement:

Author Topic: Option to search 'Select Box' custom profile field options on Memberlist  (Read 431 times)

Offline GL700Wing

  • Full Member
  • ***
  • Posts: 454
  • Gender: Female
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:
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
AND (field_type = {string:field_type_text} OR field_type = {string:field_type_textarea})',
Replace With:
Code: [Select]
AND (field_type = {string:field_type_text} OR field_type = {string:field_type_textarea} OR field_type = {string:field_type_select})',

Find:
Code: [Select]
'field_type_textarea' => 'textarea',
Add After:
Code: [Select]
'field_type_select' => 'select',

The attached images show 'Before' and 'After' screenshots for the 'Custom Profile Field' screen and the 'Search For Members' screen.