Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: EliteClicks - tammikuu 24, 2014, 11:39:57 AP

Otsikko: Zopim Live Support on SMF?
Kirjoitti: EliteClicks - tammikuu 24, 2014, 11:39:57 AP
Hello!
I have a Zopim Live Support code.
I don't know where to paste it.Actually in the HTML or PHP it should be pasted in the Head section in the pages that we want to appear that live support.
But in forum I don't know where to paste it.I probably think we should paste it in the index.template.php but in that file too where to paste? :P (i want it to be appeared in whole forum)
Thanks in Advance!
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: margarett - tammikuu 24, 2014, 01:58:47 IP
You should probably consider BoardIndex, so that it appears only in the main page, below menu and linktree (meaning, above your categories and boards)

Like add it before this:

echo '
<div id="boardindex_table">
<table class="table_list">';

/* Each category in categories is made up of:


You can also add it in index.template.php and use conditionals to show it only in selected locations. But this should serve your purpose.
Since I don't know the code, this is as far as I can go.
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: AllanD - tammikuu 24, 2014, 02:06:31 IP
I thought that Live chat was to be placed right above the </body> of the index page?
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: margarett - tammikuu 24, 2014, 02:09:17 IP
No idea. I don't even know what that is :P I'm just telling him where to put *some* code
But, AllanD, that would be at the very end of your page. Is it supposed to be like that?
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: AllanD - tammikuu 24, 2014, 02:12:56 IP
That's how I have it on some of my sites, not forums though. I never seen it added in the head always the body. It got me thinking and looking it up now.
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: Antes - tammikuu 24, 2014, 02:17:24 IP
Actually snip can help or a little demo... I suggest you to replace the slogan place with the code... (On Index.template.php)
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: EliteClicks - tammikuu 25, 2014, 10:40:05 AP
Actually this is the code:
<!--Start of Zopim Live Chat Script-->
<script type="text/javascript">
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');
$.src='//v2.zopim.com/?*******QEAbU***4Q4IJh7*****';z.t=+new Date;$.
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
</script>
<!--End of Zopim Live Chat Script-->

[I have replaced some of the code with *** to protect privacy :P]
I Hope this is to be posted on index.templtae.php but Don't know where to post.I have tried in some locations but it redirects to error page :P that mean I've pasted it in wrong place :D
Please tell me which place is correct to paste that code
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: DarkAngel612 - tammikuu 25, 2014, 03:17:30 IP
I have never used this software before...we use Tiny Portal and it comes with a shoutbox that works very well for "talking" to folks that are online, which someone is always in there...LOL

I went to the Zopim site and they have their code between the <head> and </head> section of their index.php but that is not a forum...more precisely, not SMF forum. They have plugins for blogs but I really do not see anything listed that it will work on forums

Have you tried contacting them to see if they have something to use on SMF forums
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: EliteClicks - tammikuu 26, 2014, 10:36:22 AP
Lainaus käyttäjältä: DarkAngel612 - tammikuu 25, 2014, 03:17:30 IP
I have never used this software before...we use Tiny Portal and it comes with a shoutbox that works very well for "talking" to folks that are online, which someone is always in there...LOL

I went to the Zopim site and they have their code between the <head> and </head> section of their index.php but that is not a forum...more precisely, not SMF forum. They have plugins for blogs but I really do not see anything listed that it will work on forums

Have you tried contacting them to see if they have something to use on SMF forums
I will contact them now and wait for answer.But anybody here know that where to paste the code?
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: margarett - tammikuu 26, 2014, 01:16:19 IP
Most likely you just need an echo' before all of that, a '; after all of that,
And you need to escape all quotes ' with \'
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: DarkAngel612 - tammikuu 26, 2014, 02:53:20 IP
I tried everything I could think of in the test forum I have for SMF and it does not show up at all...in any file for the main template or individual ones.

I tried it in the index.template.php and display template
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: EliteClicks - tammikuu 28, 2014, 11:08:21 AP
So does going to work on SMF or it is difficult to get it in work?
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: AllanD - tammikuu 28, 2014, 11:21:38 AP
Try putting the code right before the </body> on the index.template.php and see what happens
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: Antes - tammikuu 28, 2014, 11:25:21 AP
Lainaus käyttäjältä: EliteClicks - tammikuu 28, 2014, 11:08:21 AP
So does going to work on SMF or it is difficult to get it in work?

Actually its nothing really related to SMF, this is a simple JS, and I think its not an integration to SMF, so basicly spot a point you want to put this code and put it there, if you are having problems with editing your template feel free to ask :)
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: DarkAngel612 - tammikuu 28, 2014, 11:04:37 IP
Lainaus käyttäjältä: EliteClicks - tammikuu 28, 2014, 11:08:21 AP
So does going to work on SMF or it is difficult to get it in work?

I have tried this script into my test forum on several different pages and it does not load but does cough up error messages.

Now I did install it into my test zencart store and it worked beautifully there...LOL

So I contacted them and one of the tech support people told me:




    Hello! 
I am sorry if it still doesn't work for you. Would it be possible if you can share with me your website's URL? Also, I was thinking to give you the minimized widget code to see if it will work for you. I just need to verify your Zopim account email please. 



which as I told them I was just using their own code but I have not been able to grab the pack yet due to net problems...and cold weather playing mean with me.

So since you have an account with them please write to them with the above information to see if they can help you with the forum end, since I see the main page (blog type maybe) is finally showing it.

do let us know here what happens so others with the problem may also be helped.
Otsikko: Re: Zopim Live Support on SMF?
Kirjoitti: AllanD - tammikuu 31, 2014, 09:09:44 AP
Wondering if the worked and out and got it working.