Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: -Captain Ghost- on July 18, 2014, 03:24:48 AM

Title: Integrate Envolve Chat to your Forum
Post by: -Captain Ghost- on July 18, 2014, 03:24:48 AM
Hello Everyone  ;D
In this Topic I will Show You How to Add Envolve Chat to your Forum

Go to Envolve.com (http://envolve.com)
Complete the Sign up process and login.
Once logged in click on Add a new Site
(http://i.imgur.com/9w00U.png)

Then Put the Correct URL of your website.

(http://i57.tinypic.com/6fnl1s.png)
Choose other in option My site is Made with:

(http://i62.tinypic.com/qno8rd.png)
We get our code and select it.

(http://www.simplemachines.org/community/index.php?action=dlattach;topic=525320.0;attach=233805;image)

In my case it is this.

<!-- Envolve Chat -->
<script type="text/javascript">
var envoSn=[color=red][b]xxxxxx[/b][/color];
var envProtoType = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("<script src='"   envProtoType   "d.envolve.com/env.nocache.js' type='text/javascript'></script>"));
</script>

(please replace "xxxxxx" with the correct code from the picture above)
But we Cannot Use it now.We had to modify this code so Add "\" without "" before Apostrophe '.
Then it will Look Like this.

<!-- Envolve Chat -->
<script type="text/javascript">
var envoSn=xxxxxx;
var envProtoType = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("<script src=\'"   envProtoType   "d.envolve.com/env.nocache.js\' type=\'text/javascript\'></script>"));
</script>


Note: Backup your file Before editing.

Now go to the file Index.template.php of the theme you are using and look for.

global $context, $settings, $options, $scripturl, $txt, $modSettings;
The one with </body></html>';

And add as shown in image.

(http://www.simplemachines.org/community/index.php?action=dlattach;topic=525320.0;attach=233807;image)

echo '<!-- Envolve Chat -->
<script type="text/javascript">
var envoSn=xxxxxx;
var envProtoType = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("<script src=\'"   envProtoType   "d.envolve.com/env.nocache.js\' type=\'text/javascript\'></script>"));
</script>';


After successfully editing the index.template.php Envolve chat will start showing up on your website.

For free account simultaneous chat user limit is 25.

Credits:SmfSimple.com Losox

Thanks.