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.

ignore discussions

fh111fh111 Vanilla Padawan ✭✭
edited May 2012 in Vanilla 2.0 - 2.8

hi all

when i was checking out @peregrine's plugin 'IgnoreUser' it came to my mind how useful an 'Ignore Discussion' function/plugin would be

i think it is a good feature for big and very active communities with many ongoing discussions.

our community for example is creating new discussions daily and some of them stay up in the list forever and only a handful of people is interested in participating.might help to keep the discussions list clean, according to each users needs. maybe in combination with a button where the discussionTabs are, which shows ignored discussions so you can easily UnIgnore them

«1

Comments

  • peregrineperegrine MVP
    edited May 2012

    @fh111

    Here is what I am willing to do, based on what you are willing to do!

    you write the plugin, I'll help you along the way. We break the plugin into pieces and annotate what we are doing and you put the annotation in the wiki. We go through producing the setup screen, the javascript, css, php, definitions,php, and producing the plugin. If you agree to this, and you want to model it on the ignore user plugin, it might make some time but it seems like a good way to do it.

    First off if you want to play. Produce some screenshots and mark the place where you might want the buttons doing something.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited May 2012

    Step1 - Creating the Plugin Stub and testing enable and disable in the dashboard.

    1) Make a subdirectory called IgnoreDiscussion under the plugins directory. Be Careful with matching upper and lower case.

    2) create a file called default.php in the /plugins/IgnoreDiscussion/default.php

    put this code inside:

    <?php if (!defined('APPLICATION')) exit();
    
    // Define the plugin 
    // the following line must match the directory name you created i.e IgnoreDiscussion
    $PluginInfo['IgnoreDiscussion'] = array(
        'Name' => 'Ignore Discussion',
        'Description' => 'Annotation of beginning to code Ignore discussion.',
        'Version' => '0.1',
        'Author' => "Peregrine"
    );
    
    // the following class name must match the directory name you created i.e IgnoreDiscussion
    
    class IgnoreDiscussion implements Gdn_IPlugin {
    
          // creating the stub.
    
    
        // this apparently puts the enable and disable button in the dashboard
        public function Setup() {
    
        }
    
    }
    
    ?>
    

    go to the dashboard and see if it appears correctly with name and if you can enable and disable it. Look in /conf/config.php and you will notice this line magically appear when enabled. and disappear when disabled.

    $Configuration['EnabledPlugins']['IgnoreDiscussion'] = TRUE;

    your turn @fh111 with the images so we see where we go next.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • fh111fh111 Vanilla Padawan ✭✭

    cool. ok, thanks for offering this! here's the thing. my time is super limited right now, school started last week and i am already struggling with getting everything i have to do under one hat .. the community i am managing started as a hobby and feels more like an unpaid job right now.

    i might at some point get back to this, but right now i simply don't have the time and energy for it : (

  • I'm glad you declined :). I don't have the energy for it either.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited May 2012

    This is exactly the thing I've been working on lately -- in fact I just downloaded Ignore Users to see how much code I could steal.

    I built a similar function for my Vanilla 1.x community (with a terrifying array of hacks to the core, because I couldn't figure out how to do it as a plugin) and one thing (of many) I absolutely must reproduce before moving my users to 2.x is that functionality.

    @peregrine although I can't guarantee how much time I'm going to have depending on work stuff, if you're willing to work with me on this, I am happy to bash away at it.

    Here's the functionality my users currently have on 1.x

    1) If they want to hide a discussion (we use the work 'cloak') they hit a link in the Panel while in that discussion thread. (Wanted functionality -- have a button like the Bookmark button in the Discussions view)
    2) In the Discussions view, one of the views available (like My Bookmarked Threads, My Threads etc) is My Cloaked Threads. (Again, they have to go into one of those to toggle it back to unhidden, desired functionality is a button also on the list view, like the Bookmark button)

    That's pretty much it, really. I based the 'cloaking' code on the extant Bookmarking code in 1.x, as it's pretty much the same kind of functionality, but 'cloaked' threads are just hidden from the other list views. Man, it hurt my brain building it, though.

    So: I'm going to be working on that for a while, leveraging the Ignore Users functionality (if I can figure it out -- I am not a highly skilled PHP wrangler by any stretch) and see how I go. It'd be great if you wanted to answer any questions I have, though.

    If we can get something working, it would indeed be a much-used Addon, I think.

  • TimTim Operations Vanilla Staff

    Be aware that if you start messing with the queries, you'll almost definitely negatively affect performance. The best bet, scale-wise, is to maintain the list of hidden discussions (probably in UserMeta) and just pluck them out of each discussion list page once the page is fetched from the DB.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • Thanks for the advice, @Tim. My half-assed changes to Vanilla 1.x on my livesite have meant that it is a freaking beast on MySQL, sadly, and it was pretty heavy to start with. Even with a dedicated database VPS, it chokes sometimes.

    Just enough skill to break things, me.

  • I'd consider helping, I too, don't know how much time I have. But i will only help if you annotate the whole plugin in the wiki - thats my terms.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • You'll have to tell me what you mean by that.

  • TimTim Operations Vanilla Staff

    Offtopic: what is the traffic you are getting on this community of yours, @stavthewonderchicken ? In terms of pageviews monthly

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • peregrineperegrine MVP
    edited May 2012

    My original thought was to have fh111 pick a part of the process to work on for example button placement via the plugin, writing to the database, etc. Annotating each procedure - what we are doing and how to do it, etc. So, a step by step with some images and screenshots produced by fh111 as to where to put items that get added to the sceen. As to adding it to the wiki - You would login to the wiki that hbf created and add it as a tutorial or the "annotated ignore discussions plugin" on the wiki. If you want to step in for fh111 under these strictures, then post what you want to start on and what you got and we'll try to get it working. - I suggest the screenshots with some highlighting that shows what is to be added to the discussion page.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @Tim Last time I checked (a month or two ago?) it was about 120,000 pageviews a week, so call it 500,000 a month-ish...

    @peregrine ah, I see. Well, I appreciate the offer, but I'm nowhere near that organized, sadly. My loss, I understand. We'll see how I go with my usual seat-of-the-pants, hair-on-fire development style. ;-)

  • peregrineperegrine MVP
    edited May 2012

    @peregrine ah, I see. Well, I appreciate the offer, but I'm nowhere near that organized, sadly. My loss, I understand. We'll see how I go with my usual seat-of-the-pants, hair-on-fire development style. ;-)

    no problem with me. I wasn't doing it for you, I was trying to do something for all the other users on the board who don't know how to do a plugin and thought it might help step-by-step in real time with debugging issues as they arise. So, I'm out of this one for good, based on your decision.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • TimTim Operations Vanilla Staff

    Not too bad, that

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • peregrine said:
    no problem with me. I wasn't doing it for you, I was trying to do something for all the other users on the board who don't know how to do a plugin and thought it might help step-by-step in real time with debugging issues as they arise. So, I'm out of this one for good, based on your decision.

    Right, since you edited that comment since I last saw it (originally it was just 'no problem with me'), let me respond.

    Your assumption here is that I know what I'm doing. As I've said before, I pretty much don't. I futz around with code, and sometimes it just ends up working. So your proposal of trying to document the process, which is a good one in principle, is something I just literally could not do, because I don't have any process. If I had the slightest -- literally, seriously, the tiniest -- idea of how to proceed with something like this other than looking at what others have done and trying to copypasta mangle their code into something that works for me, then I'd be all for it.

    But, again: I am a dilettante coder who knows just enough to get in trouble. The fact that I somehow managed to build a thread hiding facility in Vanilla 1.x still amazes me, even though it was through a series of totally unmaintainable hacks to core files. If you asked me today how I did it, I wouldn't be able to tell you. The idea of trying to document that kind of anti-process I went through -- when it finally worked, I honestly wasn't sure exactly why -- is a little ludicrous.

    So, yeah. I'll work on something, see if I can't get it working, and share it if it's something that might work as a generalized tool. But I won't be able to answer many questions about it if I do, because writing code is a little like voodoo for me.

  • It's been a couple of years, but anything new regarding the "ignore discussion" addon? 🧐

  • Really? I only see the "Ignore" plugin which is used to ignore posts from certain users, not discussions...

  • pioc34pioc34 Pézenas ✭✭

    Sorry, maybe you can use unsuscribe plugin https://open.vanillaforums.com/addon/1418 for that.

  • asleulvasleulv
    edited March 2019

    I don't think so. This plugin is to stop Notify me when people comment on discussions I've participated in.

    What I'm looking for is simply a way to stop showing "new posts" for selected discussions.

Sign In or Register to comment.