Drupal will Explode your Site into a Million Pieces, and Why You Want That.

Views as a Web Widget has the potential to revolutionize the Internet, now that I think about it. Taking a hint from Steve Rubel of Micro Persuasion in The Future is Web Services, Not Web Sites, we are entering a time where creating an API for embedding content within another site is becoming a standard way of sharing information.

The leading players on the web all see the train coming. They are wisely creating APIs and turning themselves into plug-and-play services, not just big destinations. YouTube is just the latest to do so today. Amazon has S3. Google has OpenSocial and an extensive library of APIs. As does Microsoft. Facebook is allowing its applications to live outside the site. Twitter is an API first and (eventually) a business model second. Finally, the booming widget economy shows the promise of small content that can go anywhere.

The Views as a Web Widget project is being proposed for Google's 2008 Summer of Code. This project will allow an administrator to turn any view into a widget.

As I have experience with this, having implemented Views Slideshow (any view into a slideshow), Embedded Media Field (embedding external "widgets" from YouTube, Flickr, etc.), and a widget for Maplight, and am interested in being a mentor this year, I plan to offer to mentor that project, along with Alex Urevick-Ackelsberg.

Tim Berners-Lee spoke last week on the topic, saying that the semantic web will supersede the monolithic giants of Facebook and Google. As Dries recently indicated at his State of Drupal address in Boston, the Drupal of the future will be semantic web.

The Drupal of the Future will explode your site into a million pieces. And if your site can handle that, it will thrive in that multifaceted environment.

YouTube Expands API: Good for Embedded Media Field

So YouTube just added some new features to their API:

  • Upload videos and video responses to YouTube
  • Add/Edit user and video metadata (titles, descriptions, ratings, comments, favorites, contacts, etc)
  • Fetch localized standard feeds (most viewed, top rated, etc.) for 18 international locales
  • Perform custom queries optimized for 18 international locales
  • Customize player UI and control video playback (pause, play, stop, etc.) through software

How does this apply to Embedded Media Field? And how about to Drupal as a whole?

Embedded Media Field still needs to tie into the Media Mover module, firstly, to even allow uploading (harvesting) videos and sending them to YouTube (processing) before storing them in the content field. Once it does that, though, we can get a little smarter. Perhaps allowing users to post responses through the API, which would become YouTube videos showing up in response to a video there, and automatically also becoming a response to the Drupal content.

We can also tap into the custom queries when selecting video to embed.

Finally, we should be able to have more control over the UI, and could use jQuery to control the playback of the video, perhaps autoplaying a few seconds after the page load, or maybe jumping forward to our favorite part of the video. We'll have to see about that.

What does that mean for the Internet? As pointed out by Erick Schonfeld at TechCrunch, Google's just flexing their muscles a bit more, trying to ensure the bulk of video on the Internet goes through GooTube. At least Embedded Media Field is taking a more open approach, independently supporting many other providers, such as Blip.TV, Revver, and Brightcove.

Aaron

Low Hanging Fruit

During our Drupal Multimedia panel on Monday, Nate Haug (quicksketch) mentioned that soon we will be discontinuing the Image module, and providing a migration for existing Image Nodes to ImageField (or its replacement).

The same thing needs to happen to the Video module. That could happen now. The module that provides a migration path for Video nodes will be king. But they'll also need to tap into the planned hook_file for d7, to keep from being dethroned.

Even if the Video module wants to survive, it will need to migrate from its current 4.6 mindset of video-as-a-node.

I'm just saying.

Calling all Writers at DrupalCon!

Recap of the first topic of my last message, for emphasis:

The obvious topic for the March newsletter is the DrupalCon, of course. There are over 800 people here, though and we need to recruit people to write up their favorite session/s. If you are at the conference, please write up at least one session, and/or find three other people who can write up a session. We only need a paragraph or two, but feel free to write up a whole big article if you're inspired.

Proof of Concept for Stand-alone Drupal Newsletter

Sneak preview of this discussion (if you decide not to click through to the rest of this discussion topic): http://drupal-newsletter.org/issue/2008/01

This DrupalCon has been phenomenal! We had an impromptu BoF session yesterday for the Drupal Newsletter. The three big things that came out of that were a plan for March's newsletter, the newsletter length, and building a stand-alone site for the newsletter.

The obvious topic for the March newsletter is the DrupalCon, of course. There are over 800 people here, though and we need to recruit people to write up their favorite session/s. If you are at the conference, please write up at least one session, and/or find three other people who can write up a session. We only need a paragraph or two, but feel free to write up a whole big article if you're inspired.

To the second item, we plan to use a system of teasers for the next issue. We'll put each section and/or article in the groups, and just link a manually created teaser in the digest that gets e-mailed and posted on d.o. We'll refine that process as we continue creating future newsletters.

Which is yet another strong case for a stand-alone newsletter site, bringing us to the third item of discussion. We created a working group, currently consisting of Alex UA, mlsamualson, and myself, to create a proof-of-concept stand-alone site. You can see it at http://drupal-newsletter.org/issue/2008/01 (which is just filler, as you'll see).

Drupal China gets Embedded Media Field!

Jacob Redding (jredding), Robert Scales, and John Zhu conducted a panel about Drupal in China yesterday at DrupalCon. We all learned about why and how China is beginning to embrace Drupal.

I plan to do a better write-up for the Drupal Newsletter, so you'll have to wait till then to hear more about it. However, I did manage to sneak in quick 20 minutes during the panel and write Embedded Media Field support for Tudou.com, the Chinese version of YouTube. As a side-note, tudou translates roughly to 'soil tofu', or 'potato'.

You can see a higher-res version of the video at Jacob's blog wiredgeek.com.

Drupal Text Editor Brainstorming

Oleg Terenchuk (litwol) and I were discussing the Rich Text Editor (RTE) in core thread on the developer's list the other day. He has a great idea to create some hooks to allow this to be simple, powerful, and easily extendible. It would be written in jQuery, and allow buttons to be built on top of it.

The difficult part would be getting jQuery to recognize selected text in a textarea. jQuery has no native functions to do this, so a plugin would have to be written. Most current jQuery RTE's work using an IFrame, due mainly to the difficulty in getting FireFox to easily query the selected text of a textarea.

In Internet Explorer, it's easy: built-in proprietary properties, .selectionStart and .selectionEnd, will give you whatever's selected, whether in a textarea, or in the document itself. Of course, it's non-standard, so it doesn't work in FireFox.

I found the solution while we were chatting. However, it is in javascript, rather than jQuery, which means we have to do some tweaking. Using the original post for inspiration, ideally we could code something like this:

jQuery.fn.selectionText = function() {
  if (this[0].selection) {
    return this[0].selection.createRange().text;
  }
  else if (this[0].selectionStart != 'undefined') {
    return this[0].value.substring(this[0].selectionStart, this[0].selectionEnd);
  }
}

Unfortunately, I don't believe that this[0].selection will work, from what I've read. Thus, we have to use document.selection, which will work after a fashion. Unfortunately, that will select text from anywhere on the page, so we'll have to do some more research.

If it works, however, this should give the text of the selection. This would have to be tweaked to work with elements other than ID's, as jQuery $('.whatever') actually returns an array of elements. This code would only return the selected text of the first element, which might be blank if the selection is elsewhere.

Then we could do something like:

jQuery.fn.setSelectionText = function(txt) {
  if (this[0].selection) {
    this[0].selection.createRange().text = txt;
  }
  else {
    this[0].value = txt;
  }
  this[0].focus();
}

You would use this something like this, attaching this to a button, say, that makes something bold:

$(document).ready(function() {
  $('#bold-button').click(function() {
    $('#my-textarea').setSelectionText('<b>' + $('#my-textarea').selectionText() + '</b>');
  });
});

That should do it. We'll be building and testing later this week, so expect a live demonstration soon!

Module Development during DrupalCon

So I was just updating the Contributed Modules Status page at gdo to reflect that I plan to work on upgrading Embedded Media Field to Drupal 6.x during DrupalCon, and noticed that fago also plans to work on Workflow-ng "after the drupalcon". So I scanned through the list to see if anyone else was planning module development this week, and that was it.

Now the way I am at these conferences is that I get into overdrive. I already spend my 8 hours a day at work buried in Drupal, and an additional 8-10 hours a week of my personal time. But, apart from periodically calling my partner & daughter to let them know I'm still alive and remember them fondly ;), I spend every waking moment at a Drupal conference thinking about Drupal, how it can "save the world", and how I can do my bit to help that happen. I find myself so energized by being around other like-minded people at these events, that I throw myself into making cool modules, upgrading other cool modules, etc.

I know I'm not the only one like that.

Since the word of the day is "Drupal 6", I'm curious who else is going to be working on porting their modules during DrupalCon. So I did a 5 minute google right now on "upgrade drupal 6 drupalcon" and found nothing there. But I know it'll happen. Either folks are keeping it under wrap, are too busy to blog about it, or don't realize yet that that's what they're going to do. (Time for me to brush up on the Coder module...)

Whatever the case, March 10 should be an exciting day in the world of Contributed Modules. I'd put money on some of your favorite modules being ready for d6 the week after the conference (maybe not deployment-ready, but certainly testing-ready). And I wouldn't be surprised to see a quiet module or two come out of the conference that will rock the world of Drupal, and send waves through the Internet.

Selling my Wireless Router


I just switched to FIOS, and their router is also wireless, making my current NetGear wireless router obsolete. I'm offering it to you! (The eBay auction won't show up till Sunday.)

It's a great router -- I got it last year with my laptop, and it's served me well. I don't have the original box or disk, but it worked automatically both with Windows XP and Linux Kubuntu, so I don't think you'll have any problems at all.

I'm shipping the router, its power supply, and throwing in an extra ethernet cable for your desktop, if you need it.

Hotlinking Images? No. Wget Instead.

There's an open feature request for the Embedded Media Field to allow editors to link to a live image on any arbitrary site. Although this is technically possible, and easy to implement in the module's framework, this practice is also known as hot-linking, and I'm not particularly interested in enabling that sort of functionality.

However, the discussion on that queue did lead to another interesting possibility. Using file_get_contents (or maybe more efficient method?), I can 'wget' an image and store it to the server. Then the image can just be served locally. I was already examining that possibility for storing (YouTube, Blip.TV, etc.) video thumbnails as well, so I should be able to sign off on two tasks with this mini-project.

It opens up the possibility of copyright violation, but I leave it to the lawyers to fight over that one. And though there are certainly some cases where a hotlink implementation might be okay, I'm personally not interested in encouraging that.

Aaron

Syndicate content

The Society for Venturism has chosen me as the recipient of its charity for this year, to hopefully offer me cryonic preservation when the time comes. And this month, Longecity, an excellent forum for the discussion of issues related to extending the lifespan of humans, has offered up a matching grant of up to a thousand dollars to help out! So help out! Please.