Rasmus Vind
Well-known member
I am building my own content type which has a lot of attributes. Attributes which I am not comfortable with swarming my node view page with, but would rather put in the dedicated search page. Unfortunately I have come to find a severe limitation of the search page. The search adapters is a genius idea and it satisfies everything I need and will need, but I have a problem with the controller XenForo_ControllerPublic_Search. It requires that the user either enters a username or keywords. This is the same no matter the content type you search in as it's in the controller and not the search_handler_class for each of XenForo's own content types.
I can understand that the "Search Everything" has this requirement as it's totally up to you, but for my own content type, why must I be limited by this? I have 10-20 different ways to reduce the result set of my content type. The user may not wish to reduce by username or keywords.
I would suggest that this line:
Is only applied for "Search Everything" and a similar error is returned by each of XenForo's own search_handler_class types (if you really want it there).
This suggestion is easy to implement and gives addon developers more power while the existing functionality remains completely the same.
I can understand that the "Search Everything" has this requirement as it's totally up to you, but for my own content type, why must I be limited by this? I have 10-20 different ways to reduce the result set of my content type. The user may not wish to reduce by username or keywords.
I would suggest that this line:
PHP:
if ($input['keywords'] === '' && empty($constraints['user']))
{
// must have keyword or user constraint
return $this->responseError(new XenForo_Phrase('please_specify_search_query_or_name_of_member'));
}
This suggestion is easy to implement and gives addon developers more power while the existing functionality remains completely the same.
Upvote
0