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 to remove 'Topics' link in menu?
Fluffycakes
New
Sorry if this is a dumb question with an obvious answer. I want to remove the 'Topics' link from my forum's user menu, but I can't seem to figure out which template to edit.
Could any of you help me out? Thanks in advance!
0
Answers
Could you provide a link to your site?
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
By Topics you mean Categories or Discussions or Activity ? Tell me what you want to remove it's easy, example here removes the Discussions Link in the user profile sub menu:
you don't have to use !important if it works by itself, but to force something one can add it. Too bad it does not work with people...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@kasperisager My site is not live at the moment!
@vrijvlinder Sorry, I should have been more specific. I mean the link called 'discussions' in particular.
How 'bout a screenshot then of the link you want to remove?
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
I don't know you would want to do this, but this will remove discussions link from the menu.
if you are using a theme with default.master.tpl
e.g. remove the line {discussions_link}
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine I know that getting into the master tpl or php will remove modules and whatever, but I personally do not advice removing them from those file.(specially if the person is not familiar with this approach)
Using CSS you can remove anything. Then it is there if you want to put it again, it is there to do so. I removed many things from my forum, all using css. It is safer and you won't run the risk of ruining the whole thing by accident.
The code below will remove the Discussions link from the user profile only.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder
My theory is you learn by breaking things and fixing things and the more you know about vanilla, the more you can adapt it to your needs.
creating new themes and modifying default.master.tpl is a key to making custom changes. as evidenced in the announcement
http://vanillaforums.org/discussion/19915/deploying-a-new-forum-and-adding-a-theme-for-everyone#latest
if you want to comment out something in default.master.tpl use *
{* discussions_link *}
I still don't know why anyone would want to remove discussions link from menu anywhere. But after re-reading question "user's menu" - you are probably correct that he wants to remove it from profile and not everywhere - so I would go with your answer.
to each his own. understanding and learning what you are doing is the key to things and that applies to people who are unfamiliar with vanila.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I think they meant only in the profile tabs. Not the main Discussions link in the navbar.
You are right of course, experimenting is the way to learn. Your approach is a great one for removing something permanently. Across the board. What if they just want one single link to be removed only on one page. Or to add a drop down containing all the links.
Can't really say why anyone would do anything to change the way the forum is set up, would like a link to the page so I could see what they wanted to achieve.
I like to have options in case I don't like the removal. For me CSS is the best way to harmlessly affect the design.
Also one must keep in mind that removing something , may affect the entire layout and then one must fix the entire layout because of one link being removed.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder
I still don't know why anyone would want to remove discussions link from menu anywhere. But after re-reading question "user's menu" - you are probably correct that he wants to remove it from profile and not everywhere - so I would go with your answer.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I just notice a mistake I made in the code above, arg must be going blind , here is the correct one:
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
tried this for my prob but remove my entire profile page
That is because you did not put anything after that code. The way you have it will indeed remove the entire body of that page....
you need to add the specific part you want to remove on that page like #Panel or whatever..
body#dashboard_profile_index.Dashboard.Profile.Index.Profile (part you want to remove) {display:none!important;}
when you specify the body, the removal only works on that specific body/page if you want to globally hide something with css you just use the name of what you want to hide,
#Panel {display:none!important;} will remove the Panel on all pages.
body#dashboard_profile_index.Dashboard.Profile.Index.Profile #Panel{display:none!important;} will remove the panel only on that page.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder: I've noticed that you have a tendency of using very specific selectors. This is not the best approach - rely on cascading instead and shorten your selectors. In this case, the ID of the
body
element would be perfect:Furthermore, the
!important
attribute is almost never needed and including it will often lead to conflicts later on. Just a heads up :-)Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
@kasperisager Thank you for that , you always have a great answer and you teach me something, very much appreciated !!
Yes, I try not to use !important however if the code I am trying to override contains !important then I have no choice that I know of but to also use important. I know what you mean about it causing conflicts or bleeding of code though..I had to remove many importants when using a theme switcher on certain plugins with their own css.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌