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.

custom js files 2.3.1

I have searched the forums and online but cannot find any information I am working on a basic theme for my site and I followed the template document with css and all how can I add my js files? I am using foundation 6

Comments

  • I need to add foundation.min.css and foundation.css but there is not documentation on this

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited September 2017

    All your css files go in the design folder of the theme, and all the js files go in the js folder of the theme.
    Then you must add the meta data to the head of the template, by using a plugin or hardcoding it , to call the files and load them.

  • ok so i would add them just like ant basic basic HTML page right? also I am trying to hide the side panel when on

    `body.SearchBox #panel

    {
    display: none;
    }`
    but no luck

  • K17K17 Français / French Paris, France ✭✭✭
    edited September 2017

    @vrijvlinder why not use theme hooks to add css files?
    (maybe you said it but I did not understand ^^ excuse my french)

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Please list the things you need to accomplish and then give a link. Without knowing the theme you are using or the level of knowledge you have, it's impossible to guess ...

    to hide the panel

    #Panel {
    display:none!important;
    )
    
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @K17 said:
    (maybe you said it but I did not understand ^^ excuse my french)

    Themehooks is a plugin file for the theme. If we knew the theme, but we don't . He wants to call these files, is all the info he gave and that happens in the head. He will need to call the files in the head and hard code them in the tpl or php theme, or use a plugin to add meta data..to the head section.

    Then he asked about how to hide the panel because his code did not work. I think he should use the CSSEDIT plugin to change the css but maybe he does not know there is such a plugin, or the HTMLEDT plugin where you can add html edit html and add meta data to the head of the document.. we don't know because the OP left that info out.

    You are welcome to guess ... good luck

  • @vrijvlinder Thanks for all your help my last question is on my post discussion page how can i get new discussion button to show

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    The New Discussion button is a module. You want the module to load on every page ? It normally targets the panel and if you remove the panel it won't show. So you need to add it.

    Please look at this plugin https://open.vanillaforums.com/addon/guestbigbutton-plugin . to get an idea as to how it works. You can modify the plugin to show on all pages.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    In the class.newdiscussionmodule.php file

    change panel to content

    then in your tpl or theme hooks file add the module with code

    look at the plugin Widgets to learn about adding modules.

  • @vrijvlinder I tried that plugin it remove the button throughout the whole site.. I want the button to show on all pages that i have not hidden the sidebar

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Please read what I wrote above.

    this is the link to new discussion, you can add it to the themehooks of your theme if you have the file.

    $this->Menu->AddLink('Menu',T('New Discussion'), 'post/discussion',array('Garden.SignIn.Allow');

    You can add this link to the master template and it will appear on every page. As long as the user is logged in. If you don't care and want it to show to anyone, then just add the html link.

    <a href="yoursite.com/forum/post/discussion" class="BigButton" title="Post New Discussion" >New Discussion</a>

  • R_JR_J Ex-Fanboy Munich Admin

    If you are interested in a foundation based theme, you should take a look Sanmyaku. It's based on Foundation 5, but you would be able to see how it is implemented.

    More basic is the Foundation theme by Kasper

Sign In or Register to comment.