HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to Put the New Discussion Button on the menu instead of Panel
vrijvlinder
MVP
If you want to get rid of the Big Button for new discussion and put it in the menu,
Put this link in your master.default.php from the views folder of your theme where the other links are, I put this under the Activity Link:
$this->Menu->AddLink('New Discussion',T('New Discussion'),'/post/discussion', array('Garden.SignIn.Allow'), array(), array('target' => '_blank'));
Then put this in the custom.css for your theme:
a.BigButton.NewDiscussion{display:none;}
Tagged:
3
Comments
Thanks a lot, if I want to remove some links from the menu, can i do that by removing their links from the same files?
Yes you could do that too. You could also hide them by using css, however someone could see them if they look at the source code. So totally removing them from the theme is the most drastic measure. You can always put them back in if you want to.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Oh I forgot to say , Some Plugins send a link to the menu, in which case you would have to remove that link from the plugin it belongs to.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
how can i show the add discussion button to guests without permitting them to post?
The add discussion button only appears to logged in users. You could add a second link without the garden.signin.allow . Or remove that part from the link and it will show up even to those not logged in. They still won't be able to post unless they are logged in.
$this->Menu->AddLink('New Discussion',T('New Discussion'),'/post/discussion', array(), array(), array());
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌