HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Some adjustments to more clearly see Ask a Question in Q & A 1.2.1 (new discussion button).

2»

Comments

  • R_JR_J Admin

    The easiest thing would be to create your own view for that module.
    Copy the theme you are using and make it a new theme. In your theme, copy /applications/vanilla/views/modules/newdiscussion.php to /themes/YOURTHEME/views/modules/newdiscussion.php

    You can now edit this copy. You should enclose 2 lines in there:

    $Question = $this->Buttons[1];
    unset($this->Buttons[1]);
    

    You need $Question['Text'] and Question['Url'] for your custom html and by unsetting the value, you prevent Vanilla from rendering a button with a dropdown arrow.

    You would need to write some lines of JavaScript that change the link of the button depending on the radio button to either $this->Button['Url'] or $Question['Url'] and you can consider to also change the text of the button to either $this->Button['^Text'] or $Question['Text']

  • @R_J Wow, thanks very much for that!

  • After adding The Big Button option part A code giving error from Unanswered question page. (something has gone wrong)

    help me @peregrine @R_J

  • It's not working on
    Version 2.2.1

  • I followed the steps in the first 3 comments from the top, and it all works fine, but I get this big error when I click Unanswered Questions in the menu.

    I

  • Also, in the comments section I get this warning.

Sign In or Register to comment.