Soket plug not displaying on website

Soket makes it easy to add content - such as events - to your website. In order to do this, we provide code that can be cut and pasted into 3rd party websites that looks something like this:

 

<div id="skwidget-container" class="skwidget-container"></div>

        <script type="text/javascript">

            var COMMUNITY_ID = '123456789';

            var VIEW = 'L';

            var __d = document;

            var __h = __d.getElementsByTagName("head").item(0);

            var s = __d.createElement("script");

            s.setAttribute("src", 'http://widgets.soket.com/remote/fcevent.js');

            __h.appendChild(s);

        </script>

        <div><a href="http://www.soket.com">Soket Event Management - plugged in</a></div>

 

However, some Content Management Systems (CMS) - such as Wordpress - have a nasty habit of adding little bits of extra HTML, even when using the HTML editor. In one case, the culprit was <p> and </p> tags, resulting in a rendered page that had this code:

 

<div id="skwidget-container" class="skwidget-container"></div>

<p>        <script type="text/javascript">

            var COMMUNITY_ID = '123456789';

            var VIEW = 'L';

            var __d = document;

            var __h = __d.getElementsByTagName("head").item(0);

            var s = __d.createElement("script");

            s.setAttribute("src", 'http://widgets.soket.com/remote/fcevent.js');

            __h.appendChild(s); </p>

<p>        </script> </p>

        <div><a href="http://www.soket.com">Soket Event Management - plugged in</a></div>

 

To address this, simply remove the line breaks in the code you add to the editor, so the Soket code looks like this:

 

<div id="skwidget-container" class="skwidget-container"></div> <script type="text/javascript">  var COMMUNITY_ID = '123456789'; var VIEW = 'L'; var __d = document; var __h = __d.getElementsByTagName("head").item(0); var s = __d.createElement("script");            s.setAttribute("src", 'http://widgets.soket.com/remote/fcevent.js');            __h.appendChild(s); </script> <div><a href="http://www.soket.com">Soket Event Management - plugged in</a></div>

 

It's not as pretty, but will get rid of those pesky p's

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk