News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Include Livechat in smf

Started by exorbalrog, May 05, 2016, 07:07:13 PM

Previous topic - Next topic

exorbalrog

Hello im kind'a new to SMF forum, and i'm trying to setup my own. I want, if possible to put this code :
<!-- Start of LiveChat (livechatinc) code -->
<script type="text/javascript">
window.__lc = window.__lc || {};
window.__lc.license = 7469491;
(function() {
  var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
  lc.src = ('' == document.location.protocol ? 'https://' : 'http://') + 'cdnivecm/tracking.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
})();
</script>
<!-- End of LiveChat code -->


The thing is that i already searched a bit and found this http://www.simplemachines.org/community/index.php?topic=532700.msg3785737#msg3785737 but i tried to put it that way and i got error template page. I'm using a theme, can yu guys help me where can i put that code so i can help that livechat service in all pages?Thx

Shambles

Quote from: exorbalrog
The thing is that i already searched a bit and found this http://www.simplemachines.org/community/index.php?topic=532700.msg3785737#msg3785737
That should work for you, providing you observe the rules for inserting code.

If you need assistance editing that code block into index.template.php, attach your version of that file to your next post and someone will be able to help you with it.

exorbalrog

Thanks. I've in tempalte file this :

function template_html_below()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;


echo '
</html>';
}

Shambles

Ok. The post in the linked thread shows you what that should look like, after editing:

http://www.simplemachines.org/community/index.php?topic=532700.msg3786231#msg3786231

Irisado

Exorbalrog, please keep the discussion of the issue you're having in this topic, rather than reviving the old one.  Your post in the old topic has been removed.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

exorbalrog

#5
Quote from: Shambles on May 06, 2016, 03:21:24 AM
Quote from: exorbalrog
The thing is that i already searched a bit and found this http://www.simplemachines.org/community/index.php?topic=532700.msg3785737#msg3785737
That should work for you, providing you observe the rules for inserting code.

If you need assistance editing that code block into index.template.php, attach your version of that file to your next post and someone will be able to help you with it.

Well, the code i have in my index.template is :


<div id="footer">
        <a class="backtop" href="#"></a>
      <div id="copyright">
         <p>',theme_copyright(),' | ' , $txt['ds_copyright'], '</p>';

      // Show the load time?
      if ($context['show_load_time'])
      echo '
         <p class="loadtime">', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';

   echo '
      </div>
   </div>';
}

function template_html_below()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;


echo '
</html>';
}


Can you tell me where i should input that codetext from livechat? I already tried to change it but i always getting " Template Parse Error!

It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page."

Shambles

Quote from: Shambles on May 06, 2016, 06:52:48 AM
Ok. The post in the linked thread shows you what that should look like, after editing:


Quote from: Shambles on May 06, 2016, 03:21:24 AM
If you need assistance editing that code block into index.template.php, attach your version of that file to your next post and someone will be able to help you with it.

exorbalrog

#7
Quote from: Shambles on May 07, 2016, 03:16:54 PM
Quote from: Shambles on May 06, 2016, 06:52:48 AM
Ok. The post in the linked thread shows you what that should look like, after editing:


Quote from: Shambles on May 06, 2016, 03:21:24 AM
If you need assistance editing that code block into index.template.php, attach your version of that file to your next post and someone will be able to help you with it.

Here it goes =)

attachment removed --Illori

Shambles

#8
Here ya go

attachment removed --Illori

exorbalrog

Thanks but i think you putted the wrong code ma friend... What i need is to put this live chat working :

<!-- Start of LiveChat (www.livechatinc.com) code -->
<script type="text/javascript">
window.__lc = window.__lc || {};
window.__lc.license = 7469491;
(function() {
  var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
  lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.livechatinc.com/tracking.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
})();
</script>
<!-- End of LiveChat code -->

I tried to replace where you putted the other text, but i got :
Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.
You can also try refreshing this page.



Arantor

This is one of DzinerStudio's themes. Not sure off hand which one but it's definitely one of theirs. If you bought it from them you should be able to get support from their premium support board at dzinerstudio.com.

Shambles

#11
Quote
Thanks but i think you putted the wrong code ma friend...

Ahh rats.

attachment removed --Illori

exorbalrog

Quote from: Shambles on May 08, 2016, 03:36:41 PM
Quote
Thanks but i think you putted the wrong code ma friend...

Ahh rats.

Thanks, at least im not getting that error anymore... but the window chat doenst come up... :(
hxxp:aecmusica.com/membros/index.php [nonactive]

Arantor

And you've violated the licence of the theme you're using, congrats. Aquarelle is a paid theme from DzinerStudio and requires that their copyright be left in.

exorbalrog

Quote from: Arantor on May 08, 2016, 04:00:07 PM
And you've violated the licence of the theme you're using, congrats. Aquarelle is a paid theme from DzinerStudio and requires that their copyright be left in.

The site isn't "in the air" atm... As soon as it goes "online" you can be asure that i'll got trough all the legal processes, including put the designer studio code. Im testing things as you can "see"

Arantor

Doesn't matter. The licence for the theme clearly says it must be left in - and you had to edit it to remove it because it ships with 'Design by DzinerStudio' in the footer.

I also have to wonder if the reason for posting here rather than there was because only paid customers can post in the Aquarelle support board...

Advertisement: