we're trying to add an external chat snippet to our DNN site, but it isn't working at the moment. The snippet works outside DNN so I'm wondering if there is something about DNN that would stop this code from working?
I have tried placing the snippet in the the default.aspx file and admin/skins/myheader.ascx file. I've tried in both the head and body of the default page, but it doesn't work.
We have used a different chat provider in the past and their snippet of code worked ok in the same place as above.
<link type="text/css" rel="stylesheet" media="screen" href="https://xmpp- contact.unlimitedhorizon.co.uk/resource/webchat/client/converse.css" /> <script src="https://xmpp-contact.unlimitedhorizon.co.uk/resource/webchat/client/converse.js"> <script src="https://xmpp-contact.unlimitedhorizon.co.uk/resource/webchat/client/emojis.js"> <script> window.webchatConfig = { accessName: "SYPAWebChat", postfix: "sypaorguk-67127", chatComponent: "tcc", xmppDomain: "xmpp-contact.unlimitedhorizon.co.uk", language: "en", autoOpenTime: "0", BOSHServiceURL: "https://xmpp-contact.unli...hat/bosh/bosh", primaryColor: "#3AA569", titleText: "SYPAWebChat.sypaorguk-67127", assetsPath: "https://xmpp-contact.unli...ebchat/client/"} </script> </head>
If you need something on every page and don't want anyone to manage it in any way, you should do one of the following:
NEVER, ever, ever, ever change the core code files of DNN. You're opening yourself up to potential hacks in the future.
If you wish for people to be able to log in to manage this snippet, then use another option instead to inject the content. For example, my Content Injection module does this very well. :)
Download the Content Injection module
The screenshots are quite old at this point, but this old blog post of mine shows you how to use the content injection module. The editing paradigm in DNN is going to be way different, but the module itself still functions mostly the same. :)
One day, I'll remember to add updated instructions here. :)
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.