zondag 4 oktober 2009

Prototyping a Drupal Module for Google Wave

sc top custom html 1Even before getting my invite to the Google Wave developer preview, I had started brainstorming new and engrossing things I could contribute. One of the another things I desired to essay was embedding a gesture into my Drupal site, since Blogger combining had already been demonstrated and I wager a lot of potential in the compounding of blogs and wave.For the Drupal module, I began with their generic 6.x power tutorial . Since every I needed was to add a few pieces of javascript, it wasn't hornlike to do. I utilised the drupal_set_html_head() function to include the embed.js file, then utilised the drupal_add_js() function for the chunk of javascript limited to loading the gesture into a container div. At this saucer I was healthy to load a limited gesture into the div, but had to verify the waveid in the power itself, because it was included in the brick of the page. Considering this to be inelegant, I recalled whatever of my experiences with jQuery, and how it could vantage table from a div surroundings given that it had a famous id. I utilised the results of occupation jQuery's .html() function on the DIV as the parameter to wave.loadWave() to provide it with the Wave ID. This appealed to me as a more elegant solution since I could verify the waveid in the table of the tender and put assorted waves on apiece page.A gesture crapper be embedded into some tender by downloading, extracting, installing, and sanctioning the Google Wave Drupal Module.Afterwards, add this content to some tender and the gesture power be embedded after the tender loads:<div id="wave" style="width: 560px; height: 420px">wavesandbox.com!waveid</div>This power was cursive in a pair days, so there is ease plenty of shack for transformation on it. One feature it lacks is the ability to modify the type color/size and another options ordered using the wave.SetUIConfig() method. Although I'm chesty of having cursive this module, it is by no effectuation the only power out there for Drupal integration. Another power using a assorted technique, but with plan options for things aforementioned type size and color, is acquirable at http://drupal.org/node/530526.Several features would attain the Embed API modify more compelling, aforementioned the ability to embed Waves that anyone crapper read (regardless of whether they have a Wave account), and the ability to verify an alternative gesture for visitors who don't have authorisation to view the embedded Wave.As the Google Wave APIs continue to expand, modify more robust modules crapper be cursive to verify plus of Google Wave's unequalled features. One much intent would be a mechanism for Drupal that acts in much the aforementioned way as Bloggy: publishing waves as pages to a Drupal instance, and allowing the direction of a site's table primarily finished wave.One of the things I encounter most elating most Wave is that it comes in a time when so many services online are acquirable finished SOAP/REST/XMLRPC interfaces, and budding developers aforementioned me crapper theoretically combine every of these services with Wave. Along those lines, I've been working on a mechanism that integrates Trac (issue tracking) and I'm also hunting to write a power to embed waves into Elgg, since both of those are heavily utilised for my graduate project, Beaversource. I hope that another users power encounter my Wave modules as multipurpose as I have, and another developers power be inspired to combine Wave into their possess systems.Posted by Eric Betts, Community Developerbottom custom html 2
Yahoo

Geen opmerkingen:

Een reactie posten