Need to include a javascript in the header code of ispconfig

Discussion in 'Tips/Tricks/Mods' started by 0658, Apr 10, 2023.

  1. 0658

    0658 Member

    I need to implement a livechat javascript snippet in the header of ispconfig to display a livechat inside of the panel, what file can i find this? i have tried to look into the template files but cant locate where the header codes are, can anyone help and guide me to correct file?
     
  2. schwim

    schwim Member HowtoForge Supporter

    I'm pretty sure I found my ispconfig header content here:

    /usr/local/ispconfig/interface/web/themes/default/templates/main.tpl.htm
     
    Last edited: Apr 10, 2023
    0658 likes this.
  3. 0658

    0658 Member

    Yes i was guessing that as well but it dont work adding to header of that file
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    That's the file the page is generated from. So you either added the wrong js code or you missed reloading the page in the Browser. And be aware that this is the main page, not the sub-pages that get loaded into the iframes.

    But the easier way to include js is to put your js file in the folder /usr/local/ispconfig/interface/web/js/js.d/ so that it gets included automatically.
     
  5. 0658

    0658 Member

    The problem is it should be an external js file for livechat included, i cant have it work in any way
     
  6. 0658

    0658 Member

    i need to include this code

    <script
    src='//fw-cdn.com/xxxxx/xxxxxx.js'
    chat='true'>
    </script>
     

Share This Page