Using the Ubiquity Firefox extension to create Drupal nodes

The Ubiquity extension for Firefox is an awesome tool that allows you to download user created mashups to do some really cool things in your browser. The video below shows the power of what it can do.

It was introduced in August this year and there are already quite a few user created commands, including this one by Nils Werner, which will pre-populate a blog entry with the selected text on a web page. The only problem is that is requires your blogging engine to accept text via the GET parameters, which Drupal doesn’t do by default.  No problem, just install the Prepoluate module and away you go.

Here are some step by step instructions on how to set it up.

  1. Install the Ubiquity Firefox extension.
  2. Enable the Prepopulate module on your website.
  3. Install this Ubiquity command (it will display an information bar at the top of the page if you have Ubiquity enabled).
  4. Now that you have the command, you need to tell it where your blog form is. To do this, press CTRL + Space (this is the default hotkey to launch Ubiquity) and type “blog set” and press enter. A popup window should appear, and you will need to enter[body_filter][body]=$body&edit[title]=$subject
    (this assumes that you want to populate the ‘blog’ content type)
  5. Once that is set, simply select the text on any web page and press CTRL + Space and type ‘blog this’ and you will be taken to your Drupal site with that text already entered into the form

It’s pretty simple and makes it much quicker to jot down ideas for your blog while surfing the net.

Also, because Ubiquity commands are written in Javascript there should be a way of doing this without using the Prepopulate module and interacting with the form elements directly, but I’m not familiar enough with Ubiquity yet to work this out. If you have any ideas, let me know in the comments.


Long live Ubiquity + Drupal.

Very cool idea, this is big!

Drush migration to ubiquity...?

Thanks for recommending my Ubiquity commands! :-)

No problem, thanks for providing them :)

So I've been thinking a lot about trying to get some nodes automatically created using ubiquity, and I figure I'm going to have to create a custom "listener" module, that listens for a GET at a particular URL, and parses the query string parameters into the node's fields then node_save's them.

(I don't want to just prepopulate my form and then still have to hit save, I want to not even have to visit my site).

So that's my answer; but if there's a way to do this in some kind of "Universal" way, I'd be happy to write the module the right way and contrib it. Otherwise, I'm just gonna write my little custom module and leave it at that.

I wonder if Ubiquity has an XML-RPC library that can be used--then we can connect it to Drupal's Services.module.