Advertisement:

Author Topic: Search options, exclude user(s)  (Read 7849 times)

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 19,045
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Search options, exclude user(s)
« 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

A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Online albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 623
Re: Search options, exclude user(s)
« Reply #1 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?

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 19,045
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Search options, exclude user(s)
« Reply #2 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.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Search options, exclude user(s)
« Reply #3 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?
No good deed goes unpunished
All helpful urges should be circumvented

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 19,045
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Search options, exclude user(s)
« Reply #4 on: January 11, 2019, 03:26:06 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
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,721
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Search options, exclude user(s)
« Reply #5 on: January 11, 2019, 03:55:27 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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Search options, exclude user(s)
« Reply #6 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.
No good deed goes unpunished
All helpful urges should be circumvented