Google Gadgets‎ > ‎

GTalk Status for Google Sites

posted Jan 10, 2009 1:14 PM by Bruno Braga   [ updated Jan 11, 2009 10:40 PM ]
If you want to directly contact me, feel free to email anytime to bruno.braga@gmail.com, or chat:  Chat with me


A GTalk Status badge gadget to allow you to display your online status on your web page and guest chat.

Summary


I have posted here before about a workaround on this in my Sites Help page (Add GoogleTalk (Gmail) online status to your Sites), however Google blocked the iFrame workaround, which blocked my solution, forcing me to finally adopt the gadget solution.




More Help:
    If you want information on how to build or add gadgets on your pages, please visit: Build your own Gadget for Google Sites


Configure the Gadget


Once you try to add the gadget to your page, the gadget setup should look like this:



The only information you need to change here is the "Badge URL", which is the URL extracted from the iFrame code that you are supposed to place on your webpage:

<iframe src="http://www.google.com/talk/service/badge/Show?tk=z01q6amlq1t2el6m7f7pns7f0ga43q05qkot689lfc8ibf6cm93fisj56jiq5jha6ekdkbmiuk43pqts2ao2nb6kpmsas5comk9q4jqqgkpjeb92qts7eildgbgu8quk42grk3mh81dlluu2gqj252ji9474g47t1uqg5c976&amp;w=200&amp;h=60" allowtransparency="true" width="200" frameborder="0" height="60"></iframe>

Just place that URL (complete) into this property, and the Preview screen should be able to place your name there.

The result


And here is one example of how it may look like.  This page can be accessed at: Home




The Code


If someone wants to adventure on Google Gadgets creation, feel free to improve the code I designed:

<?xml version="1.0" encoding="UTF-8" ?>
<Module>

    <ModulePrefs

        
title="GTalkStatus"
         title_url="http://www.brunobraga.net/gadgets/gtalk-status"
        
width="200"
         height
="60"
        
 scaling="false"
         
author="Bruno Braga"
         
screenshot = "http://www.brunobraga.net/gadgets/gtalk-status/gtalk-status.JPG"
         
thumbnail = "http://www.brunobraga.net/gadgets/gtalk-status/gtalk-status_small.JPG"
         description
="Google Gadget created to enable GTalk Status (iFrame version) functionality throught Google Sites. This will only work by extracting the source URL of the iframe code and pasting in the required parameter."
         author_email
="bruno.braga@gmail.com"/>

    <Content type="html"> <![CDATA[
        <script type="text/javascript">
            /*
                File name:     Gadgets_Gtalk-Status.xml

                Description:     Google Gadget created to enable GTalk Status
                                functionality throught Google Sites
                                (which currently does not allow embedding
                                javascript, or iframe contents on it).

                Created by:     Braga, Bruno

                Last Updated:     2009/01/13

                Version:         rev002

                Remarks:        
                                More info at: http://www.google.com/talk/service/badge/New
            */
        </script>
        <script type="text/javascript">
            var prefs = new _IG_Prefs();
            badge_url = prefs.getString("url");   
           
            // Write the iframe
            document.write('<iframe src="' + badge_url + '" allowtransparency="true" width="200" frameborder="0" height="60"></iframe>');
        </script>
    ]]>
</Content>
    <UserPref

        
name="url"
         
display_name="Badge URL (the link the iframe is opening)"
         
required="true"
         default_value
="http://www.google.com/talk/service/badge/Show?tk=z01q6amlqsotsibo83jt5b0r62ijaa1kpvrf35lp9lulmun33jojlgdml9tombacg55oubiajnkcct9ll803s6k10occmd39jdvm6njo33l34hn43dclnpluqqqmjb8t46t3jua600vabkensc01co947sag36um0nrcvj8a8&amp;w=200&amp;h=60"/>
</Module>


References


Here are some references that helped me to make this happen:

None, yet.


Updates


Here follows the updates of this article, and/or any relevant info that may be linked or helpful to this.

None, yet.



Advertisement:

The gadget spec URL could not be found

Attachments (3)

 BRAGA, Bruno

 



Brazilian currently based in Japan, working on Information Technology.