Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Hidding a catagory

edited April 2012 in Questions

Hey, how do I fully hide all discussions from one catagory from the All Discussions page?

Answers

  • 422422 Developer MVP

    If you know the id, eg #bob

    In css you could do #bob {display:none;}

    422 Real Estate Australia , now open Check it out

  • are you hiding it because you only want certain viewers to see it.
    if so you can set custom permission for the category in the dashboard for example and only let moderators view it.

    Monetary Donations will be appreciated if you use my plugins. Thanks in Advance.
    As a waiter gets a tip for a good meal, tips for successful solutions appreciated as well. Peregrine

  • No, I would still like everyone to see it, but the discussions made in that catagory can only be seen by clicking on the catagory on the sidebar.

  • Did you try the css? Do you feel comfortable modifying helper_functions.php? Do you know how to create a new theme? Do you know nopresnik?

    Monetary Donations will be appreciated if you use my plugins. Thanks in Advance.
    As a waiter gets a tip for a good meal, tips for successful solutions appreciated as well. Peregrine

  • peregrineperegrine MVP
    edited April 2012

    if you feel comfortable creating theme or modifying

    vanilla/views/discussions/helper_functions.php

    you could add the line below replacing "my-category" in lowercase to the category you want to exclude - it should hide the discussions in that category on "All discussions page", but still allow you to view those discussions when you click on the category. make sure it is all lower case and separate words with hyphens.

    if ((!$Sender->Category) && ($Discussion->CategoryUrlCode == "my-category")) return;

    in vanilla 2.0.18.4 it a snippet will look like this below, with added line if the category to remove is called "banned appeals"

    <?php if (!defined('APPLICATION')) exit();
    
    function WriteDiscussion($Discussion, &$Sender, &$Session, $Alt2) {
     if ((!$Sender->Category) && ($Discussion->CategoryUrlCode == "banned-appeals")) return;
       static $Alt = FALSE;
       $CssClass = 'Item';
    

    Monetary Donations will be appreciated if you use my plugins. Thanks in Advance.
    As a waiter gets a tip for a good meal, tips for successful solutions appreciated as well. Peregrine

  • peregrineperegrine MVP
    edited April 2012

    Oh my there isnow a plugin for it! http://vanillaforums.org/addon/hidecategory-plugin

    no need to change the helper functions.

    @x00 it would be cool if you incorporated this in to your categories plugin, i'm sure you could make it more elegant.

    Monetary Donations will be appreciated if you use my plugins. Thanks in Advance.
    As a waiter gets a tip for a good meal, tips for successful solutions appreciated as well. Peregrine

    422
Sign In or Register to comment.