So I've written two Google Gadgets recently (http://www.unitorganizer.com/google/algebra/algebra.xml and http://www.unitorganizer.com/google/towersofhanoi/towersofhanoi.xml) and found the process to be extremely easy, given that I had some mini-applications already.
So then I wondered to myself, would it be possible to point the url of a Google Gadget at a MENU_CALLBACK in Drupal?
The specifications of a Google Gadget require xml, in a form similar to:
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="My first gadget" />
<Content type="html">
<![CDATA[
<B>Welcome to my first gadget!</B>
]]>
</Content>
</Module>
So then I thought, it must be possible to turn all sorts of Views and blocks into Google Gadgets, simply by hijacking the code and presenting the correct headers etc...
Anyone interested in helping develop something like this? I'm really not a Views guru, but I can create a callback pretty easily. Presumably Google will even let us submit our URL ourselves to their handler for content directory submissions. We could then create a module that would allow users to post Views that would normally show up in a block (because these are Google Gadget sized) to the Google Gadget directory. We should even be able to create a link that lets the person add the View to their homepage automatically.
Dave
Comments
Sounds really interesting -
Sounds really interesting - I was talking to the MySite developer (MySite project recently about integrating Google gadgets into MySite and he has been looking at developing some block handling code which might help?
I haven't had the time I'd like to get back to this recently but am hoping to look at it again soon.
Gadgets as blocks
I think the existing Google Gadgets being inserted into Drupal blocks should be fairly easy, Google has pretty detailed instructions for incorporating their gadgets into existing web pages.
What I'm suggesting is basically this. You create a view, and then you can choose to export that view to a Google Gadget xml file (which is either created permanently for you, or on the fly, but I suspect that permanently is a better choice, it can always be updated if you change your view), and then you can submit that xml file to the Google Gadgets page (or even have the submission handled for you) and then a View of your website content could be added to complete strangers Google homepages.
For example, let's suppose we are the maintainers of Mtv.uk (which supposedly runs on Drupal) and we want to attract more customers to our site. We probably already have a 'most popular content' view created. Now we could extremely easily, using this module, export this view to a Google Gadget, and then someone who was interested in MTV could add this gadget to their Google homepage, and have an up to date listing on their home page of the most popular content at Mtv.uk.
Is anyone interested in sponsoring development of such a project?
Dave
Ah I see - isn't that
Ah I see - isn't that already possible via an XML view output though? With appropriate header and footer code?
MySite
Dave-
I think I see what you're getting at.
MySite creates "gadget" style output for display on a Drupal site. (The HEAD version also lets you create gadgets from Blocks, Views, and raw HTML code).
But what you're after is a way to export Drupal content into the Google Gadget XML standard. Right?
This is certainly possible. I think you could do it now with Views and some custom theming.
Take a look at the droplet.inc code in MySite HEAD, which shows some way to manipulate Views into new content objects. You could use a similar method to create the callbacks you need.
--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.
Google gadgets
I am interested in working with someone in adding google gadget in Drupal, my php and programming experience will come in handy, ayone interested in doing this as a team effort can drop me an email. mugaurac@gmail.com cheers
I didn't know this was a
I didn't know this was a standing request - but I saw the need for it myself:
http://drupal.org/project/views_google_gadget
It was actually a little more complicated than just wrapping header and footer around a regular view due to the theme. But - if any of you would care to test the module, let me know if it works for you.