drupal
Here's a quick snippet I just found out today: The jquery cookie plugin is presented as part of Drupal 7. This is really cool and useful, but I must note that it's not automatically included on every page load, so you'll want to include it if you want to use it, and as well it doesn't seem to actually be documented anywhere on drupal.org.
Happily, the original documentation for the plugin is at https://github.com/carhartl/jquery-cookie/blob/master/README.rdoc, and is pretty good, although I suggest reading it through at least twice, as at first I missed that you can read, as well as set, cookies with this. Basically the parameters are the cookie name, the cookie value, and then an options object which says the expiration, the path, the domain, and such. Note that the expiration can _either_ be a date, or a number of days.
Hopefully this will help other folks out with using the jquery cookie plugin with Drupal 7.
(I originally wrote this for G+, but since it's long enough, I'm making it a blog post too.)
So, I'm making a new component for webform in Drupal, called 'Multigrid'. It's based on the grid component, which if you don't remember it, allows you to define a set of common options (like, neutral, dislike, hate beyond rational thought) and define a set of questions, and then it sets up a grid of radio buttons, where the answers are across the top and the questions go along the left side.
If you're picturing the online survey you filled out recently in the mistaken hope that you might win $500 after eating at sit-down-chain-restaurant-326, then that's pretty much it.
I really like Drupalcamp LA. It was a bit of a whim, the first time I went out there, but I went and had a blast. Not only did I get to enjoy Drupal with different folks than I saw at home, but I also got to spend a little time with my brother, who lives there.
Well, near there. LA's kind of a big place.
I've gotten a notice about this year's DrupalCamp LA, and it sounds cool, but this year I'm not going to be able to go, with the baby arriving sometime in August. Sorry guys!
Hopefully I'll get to go out next year. Maybe I'll bring along the kid.
Does anyone know how to use drush to quiet a crying baby? :)
It's been a very long week to me leading up to Drupal Camp Colorado, but it's been a successful and satisfying one. Over the weekend I complained a few times at people not to let me run three presentations, but honestly, I loved it! Really, I quite like standing in front of folks and trying to teach them something I'm passionate about, and I was lucky enough to do it three times. I may not get to do that again, really - with the way the Drupal community is growing these days in Colorado, more and more people will be available to step up and help out with sessions like this.
Here's where I plan to list links to various resources and presentations for Drupalcamp Colorado 2011!
First off is the windows_drupal_handout.odt, which is in openoffice format. This file describes how to set up Drupal on your Windows computer, and is the handout I plan to give out at the camp during How to setup a Drupal Development Environment for Windows.
Things are going really well with the baby. Wednesday, Tammy went in for another ultrasound, where they determined that everything they could see is definitely a-ok, and that in another three months we'll have a baby girl to enjoy. Since she had to take the afternoon off to go to the doctor, she headed up to Boulder, where I'd been working for almost two months, to join me.
Something useful sounding from #drupal-colorado:
<cyberswat> drush php-eval '_field_info_collate_fields(TRUE); _field_info_collate_fields()' ... arrrrrggggghhhh /me curses loudly
<cyberswat> should never have to run that
<cyberswat> c4rl: if you ever have an instance where your installing new fields and instances and every piece of code tells you that everything worked from the update hook but you still don't see the instance then run the above
<cyberswat> that took between 4:00am and now to figure out
<cyberswat> for some reason field_cache_clear(); in field_create_instance() didn't do the above as it should have
<cyberswat> field_read_instances() reads from the db not cache
<cyberswat> so when your drush_print_r ing away you'll see wrong information telling you everything is golden
This sounds like an important thing to remember.
Well, I'm finally home after a week-long trip to Drupalcon Chicago, where it was revealed that the next North American Drupalcon will be right here in Denver!
I had a great trip, making some contacts with various companies and keeping my hand in on what's going on in Drupal. Coming home got a little funky with a missed flight, but even that was overcome and I'm finally back at home.
So, I like working on Drupal in virtual machines, and my favorite is to use Ubuntu 8.04, because it's got PHP 5.2.x, which Drupal 6 works with better than it does PHP 5.3.x. Unfortunately, the git that Ubuntu provides us with is from 1.5.x, which doesn't allow use of git clone --branch. And the git
instructions seem to require those. What to do? Happily, you can compile git yourself:
- First, get rid of git if you've already installed it -
sudo apt-get remove git-coreshould do that. apt-get install build-essential- Download the latest version of git.
http://kernel.org/pub/software/scm/git/git-1.7.4.1.tar.bz2works currently. sudo apt-get build-dep git-coretar xjf git-1.7.4.1.tar.bz2(or whichever version you downloaded)- Change directive into the new directory.
./configuremake
I continue my work with the Migrate Module, and recently ran into needing to migrate a value to the Link Module. If you haven't gotten into it yet, Migrate generally expects other modules to handle migrating special bits for nodes, except for the CCK module, and that's included both (I think) because it's in D7 core and because it's so bloody common. Field-specific handling is dealt with by implementing a MigrateFieldHandler, which basically sets up the arrays properly. Again, migrate comes with a number of MigrateFieldHandler classes for the core cck fields, but not for custom CCK fields, like Link.
So, having recently run into a link field I needed to migrate, this is a first swing attempt at handling it. Do note that any module that includes this class will need the Migrate api hook that I discussed in my last post, and also note that I intend on including this fix in the next release of the Link module.








