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.

Have "Ask a Question" Be Only Option Available

Is it possible, with this plugin, to have users only be able to "Ask a Question," not post a new discussion? I've attached a screenshot with what it looks like immediately after installing the Q&A plugin.


1.jpg 60.9K


  • Options
    kirkpa31kirkpa31 ✭✭
    edited February 2013

    I think this can be done via a custom.css file within /themes/default/design/ or within my config.php file but I have no idea what to write.

  • Options

    Solved it. I'll try and experiment a little more before posting next time.

  • Options
    422422 Developer MVP

    when you solve things, its nice to share what you did. So others reading your thread get a sense of enlightenment :)

    There was an error rendering this rich post.

  • Options

    To remove this heading, I simply needed to remove the code within /plugins/QnA/views/qnapost.php

    Within this code was the option to post either a discussion or a question, I just removed it so the only option available is a question. Thanks @422 it was frustrating when I would see someone with "solved" as a comment and that's it. Hopefully this may help someone later.

  • Options

    From my own tribulations, if you remove all of the code from qnapost.php you remove the functionality of asking a question. You only remove the portions regarding the discussion options. I was impatient in my first attempt.

  • Options

    New Update

    My other proposed solutions seem to have screwed up other applications (i.e. the pop-up I mentioned and Karma) so the new solution I have implemented is just to hide the tabs, as @vrijvlinder would have probably simply suggested right off the bat.

    Add to /plugins/QnA/views/qnapost.php

    <yesscript> <style>.YesScript { display: none; } </style> </yesscript>

    This will hide the tabs giving the option to post either a discussion or question, with the default on Ask a Question. Will still show up in source code though, but it doesn't disable the functionality. Most importantly.

Sign In or Register to comment.