Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

How to remove "New Discussion" box when making a new thread?

This discussion is related to the Bootstrap addon.

See pic: http://i.imgur.com/cbnHtov.jpg

I'm using the Cyborg theme. I want to completely remove the "New Discussion" box (ONLY for when you're creating a new post). It's very easy to mistake that for the "post" box. Also, it serves no purpose because we are already creating a new thread, there is no point for it to be there.

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Welcome to the community!

    What plugins/modifications are you running?

    I ask because the Post controller doesn't include the NewDiscussionModule in default Vanilla and the master template included with Bootstrap doesn't force load the NewDiscussionModule either.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Hello. I think I found out why the "New Discussion" box appears there. In the first pic I'm using it embedded onto my website. My website's width is exactly that size in the pic, so the "New Discussion" box gets pushed down. Here is what it looks like on non embed: http://i.imgur.com/DYKFdlh.jpg

    I only want to use the forums embedded though. So what can I do to make the "New Discussion" box not be there? Or at the very least, have some spaces in between the "New Discussion" box and the "Post Discussion" box, cause right now they are too close together.

  • That is actually the mobile view.

    Like hgtonight said, the Button is really useless in this section and normally hidden.
    You can add this to your custom.css in the themes /design folder to hide it:

    body.Vanilla.Post .BoxNewDiscussion {
        display:none;
    }
    

    My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations

  • I tried the above code in the custom.css and the custom_cyborg.css but it didn't work.

  • hgtonighthgtonight ∞ · New Moderator

    If you are embedding the forums in that image you linked, you will have to add CSS to your base site.

    Can you even detect if you are on the post controller from an embedded context?

    I am guessing some JS will have to be added that adds a hidden CSS class to the button as needed.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight said:
    If you are embedding the forums in that image you linked, you will have to add CSS to your base site.

    Can you even detect if you are on the post controller from an embedded context?

    I am guessing some JS will have to be added that adds a hidden CSS class to the button as needed.

    Yes I am embedding. What do you mean by adding CSS to my base site? Add the code Bleistivt said to my theme's CSS? I just tried that but didn't work.

    Not sure what you mean by detecting the post controller from an embedded context.

    I don't know any coding I can't do it myself. Are you able to help me fix this issue?

  • peregrineperegrine MVP
    edited November 2014

    try this for Bootstrap - add it to the custom.css. it will remove it from both embedded and unembedded.

    it works!

       body#vanilla_post_discussion .BoxNewDiscussion {
        display:none;
        }
    

    if you want it removed only from embedded view, but present when not embedded.
    otherwise if you are embedding it in wordpress - add it to the css of your wordpress theme or whatever your forum is embedded into.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • achan070achan070 New
    edited November 2014

    I tried adding the above code in my bootstrap custom.css and my wordpress theme's custom.css, but neither worked. Do you have any idea why it's not working for me?

  • peregrineperegrine MVP
    edited November 2014

    do you have a link to your site?

    it could be that you are caching css or using some cdn like cloudflare that doesn't reflect css changes.

    you could make changes with css-editor plugin, if that is the case.

    without seeing your site, it is hard to tell. some people say they did this and that, but sometimes they didn't do this and that.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Ah, it must be because of the caching. Yes I am using Cloudflare.

    I installed the CSSEdit plugin and the code worked through that. Thanks.

    Is it also possible to hide the "New Discussion" box when viewing a post? If so, can you please tell me the code for that?

  • take a look at some css tutorials, I pointed you too in another thread.

    http://vanillaforums.org/discussion/comment/218767/#Comment_218767

    body#vanilla_discussion_index  .BoxNewDiscussion {
      display:none;
    }
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Thanks. and I will do that, can I get you to help me with one more thing though.

    See pic: http://i.imgur.com/bfezZJ4.jpg

    That is what it looks like embedded. There are 3 "new discussion" boxes which is unnecessary. Is it possible to hide the 2nd and 3rd "new discussion" boxes?

  • peregrineperegrine MVP
    edited November 2014

    @achan070 said: Thanks. and I will do that,

    great. learning css and using web developer will eanble you to solve your styling issues.

    two tips:

    If you want to make big modifications to Bootstrap theme - it requires the above knowledge (and possibly some js knowledge as well) , kasper has also provided info on using gulp, etc etc if you want to explore that as well.
    in the description: http://vanillaforums.org/addon/898/bootstrap

    best to use a theme that you understand, if you want to make changes.

    Also, my suggestion is to avoid embedding and mimic the forum theme to look like the rest of your site.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.