Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Is there a plugin or core functionality that allows a user to hide or block all the posts of another user?

+2 votes
asked May 10, 2017 in Q2A Core by delstone
edited May 11, 2017 by delstone
For instance, that user is posting poor quality content or they had an altercation and wish to avoid each other
Q2A version: 1.7.4

3 Answers

0 votes
answered May 10, 2017 by ProThoughts
If you want to hide question or answer of another user then you can use flag, set flag value to 1 in admin panel so as soon as someone dont want to see question or answer they can flag and it will be hidden. remember hidden question or answer will not be visible to other users, only admin can see from his panel.
commented May 11, 2017 by delstone
I guess I wasn't clear enough - if a user wishes not to see all the posts of another user without having to flag each post or report it or deal with it. He just wishes to ignore another users' posts entirely.
+2 votes
answered May 11, 2017 by sama55
edited May 11, 2017 by sama55

This may not be a fundamental solution. Changing a lot of database queries is difficult (It's not impossible). I may implement solution below.

  1. Make a layer plugin
  2. Add special class (e.g. qa-post-not-me) to the all posts (questions, answers, comments)  other than me in the layer functions
  3. Add toggle switch ("Show all" / "Show only my posts")
  4. When switch is changed, jQuery show/hide posts of other users. For example... 
    <script> // Just a sample. Not working.
    $(function() {
      $('#toggle').on('change', function(e) {
commented May 11, 2017 by delstone
Clever solution - pushing the processing onto the user side :)

I guess I'd also need to count how many posts are by the blocked user or users - how many should be shown per page etc in order to show the correct number per page.

There's also the delay when the browser renders the html on the screen, and the various js scripts are executed to do various existing processing and then the hiding where the user potentially sees the blocked posts momentarily...
commented May 11, 2017 by sama55
Yes. Since we need to consider various conditions, actual server side codes (Layer plugin) will be more complicated.
+2 votes
answered May 12, 2017 by Arjun Suresh

I would say to go for a plugin creation. We can have a plugin which will maintain the blocked user list for each user. Then the problem narrows down to just filtering the questions from the blocked list. I had made a similar plugin which filters questions from selected tags per user preference -- you may change this. This requires slight changes in the core -- the changed core file is also part of the below plugin. 

As a second part, we need to block out messaging too. I don't think any Q2A plugin does this now.