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.
Add a New Discussion button for guests
Hello
I want to show the "Add a New Discussion" button for guests and when they click on it, they get redirected to the sign up page. How possible is this, please?
Any help is appreciated
0
Best Answer
-
vrijvlinder MVP
Yes , where do you want to put it ? in the menu in the panel ?
if you have a php based theme add this in the area where the other links that look like this for the menu, in your default.master.php this will make it come out as part of the menu.
$this->Menu->AddLink('New Discussion', T('New Discussion'), 'post/discussion');
1
Answers
Yes , where do you want to put it ? in the menu in the panel ?
if you have a php based theme add this in the area where the other links that look like this for the menu, in your default.master.php this will make it come out as part of the menu.
$this->Menu->AddLink('New Discussion', T('New Discussion'), 'post/discussion');
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Woohoo it works!
I was struggling for days to get it work and you simply did it in one line @vrijvlinder.
How can I assign a button like in twitter to add discussion? Then remove the button from the side panel and leave it in the menu for members as well?
not sure I follow, but to remove the button from the panel you use css:
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I meant instead of New Discussion button appears in the menu, we show a photo like this
You want the New discussion button to be an image ?
$this->Menu->AddLink('NewDiscussion', Img('yourimageurl', array('title' => T('Start New Discussion'))), 'post/discussion');
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I still have one issue with the "Dashboard" "Discussions" "Activity" ... menu buttons
How can I remove the "Discussions" button? Its link is not shown in the default.master.php I think it is tied to the Dashboard button
How will you reach the dashboard? The link only shows to admin and mods with permissions.
You can hide anything using css. Please use firebug or some web inspector to find the classes for the elements you want to hide.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
To remove the links permanently from the menu place this in the same area you added the other link
$this->Menu->RemoveLink('Activity', T('Activity'), '/activity');
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thank you very much @vrijvlinder appreciated