Google Gadgets‎ > ‎

Digg-It! - Gadget for Google Sites

posted Dec 2, 2008 5:31 PM by Bruno Braga   [ updated Jan 11, 2009 9:50 PM ]
If you want to directly contact me, feel free to email anytime to bruno.braga@gmail.com, or chat:  Chat with me


A Digg gadget to allow users to add the Digg-it button into their pages (specially the Announcements pages used as Blog, or similar).

Summary


Most of the Gadgets available are actually part of the iGoogle interface, which does not quite fit to the Google Sites or even Google Pages purpose (who would want to add a "Gmail inbox view" gadget on their website?), for obvious reasons.

However, due to the lack of functionalities on Google Sites, which will soon enough replace the Google Pages as well, I felt compelled to write this one, initially to add to my own pages, but then, why not just release to all?

Of course, the Digg makes more sense with contents such as blogs and turtorials where you want some public interaction (hei, this may server as the comments section for now). So, I would suggest to place them into these kind of pages only (Digg is kind'a dirty enough of no added value pages). 


Adding the gadget to your page


Follow the steps so that you can apply them into your Google Sites pages, if applicable:

Add new gadget

You may find this option at: (Page in Edit mode) Insert > More...


I am publishing this Gadget in a proper place, meanwhile, it is in my own website, at:


Update: The gadget has been published at Google's Submit a Gadget site, but I don't know when it will become available (or if it ever will) on the search popup. Here is the link:


(but, for reference purposes, I will keep my own too)

You will have to add it manually, clicking at  "Add by URL", as shown below:





Configure Gadget

Here, basically you will need only to add the "Digg URL" of the page you want to display the Digg-it. Although by default, Google also lets you choose the gadget's width and height, you don't need to do that, unless it will fit other purposes on your page.

The Digg URL page is the Digg page registered for your artcile or web page, as exemplified at: http://digg.com/tools/integrate

http://digg.com/programming/Digg_s_Eli_White_Releases_PHP_Book

where the information is content and your page title, respectively.



Click OK! And you're DONE!!

The result


And here is one example of how it may look like.  This page can be accessed at: Page Naming Conventions in Google Sites




More


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="DiggIt"
title_url="http://www.brunobraga.net/gadgets/digg-it"
width="50"
height="80"
scaling="false"

author="Bruno Braga"
screenshot = "http://www.brunobraga.net/gadgets/digg-it/digg-it.JPG"
thumbnail = "http://www.brunobraga.net/gadgets/digg-it/digg-it_small.JPG"
author_email="bruno.braga@gmail.com"/>
<Content type="html">

<![CDATA[
<script type="text/javascript">
/*
File name: Gadgets_Digg-It.xml

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

Created by: Braga, Bruno

Created Date: 2008/12/02 14:10

Version: rev001

Remarks: Required item [url] (Digg URL) is the Digg page
as: http://digg.com/{category}/{title}
More info at: http://digg.com/tools/integrate
*/
</script>
<div id="content_div"></div>
<script type="text/javascript">
var prefs = new _IG_Prefs();
digg_url = prefs.getString("url");
</script>

<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
]]>

</Content>
<UserPref
name="url"
display_name="Digg URL"
required="true" />
</Module>


References


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

Updates


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

Gadget Url


As promissed, I left it in the GModules domain, at:
http://hosting.gmodules.com/ig/gadgets/file/112838111412942265046/Gadgets_Digg-It.xml



Collaboration


The user prac, after discussion in Google Groups, created a variation with more flexibility, such as direct URL input, background color and others. It is worth to check that out too. Thanks prac!
Gadget location at: http://philippe.chappuis.googlepages.com/digg-it-code.xml


Other sites with similar info:
http://sites.google.com/site/gsunhelp/step-by-step-guides/buildinggadgetsforgooglesites



Advertisement:

The gadget spec URL could not be found

Attachments (7)

  • digg-it.JPG - on Dec 2, 2008 5:33 PM by Bruno Braga (version 1)
    11k View Download
  • digg-it_1.JPG - on Dec 2, 2008 9:00 PM by Bruno Braga (version 1)
    991k View Download
  • digg-it_2.JPG - on Dec 2, 2008 9:03 PM by Bruno Braga (version 1)
    576k View Download
  • digg-it_3.JPG - on Dec 2, 2008 9:07 PM by Bruno Braga (version 1)
    55k View Download
  • digg-it_4.JPG - on Dec 2, 2008 9:20 PM by Bruno Braga (version 1)
    62k View Download
  • digg-it_5.JPG - on Dec 2, 2008 9:21 PM by Bruno Braga (version 1)
    21k View Download
  • digg-it_small.JPG - on Dec 2, 2008 5:52 PM by Bruno Braga (version 1)
    3k View Download

 BRAGA, Bruno

 



Brazilian currently based in Japan, working on Information Technology.