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.

How can I hide "Start a New Discussion" from the category pages?

PlatonPlaton New
edited November 2011 in Vanilla 2.0 - 2.8
I only want it to appear when a person is browsing inside a category, or reading a thread, is doing this feasible by mere mortals?

Answers

  • RainulfRainulf New
    edited November 2011
    @Platon, you can go to applications/vanilla/controllers.. Choose whatever controller you need (class.discussionscontroller.php in this case). Inside public function Index($Page = '0'), you will see the following:
    $this->AddModule('NewDiscussionModule');
    Comment it off.

    The controller directory basically contains controllers from which you can use to control little modules like the NewDiscussionModule (or button). Read this for more info.
  • LincLinc Detroit Admin
    edited November 2011
    In your theme hooks file, add this method:
    public function CategoriesController_Render_Before($Sender) {
    if (isset($Sender->Assets['Panel']['NewDiscussionModule']))
    unset($Sender->Assets['Panel']['NewDiscussionModule']);
    }
  • ToddTodd Chief Product Officer Vanilla Staff
    You may also just want to add some css to your custom.css:
    body.Discussions .NewDiscussion {
        display: none;
    }
Sign In or Register to comment.