MyBB Community Forums

Full Version: Add my live chat?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I add my live chat widget from tawk.to to my forum

<!--Start of Tawk.to Script-->
<script type="text/javascript">
var $_Tawk_API={},$_Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/558693f2c3d16de02d6482ee/default';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->

I have tried to add it to the bottom of my footer but is not working
My html worked on my main page on my website
Im confused how do I do this then?
(2014-12-01, 11:51 PM)Destroy666 Wrote: [ -> ]Don't think there is an easy way to escape it in templates, you should rather put the JS code in a file and then load the file.

I don't know what's confusing/not understandable here..
how do I add a JS code into my fourm?

I have tried to add

</script>
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var $_Tawk_API={},$_Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/558693f2c3d16de02d6482ee/default';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>

But still not working..
That's not what I'm adivising you to do..

1. Open a new file in Notepad++ or any other text editor
2. Paste that code without <script></script> tags in it
3. Save it as whatever.js
4. Upload it to your server, for example to the jscripts folder
5. Add this code to footer instead (so load the file):
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/whatever.js"></script>
thank you very much for your help!
Your the best
What folder do i add the line of script?
add your javascript file over your jscripts folder.