November 16th, 2009 → 1:15 am @ Mike Duncan // 78 Comments



The Google Talk Chatback Wordpress Widget will let visitors to your website chat with you live through Google Talk!

If you are online you will be able to talk one-on-one with website visitors just like any other live help program.

If you are offline the widget will turn into a link to your contact form like this:




You can Download the Google Talk Chatback Wordpress Widget from Wordpress.org:



Installation

1. Upload the `google-talk-chatback-wordpress-widget` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress
3. In the ‘Widgets’ menu, place the GoogleChatback widget in the sidebar you would like it to appear
4. Configure the Title, Chatback Hash and Contact URL attributes for the widget.

Frequently Asked Questions

How do I change the images shown for online and offline status?

The images are located in the plugin folder (live-support.png and contact-us.png). Simply replace these images with whatever you would like to be shown. You must give the new images the same names.

For users of Adobe Photoshop I have included the PSD source files if you want to edit the icons.

Where can I get a Google Talk Chatback hash key?

Login to your Google account (Gmail account) and go to this site:

http://www.google.com/talk/service/badge/New

The hash key is the part between “tk=” and “&amp”. Simply copy and paste it into the “Chatback Hash” section of the widget.

What do I put in the “Contact URL” section of the widget?

Put the URL to your contact form that you have on your website (ie: http://yourdomain.com/contact-us/).

If you have any questions or suggestions, please leave a comment!


Tags: chat, contact form, google, google chatback, google talk, google talk chatback, gtalk, instant message, live chat, live help, live support, sidebar, web chat, widget

78 Comments → “GOOGLE TALK CHATBACK WORDPRESS WIDGET”


  1. Nerudo

    9 months ago

    well i would like to say the plugin is supurb i have installed it on my site and i dont know what has gone wrong it shows alot of error codes —- Talk To Us
    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /usr/www/users/idezig/wordpress/wp-content/plugins/google-talk-chatback-wordpress-widget/gtalkStatus.class.php on line 89

    Warning: file_get_contents(http://www.google.com/talk/service/badge/Show?tk=—mylonghashkey—) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /usr/www/users/idezig/wordpress/wp-content/plugins/google-talk-chatback-wordpress-widget/gtalkStatus.class.php on line 89

    Fatal error: Uncaught exception ‘Exception’ with message ‘Misformed Google output for gtalkStatus.class.php’ in /usr/www/users/idezig/wordpress/wp-content/plugins/google-talk-chatback-wordpress-widget/gtalkStatus.class.php:95 Stack trace: #0 /usr/www/users/idezig/wordpress/wp-content/plugins/google-talk-chatback-wordpress-widget/gtalkStatus.class.php(108): gtalkStatus->_getStatus() #1 /usr/www/users/idezig/wordpress/wp-content/plugins/google-talk-chatback-wordpress-widget/gchatlive.php(51): gtalkStatus->isOnline() #2 /usr/www/users/idezig/wordpress/wp-includes/widgets.php(178): GChatWidget->widget(Array, Array) #3 [internal function]: WP_Widget->display_callback(Array, Array) #4 /usr/www/users/idezig/wordpress/wp-includes/widgets.php(856): call_user_func_array(Array, Array) #5 /usr/www/users/idezig/wordpress/wp-content/themes/idezign_it_by_neee_wider_and_whiter/functions.php(382): dynamic_sidebar(2) #6 /usr/www/users/idezig/wordpress/wp-content/themes/idezign_it_by_neee_wider_and_whiter/sidebar2.php(2): art_sidebar(2) #7 in /usr/www/users/idezig/wordpress/wp-content/plugins/google-talk-chatback-wordpress-widget/gtalkStatus.class.php on line 95

    Reply

    • Mike Duncan

      9 months ago

      Nerudo – Your problem is a limitation that your hosting provider has placed on your server. They have disabled file_get_contents (which I have seen some hosting providers do.) If you ask them, they might turn it on for you. I will look into using curl instead of file_get_contents to alleviate this problem before more people run into it (curl is usually enabled when file_get_contents is not).

      Reply

      • edtechvc

        9 months ago

        I had this same problem because I edited the badge and checked Show your status message… as soon as I unchecked show status and updated the badge, it worked

        Reply

    • Mike Duncan

      9 months ago

      I have updated the plugin to use curl now, so just update the plugin and you should be good to go!

      Reply

  2. Nick

    9 months ago

    I’m lost here – when I look at the Widget settings it says “Google Talk” and my only option is to enter a TITLE and some TEXT. I tried putting the hash key into the Text part but it just shows up directly on the blog sidebar. What am I doing wrong? Thanks in advance!

    Reply

  3. Nick

    9 months ago

    Wait a minute I had the wrong widget. I have the right widget now but for some reason the Chat box does not actually show up…. I just see the title bar and that’s it. I wonder if it is a problem with the theme?

    Reply

    • Mike Duncan

      9 months ago

      Nick – It sounds like you had the other Google Talk widget installed from the wordpress repository. I am not sure if it uses any of the same hooks as my plugin. You might try deleting the other one and reactivating mine. I would probably have to see it running on your site so I could look at the page source and see what is happening.

      Reply

    • Mike Duncan

      9 months ago

      I think most problems that people have been having will be cleared up by updating to the latest version of the plugin. I have updated it to use curl to get the status of the gtalk user instead of file_get_contents. I think that was causing much of the trouble because hosting providers like to turn that feature off.

      Reply

  4. Payam

    9 months ago

    I am trying to install your wordpress plugin and have copied and pasted the hashkey to where you have said in the right order. I am getting the follwing error message. Any idea?

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/sites/nicheadvice.co.uk/public_html/wp-content/plugins/google-talk-chatback-wordpress-widget/gtalkStatus.class.php on line 85

    Reply

    • Mike Duncan

      9 months ago

      Payam – What version of PHP is your server running?

      Reply

      • Clinton

        9 months ago

        Thanks Mike for your support. I am having the same error that ‘Payam’ had. How can I find out what version of PHP my host’s server is running?

        Thanks!

        Reply

        • Mike Duncan

          9 months ago

          Create a blank file named “info.php”. Add the following code to it: < ?php phpinfo(); ?>. Save the file and upload it to your webserver, then run it in your browser (e.g. yourdomain . com / info.php). The very first line should read “PHP Version X.Y.Z”

          Let me know what it says and we will figure it out

          Reply

  5. justin

    9 months ago

    hey,I put the hash key in as u said and the contact page url but all I see is the title on my site and and the other things i had on my site before are all gone..what do i do?

    Reply

    • Mike Duncan

      9 months ago

      I went to your site and it seems to partially come up until it hits the widget. Log out of google talk and see if it does the same thing when it tries to display the contact us link. Let me know, I am going to take a look at the code and try to isolate this.

      Reply

  6. Vladimir

    9 months ago

    Hello,

    is there any way to find out chatback when using google apps for business?

    not gmail but google apps with own domain.

    thnx, Vladimir

    Reply

    • Mike Duncan

      9 months ago

      Vladimir – Go to this site to generate the proper hash key, thanks for pointing this out, I will have to add this to the instructions. Replace DOMAIN with your apps domain in the url below:

      http://www.google.com/talk/service/a/DOMAIN/badge/New

      Update: right after I started writing this comment I tried going to the url for one of my apps domains and it gave me a redirect loop, so there may be something wrong with it for the moment. I will update here again as I find out more. I know that this is the correct way to do it though, it came straight from google!

      Reply

      • edtechvc

        9 months ago

        I was able to get the has key for my google education apps domain, but the has did not work. My gmail hash key does work, however, I need to use my education apps username

        Reply

        • edtechvc

          9 months ago

          Update: I followed your instruction above and replaced domain with my apps domain and it is now working. thanks.

          Reply

          • Mike Duncan

            9 months ago

            I’m glad it is working for you now, let me know if you have any other questions!


  7. Wredan

    8 months ago

    I keep getting: “chatback@talk.google.com is offline and can’t receive messages right now.”

    This error appears in my Google Chat window not in the browser popup.

    Reply

  8. Bradley

    8 months ago

    Awesome plugin! This was exactly what I was looking for!

    Reply

  9. Faustine

    7 months ago

    Hi,

    I’m trying out your plugin, and it just showed the sidebar widget title, and the chatback did not appear at all…

    Reply

    • Mike Duncan

      7 months ago

      I see the title and a broken image on your site that is linked to the contact form page on your site. I don’t actually see any images on your site except for ones that are hosted elsewhere so I couldn’t tell if it was something to do with the plugin or if all images are broken your your site. Do you have some kind of hotlink protection setup in your .htaccess file? Let me know when you are online again and I will see if it switches over to a gtalk link with a broken image. I tried loading the contact image directly but it just opens up the homepage. Let me know if this loads for you:

      http://geekzhaus.com/wp-content/plugins/google-talk-chatback-wordpress-widget/contact-us.png

      Reply

      • Faustine

        7 months ago

        Hi Mike,

        Thanks for your reply….

        Nah, the link doesn’t load properly too, it loads up the home page too for me…

        I’m not sure about the htaccess hotlink protection, as I never really touch that file.. quite noob in this.. Is there anyway to solve it?

        It seems even when I’m online in Gtalk, its the same….

        Thanks, Faustine

        Reply

        • Faustine

          7 months ago

          now, the contact us function worked.. but it doesn’t detect that I’m online when I logged into Gtalk via gmail…

          Reply

          • Mike Duncan

            7 months ago

            What did you change to fix the contact us part? Or did it suddenly start working?


          • Faustine

            7 months ago

            it just suddenly start to work, but it doesn’t open up any chat window, when Gtalk is connected via gmail… baffles me..


  10. Jeff

    7 months ago

    Hi everyone,

    At http://www.urbancondospaces.com
    I thought I had entered the hash appropriately, but it appears that I am offline even when that is not the case. I am using google apps and my own domain. Any ideas?

    Thanks

    Jeff

    Reply

  11. kit

    7 months ago

    cool plugin. how can i call it in the sidebar manually ? what’s the php code?

    Reply

  12. brent wrinkle

    7 months ago

    Hi Mike,

    I’ve just created a test area to test the widget before I set it up on a not for profit site but all i see is the text in the right side bar and but no functionality.

    I believe i have the Chatback Hash correct and the Contact URL correct and I’m running PHP Version 5.2.2.

    any ideas?

    Thank you for your time!

    Brent

    Reply

    • brent

      7 months ago

      Oh, ok I figured it out. I didn’t realize you needed to actually download the google talk software and log in before the status changed to live support available sorry about that.

      Thanks,

      brent

      Reply

      • Mike Duncan

        7 months ago

        No problem, I looked on your site and “contact us” is showing right so I guess it works both ways now? Let me know if you have any trouble with it, I doubt you will now that it worked the first time though. Most people’s problems trace back to their host not allowing CURL or something like that and it will never work for them at all.

        Reply

  13. rob

    7 months ago

    Hello Mike. I added the widget. I also added downloaded google talk. Although, all I am getting is contact us and it is not showing that I am online. Any assistance would be greatly appreciate.
    Regards,

    Reply

    • Mike Duncan

      7 months ago

      All I would really know to do is to double check the code you got from this site:
      http://www.google.com/talk/service/badge/New

      And to make sure that you got everything that is in between the tk= and the &amp. Also, make sure that your host supports CURL as this is how the widget query’s Google Talk for your status. I can tell you that the widget will do exactly what you are experiencing if you put the code in wrong somehow. If there is anything you would like me to check or look at I would be happy to, just let me know.

      Reply

  14. Mike Ishliri

    6 months ago

    Hi, thank you for the plugin, works great. Is there any way to make the widget appear on the webpage only when the status is “available”?

    Thanks

    Reply

    • Mike Duncan

      6 months ago

      This is definitely possible, it would take a little editing in the plugins php files. I will look into this as soon as I get a chance.

      Reply

  15. Mike Ishliri

    6 months ago

    That would be great, thanks! I shall wait for it. Thank you for your work!

    Reply

    • Mike Duncan

      6 months ago

      As a temp fix for you will have to do two things. In gchatlive.php remove line 59. Once you remove that it will not show anything when you are offline. You will also want to leave the “Title” field blank in the widget setup so it doesn’t show a title with nothing beneath it when you are offline.

      Reply

      • Mike Ishliri

        6 months ago

        It works! Thank you very much!

        Reply

  16. Erik

    6 months ago

    Like it! Any chance to get it working outside of the widget in a template?

    Reply

    • Mike Duncan

      6 months ago

      You are the second one to ask so I better get off my butt and make it work. I will figure it out and post back here.

      At this point I wonder if I should make a forum for this plugin, the comment thread is getting mighty long!

      Reply

      • Nico de Jong

        6 months ago

        Mike,

        Also get – Fatal error: Call to undefined function curl_init() in /storage/mijndomein/users/167425/public/sites/www.wingu.biz/wp-content/plugins/google-talk-chatback-wordpress-widget/gtalkStatus.class.php on line 89

        This is on the 24jan2010 version. Will look for PHP versions ask hosting party if there is a problem with curl .. but it might be good to know what it is the script tries to do on this line….

        Reply

        • Mike Duncan

          6 months ago

          That error would usually mean that your provider has cURL turned off on the server and needs to enable it. What the script is doing at that point is making the outbound connection to google from your server and grabbing the data the plugin will use to determine your current online status (which is achieved by using cURL). You can load the php file up in a text editor (I recommend notepad++) and look at the code on and around line 89 to see exactly what is happening.

          Reply

  17. Les

    6 months ago

    Installed the widget and filled out the three forms to set it up. When placing on the site… I get:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /nfs/c05/h01/mnt/18929/domains/phorcetech.com/html/wp-content/plugins/google-talk-chatback-wordpress-widget/gtalkStatus.class.php on line 85

    I am logged into GTalk on my machine…

    PHP Version 4.4.8
    http://www.phorcetech.com/info.php

    I appreciate any insight you could give me.

    Reply

    • Les

      6 months ago

      Issue as described above was resolved by upgrading to PHP 5. I am now running PHP Version 5.2.6. Ask your hosting provider for more information if you do not know how to do this.

      Reply

  18. Debbie

    6 months ago

    Hi Mike, great plugin thanks! Could you explain to me how I would include this widget in my header, rather than in the widget sidebar? I’ve installed and activated it, now all I need is to place it in my site via some header code (hopefully!).
    Thanks!

    Reply

    • Mike Duncan

      6 months ago

      To put it in the header you would need to edit the header php and include the class file and a few other lines of code, when I get time I will post the process of doing it, but it is definitely something that can be done.

      Reply

      • Debbie

        6 months ago

        Thanks Mike, that would be awesome – I look forward to your post!

        Reply

      • Debbie

        4 months ago

        Hey Mike, any updates on how to add this to the header.php? Also, I’d like to have it in a dashboard widget on the admin side – I’d create a custom widget and then I guess use similar code to the header code you’re hopefully going to send! Thanks so much!!

        Reply

  19. Debbie

    6 months ago

    Also, I’m having a strange problem in that I see ZERO widgets in my widgets.php page on the dashboard! It shows Available Widgets and Inactive Widgets headings, but NOTHING under them! It shows the sidebar(s) just fine (depending on what theme is used, different sidebars are avail). Do you have ANY idea what this could be caused by? I’ve changed themes but that didn’t help. Could it be a plugin conflict? Could it be a setting I’ve changed somewhere and forgotten about?!
    Thanks!

    Reply

    • Mike Duncan

      6 months ago

      I’ve never had that happen but a plugin conflict could cause it in any case. If you haven’t already try disabling all your plugins and then re-enable them one by one to find the culprit.

      Reply

  20. Mark

    6 months ago

    Hi Mike,

    Nice script. Everything works except I can’t either image to show up on the site? You can browse to the image directly via a browser and it appears. Just not in this site.

    http://www.humanservicecareers.com/wordpress/wp-content/plugins/google-talk-chatback-wordpress-widget/live-support.png

    Any thoughts?

    Many thanks,
    Mark

    Reply

    • Mike Duncan

      6 months ago

      The only guess I could even attempt at that is something with the .htaccess file. Are you using any kind of hotlink protection scripts or plugins?

      Reply

      • Mark

        6 months ago

        Hi Mike,

        Thank you for the reply. No I’m not running anything like that… Wierd because one can browse to the image directly, the path is right … I even uploaded a small image to seem if it was a theame thing ….

        Maybe it will correct itself… I’ve seen stranger things…

        Many thanks,
        Mark

        Reply

        • Mike Duncan

          6 months ago

          I’ve looked through your site some and haven’t seen an actual image (that wasn’t put in through CSS or Javascript) I still wonder if there is something within .htaccess doing this. If you want, post your .htaccess here and I will go over it, or send me a message through the contact form.

          Reply

          • Debbie

            6 months ago

            Hi guys, I experienced the invisible image thing too-if you use Firebug (add-on for Firefox) or similar browser plugin for web-dev, you’ll see that there is an extra “/” in the front of image path that doesn’t need to be there. If you remove it in Firebug it displays fine, so you’ll just have to find the correct place in the code. At the moment your img src=”/wp-content/plugins/google-talk-chatback-wordpress-widget/contact-us.png” but it must be img src=”wp-content/plugins/google-talk-chatback-wordpress-widget/live-support.png”.


      • Mark

        6 months ago

        Hi Mike,

        Here’s the content ofs the .htaccess file

        # BEGIN WordPress

        # END WordPress

        I looked at the code as well, I didn’t see an extra “/”, but I will like again.

        Looking forward to using your script.

        Many thanks,

        Mark

        Reply

  21. Mike Duncan

    6 months ago

    Is there something that I need to change in the plugin code? I was viewing his site with Chrome (no firebug or similar) and couldn’t see the images. If there is a problem I want to fix it!

    Reply

    • Debbie

      6 months ago

      Hi Mike, as the problem is purely to do with the path of the image (and actually only the extra “/” in the front), maybe it’s “safer” to modify the plugin to include the full image URL rather than the relative path? I haen’t looked at your code so not sure how the image path is handled at the moment, but maybe test it with the full URL and see?

      Reply

  22. sebastian

    6 months ago

    Hi, I was trying to put the plug in on my site and I kept getting the same error message:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /nfs/c01/h06/mnt/44662/domains/thebrocave.com/html/wp-content/plugins/google-talk-chatback-wordpress-widget/gtalkStatus.class.php on line 85

    I am not sure if I put in the wron hash key, I used what was between the tk= and the amp, so I did not include that either.

    Any ideas on how I can make it work?

    Thanks.

    Reply

    • Mike Duncan

      6 months ago

      You have an outdated version of PHP running on your server

      Reply

  23. Layla

    5 months ago

    Hi Mike,

    We are currently testing out the widget and so far, it looks good. The issue we have though is that when we have an incoming chat request from a guest, the “name” it gives the guest appears to be the hash key, which makes actual communicating a little difficult to do. Do you know of a fix for this?

    Reply

    • Mike Duncan

      5 months ago

      That is by design with the google chatback system, there isn’t anything that can be done about it unless they (google) expand the system to ask the user for a name or identifying information when they are initiating the request. For now it is all anonymous.

      Reply

  24. Layla

    5 months ago

    Thank you. Anonymous is fine, just wish they’d change it to show “guest” or something of the sort. I guess we’ll have to look for another option. Thanks for the quick response!

    Reply

    • Mike Duncan

      5 months ago

      Give Livezilla a try, it’s what I use on this site for live support and it will have all the features you are looking for plus some that you probably have not even thought of let. Plus it is completely free. http://www.livezilla.net/home/en/

      Reply

  25. Zair

    5 months ago

    Hi,

    for all who has the issue for live chat and contact-us buttons are not being displayed, simply edit the glivechat.php file which you can find in gtalk plugin folder, and modify the line no 55 and 59 and remove the trailing slash (/) from

    to

    so your both images will start coming up and will work as well.
    thanks Mike for your great plugin.

    Reply

  26. Eddie

    5 months ago

    I installed Google Talk client on my desktop to communicate with the wp widget, and every time the chat is initiated via wp google chatback, I would get notification on my desktop with the long URL that I need to click to initiate the chat and it opens chat window in my browser (so now I have two Google Talk windows open). Desktop one is not enabled and I can communicate through the browser window. How to avoid the step of clicking the URL and going to the browser GTalk window. Can I just use directly with Google Talk client. Same happens if I use mobile phone Google Talk applications – it’s asking to go to certain URL to initiate the chat. Thanks!

    Reply

    • Mike Duncan

      5 months ago

      I’m afraid that this is a limitation on google’s part and unless they decide to do something about it, this is the way it will work. They want everyone to use the web version of gtalk and not the desktop version and have seemed to stop implementing features in it. The apps on your phone are probably hooking up to gtalk as a Jabber protocol client so to google’s system it looks just like another gtalk desktop session and sends the link when someone wants to chat.

      Reply

    • Mike Duncan

      5 months ago

      Also, just to clarify further, whichever client you use be it desktop or web based, they do not actually communicate with the wordpress widget that you installed. All the wordpress widget does is query google’s server for your gtalk online status and when someone clicks on it, it redirects them to google’s chatback service. The chatback service is what generates the long URL you are receiving, not the widget. The widget really hardly does anything other than a simple query and display a hyperlinked image.

      Reply

  27. Shanae

    4 months ago

    This is awesome! Just wanted to clear up some simple instructions. It took me a while to figure it out.

    If you have a “domain” email account under Google, for example you go to http://www.google.com/a/yourdomainname to check your email, then you will need to go to this link: http://www.google.com/talk/service/a/YOURDOMAINNAME/badge/New. Get your hash key from here.

    **Be sure to replace “YOURDOMAINNAME” with your actual domain name.

    If you have just a regular gmail account,you just go to gmail.com to get your email, then you need to go to the basic link: http://www.google.com/talk/service/badge/New.

    Again, thanks! This is a great feature!

    Reply

  28. Erik

    4 months ago

    Like it, one more vote for header php install though, thanks!

    Reply

  29. Vladimir

    4 months ago

    Hi,

    I am using this wonderfull widget…but now I want to put this code inside a wp hook…is there php code or custom function that can be put inside a hook

    I wan to put chatback badge inside of the header on my site http://www.kosacrta.hr

    thnx, Vladimir

    Reply

  30. Athena

    4 months ago

    Hi, Is there a way to customize the text that appears when the chat window opens it currently says something like, be careful your chatting with an unknown person. Thanks. :)

    Reply

    • Mike Duncan

      4 months ago

      Sorry, that is something that the chatback service is putting there, and is not coming from this plugin.

      Reply

  31. Athena

    4 months ago

    Thanks for the info, I’m happy with this plugin!

    Reply

  32. Athena

    4 months ago

    p.s. my wish list item would be to turn the widget into a line so you could have a plain “chat” link in your navbar. :)

    Reply

  33. Brian

    4 months ago

    Mike,
    I downloaded this plugin last week and now that I am trying to get it set up, I realized, that I screwed up. 2 Questions.
    1. I put the wrong @gmail account in when I was setting this up…..Can I put in an alternate gmail account?
    2. I misplaced my Hash Key…..Can I get it sent again?
    Any help is appreciated.
    Thanks

    Reply

    • Mike Duncan

      4 months ago

      The answer to both questions is yes. Just follow the instructions again for getting the tk code in the FAQ above. Make sure to login to whatever gmail account you want associated before you go through the instructions. As long as you are logged into the correct gmail account you can do it as many times as you like and it will give you a new code every time.

      Reply

Leave a Reply