
November 16th, 2009 → 1:15 am @ Mike Duncan // 64 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:


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.
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 “&”. 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
3 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
Mike Duncan
3 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).
edtechvc
3 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
Mike Duncan
3 months ago
I have updated the plugin to use curl now, so just update the plugin and you should be good to go!
3 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!
3 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?
Mike Duncan
3 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.
Mike Duncan
3 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.
3 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
Mike Duncan
3 months ago
Payam – What version of PHP is your server running?
3 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!
Mike Duncan
3 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
3 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?
Mike Duncan
3 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.
3 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
Mike Duncan
3 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:
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!
edtechvc
3 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
edtechvc
3 months ago
Update: I followed your instruction above and replaced domain with my apps domain and it is now working. thanks.
Mike Duncan
3 months ago
I’m glad it is working for you now, let me know if you have any other questions!
Wredan
3 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.
Bradley
2 months ago
Awesome plugin! This was exactly what I was looking for!
2 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…
Mike Duncan
2 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:
2 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
2 months ago
now, the contact us function worked.. but it doesn’t detect that I’m online when I logged into Gtalk via gmail…
Mike Duncan
2 months ago
What did you change to fix the contact us part? Or did it suddenly start working?
2 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..
2 months ago
Hi everyone,
At
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
1 month ago
cool plugin. how can i call it in the sidebar manually ? what’s the php code?
1 month 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
brent
1 month 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
Mike Duncan
1 month 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.
1 month 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,
Mike Duncan
1 month ago
All I would really know to do is to double check the code you got from this site:
And to make sure that you got everything that is in between the tk= and the &. 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.
Mike Ishliri
3 weeks 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
Mike Duncan
3 weeks 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.
Mike Ishliri
3 weeks ago
That would be great, thanks! I shall wait for it. Thank you for your work!
Mike Duncan
3 weeks 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.
Mike Ishliri
3 weeks ago
It works! Thank you very much!
Erik
3 weeks ago
Like it! Any chance to get it working outside of the widget in a template?
Mike Duncan
3 weeks 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!
2 weeks 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….
Mike Duncan
2 weeks 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.
1 week 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
I appreciate any insight you could give me.
1 week 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.
Debbie
1 week 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!
Mike Duncan
6 days 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.
Debbie
6 days ago
Thanks Mike, that would be awesome – I look forward to your post!
Debbie
1 week 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!
Mike Duncan
6 days 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.
6 days 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.
Any thoughts?
Many thanks,
Mark
Mike Duncan
6 days 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?
Mark
6 days 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
Mike Duncan
6 days 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.
Debbie
6 days 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
5 days 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
Mike Duncan
6 days 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!
Debbie
6 days 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?
5 days 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.
Mike Duncan
5 days ago
You have an outdated version of PHP running on your server
1 day 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?
Mike Duncan
1 day 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.
Layla
1 day 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!
Mike Duncan
1 day 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.