Advertisement:

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

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 17,747
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
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.

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 albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 392
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: 17,747
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
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.

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: 69,927
    • StoryBB/StoryBB on GitHub
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?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 17,747
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
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.

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

  • Sophist Member
  • *****
  • Posts: 1,179
  • 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: 69,927
    • StoryBB/StoryBB on GitHub
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.