Simple Machines Community Forum

SMF Development => Feature Requests => Topic started by: Aleksi "Lex" Kilpinen on January 11, 2019, 01:04:47 PM

Title: Search options, exclude user(s)
Post by: Aleksi "Lex" Kilpinen on January 11, 2019, 01:04:47 PM
We already have an option to search for posts by a specific user, and that's nice, but could we expand on this idea and have an option to specifically exclude specific users from results? The user searching for example, or any specific other user?

Search posts Not From User (https://www.simplemachines.org/community/index.php?topic=564470.0)

Title: Re: Search options, exclude user(s)
Post by: albertlast on January 11, 2019, 03:02:42 PM
How should be the delimiter,
between the users nicks?

Could you filter on user xor exclude on some?
Or can you filter on both on the same time?
How would you desing the ui?

What should happen when you include and exclude the same nick?
Title: Re: Search options, exclude user(s)
Post by: Aleksi "Lex" Kilpinen on January 11, 2019, 03:09:31 PM
I would just add an option to not include a user, or users from the search results.
Of course, if you search by user - you can not exclude a user at the same time.

I would probably approach this by giving an option to either search by user(s) / or excluding user(s)
So one input field, with one dropdown selection to specify is this about including or excluding, and if the field is empty the dropdown is dismissed.

Delimiter - Good question, can't say really off the top of my head.
Title: Re: Search options, exclude user(s)
Post by: Arantor on January 11, 2019, 03:21:38 PM
You know there's this wonderful autocomplete thing that exists in SMF that handles all that delimiter stuff for you, right?
Title: Re: Search options, exclude user(s)
Post by: Aleksi "Lex" Kilpinen on January 11, 2019, 03:26:06 PM
Quote from: Arantor on January 11, 2019, 03:21:38 PM
You know there's this wonderful autocomplete thing that exists in SMF that handles all that delimiter stuff for you, right?
In this instance, I would not really know how such would work - no, I'm not that well versed with the code behind some stuff I master as a user :P
Title: Re: Search options, exclude user(s)
Post by: lurkalot on January 11, 2019, 03:55:27 PM
Quote from: Aleksi "Lex" Kilpinen on January 11, 2019, 03:26:06 PM
Quote from: Arantor on January 11, 2019, 03:21:38 PM
You know there's this wonderful autocomplete thing that exists in SMF that handles all that delimiter stuff for you, right?
In this instance, I would not really know how such would work - no, I'm not that well versed with the code behind some stuff I master as a user :P

Can't you just use an exclude - Example, 

Coppermine -Aleksi "Lex" Kilpinen
Coppermine Aleksi "Lex" Kilpinen
Coppermine
Title: Re: Search options, exclude user(s)
Post by: Arantor on January 11, 2019, 04:57:00 PM
No, because that doesn't work - are you looking to exclude 'Aleksi' or 'Aleksi "Lex" Kilpinen' as both could be valid?

But retrofitting the existing autocomplete onto the existing search member is not difficult (although limits scope for searching for posts by guests) - and adding a new thing is even more trivial because it just gives you a list of user ids to exclude automagically.