Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Hiding down-voted posts [Yet Another Gamification Application 1.1]

With this plugin, I was hoping there was a way to automatically hide posts/comments that receive two many negative reactions, but I haven't found any documentation to that effect. Is there a way to configure this?

«1

Comments

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭
    edited April 2016

    @hgtonight - I haven't looked at the code, but is the vote count/negative reaction count stored in the discussion table? If so the Filterdiscussion plugin could do the trick right out of the box (easiest to do with the plugin saved filter).

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Following the previous comment :I see that the "YagaDiscussionReactionCount" saves the total reaction count in the discussion table, so the approach may work. (I'm away from my computer and trying to respond from my small smart phone...)

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Further follow up - Sorry, but the filterdiscussion plugin won't work at it's current incarnation - it only looks at the discussion table and the info is not there.

  • Options

    Thanks. I'll look into the code of those plugins. Despite my ignorance of PHP, I may be able to cobble together a solution using the code of those existing plugins as examples.

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    I think that the issue you face is a bit more complicated - I think that you first need to clarify uniquely what is a "down vote" and whether an "up vote" changes the "score" by which you filter out down voted discussions that reach your set threshold (and if you allow "up votes" then how would one vote on a hidden discussion? ).

    It is possible to add the total vote count to the discussion table, but consider that an unvoted discussions will start with a zero count. Would you like a positive vote behave like a protection against negative votes? For example, assume that you set the hiding threshold to five negative votes. Would a discussion that got two positive vote require seven negative votes to become hidden? You can clearly see how polarized discussion topics can be subject to voting wars...

    My $0.02 food for thought

  • Options

    I would use the reaction's reputation modifier. If the total reputation modifiers of the post's reactions drops below a certain threshold (say -5), it would become "hidden". Hidden posts will still be listed, but it will be elided saying "this comment is hidden because of too many negative reactions. Click here to show." Therefore, someone COULD later come by, click the button to show the post even though it was hidden, and decide to up vote it, but most people will just pass over it.

    This is very similar to the what slashdot does, and it works well.

    As for "voting-wars", you may see some of that in contentious issues. However, the negative reactions I'm setting up are really more about bad behavior (trolling, being disrespectful, off-topic, etc.), than simply disagreeing with the content.

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    I'd also look at the Hide Comments plugin.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    I have a plugin published here: https://github.com/hgtonight/Plugin-AutoBury

    I am working on releasing it right now.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    That's great, while we chat you code ;-)

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Hi @hgtonight , just looked at the plugin code. I saw that you achieve the hiding via css. I'm curious whether there is a way to actually skip the discussion altogether (I'm less interested in the skipping of comments). I fully understand that the effect will be to disable the ability to resurrect the discussion via positive voting.

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Wait a few minutes before you release it, I'm making a PR

  • Options
    R_JR_J Ex-Fanboy Munich Admin
    edited April 2016

    @rbrahmson said:
    I'm curious whether there is a way to actually skip the discussion altogether

    public function discussionModel_beforeGet_handler($sender, $args) {
      $args['Wheres'] = array_merge(
        $args['Wheres'],
        array(
          'Score >' => c('YourPlugin.Threshold', -5)
        )
      );
    }
    

    Edit: rubbish - that would drop those discussions more often than you want to... o.O

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    I guess you would have to check the request, too in order to make sure that you only omit those discussions in "Recent Discussion"

  • Options
    hgtonighthgtonight ∞ · New Moderator

    @rbrahmson said:
    Hi @hgtonight , just looked at the plugin code. I saw that you achieve the hiding via css. I'm curious whether there is a way to actually skip the discussion altogether (I'm less interested in the skipping of comments). I fully understand that the effect will be to disable the ability to resurrect the discussion via positive voting.

    I made this as more of a "caveat emptor" for users. I don't want users to not be able to see the content. I just want an easy warning the post is crap and not worth looking at.

    This solves a great deal of issues.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    By "more often" do you mean performance-wise?
    Any other way?
    If not I'm surprised Vanilla doesn't offer a way to accept/reject a record.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    @R_J said:
    Wait a few minutes before you release it, I'm making a PR

    Still making the PR?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Whenever the DiscussionModel is used to get all discussions, they would be dropped. When the discussion are fetched with a custom query, they would be included.

    I haven't checked it, but it might be the case that they wouldn't be included in the profile of a user.

    If you really want to purge them, you should do so. If you simply don't want to include them, you should still give an option to make them accessible and give users a hint what happened.

    A discussion that vanishes leaves open questions. I really prefer the CSS method.

    But I think it is an error to judge a discussion based on its score. There are a lot of topics with controversal views: politics would be one good example. It is not unrealistic that a downvoted discussions score changes completely after some other users have read such a discussion. Filtering them out based on a temporary state could stop a diversified discussion before it even started...

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    @R_J, I have to admit that I posed the question here while my interest was elsewhere - in the ability to filter out discussion records in another plugin and without using custom views.
    I do agree that total exclusion on the basis of votes is problematic.
    Any ideas for what I want (should I open another dimension on that)?

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    @hgtonight said:

    @R_J said:
    Wait a few minutes before you release it, I'm making a PR

    Still making the PR?

    Nope, already finished. It was just that locale file.

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    @rbrahmson said:
    @R_J, I have to admit that I posed the question here while my interest was elsewhere - in the ability to filter out discussion records in another plugin and without using custom views.
    I do agree that total exclusion on the basis of votes is problematic.
    Any ideas for what I want (should I open another dimension on that)?

    Yeah, open another dimension. That would be awesome!

    It is always a big help if you also state in which view (/controller/method) you would like to exclude something.

Sign In or Register to comment.