[OzzModz] Thread Field Filter

[OzzModz] Thread Field Filter 2.0.0 Patch Level 1

No permission to download


Well-known member
Ozzy47 submitted a new resource:

[OzzModz] Thread Field Filter - Filter threads by custom fields values

XenForo 2.2.0+


Filter threads by custom fields values


  • Node-dependent permission to allow filtering thread list by custom field values
  • Option to disable field in forum filters
  • All standard field types is supported (like multiselect, checkboxes and stars)

View attachment 259863

View attachment 259864

View attachment 259865

Read more about this resource...
Having trouble with this one. I have a simple check box a custom thread field.


I have a few threads with it enabled:

I see it in the filter:


But it returns no results.

Permissions are good as well: [OzzModz] Thread Field Filter: Can use Yes

Any thoughts? Am I missing something?
Is this a good idea to search without an index?

I need an age-field and other integer_fields and think about
  • to add it to xf_thread with index
  • to use custom_fields and your add-on
  • to add a new table made perfect to search for values in for some of my custom_fields.

It will be used only for one subforum and there for maybe 5000 threads; I plan with 10.000 users in a year or two;
the 5000 from the start could be 15.000 threads then, maybe more.

So the question is:
Is there a sense to search in the custom_fields_values when you have 15.000 threads and no index; and this maybe thousand or ten thousands times a day?
This works also with rebuild? If not: how can I rebuild the fieldCache?
How can I recreate the fields itself? I am not sure if my fields are ok, after deleting some fields.

    public function postInstall(array &$stateChanges)
        \XF::runOnce('rebuildFieldCache', function()
            /** @var \XF\Repository\ThreadField $fieldRepo */
            $fieldRepo = $this->app->repository('XF:ThreadField');
Add-on works nice for

field age, interger.
=> filter age =35

Add-on does not work for checkbox field like this:

field color, checkboxes
Last edited:
I play around and find this for example:


itis not correct, it must be

for example; s=number of digits/chars
Maybe like this?


                if (is_array($filterValue) && in_array($definition['field_type'], ['multiselect', 'checkbox']))
                    $whereOr = [];
                    foreach ($filterValue as $value)
                        $valueLength = strlen($value);
                        $whereOr[] = ['FieldValue.field_value', 'LIKE', $threadFinder->escapeLike('s:'.$valueLength.':"' . $value . '"', '%?%')];

You don't want to repair it?
There are more strange things.

I am forced to fill fields in the filter.
If I force myself or users to fill in custom fields, this in one thing,
but to force me or them to use the filters in the same way makes no sense!
The custom field filter does not respect the forum restriction for the custom field, so a custom field that is only for one specific forum, shows across all forums.
I have uninstalled it, from my point of view this add-on is not finished.
Instead of this, i use an additional search table now.
Top Bottom