domenic's blog
We just had an impromptu conversation over here about validating phone numbers that morphed into validating email addresses and more.
Adam brought up the fact there are a lot of email addresses that don’t pass the basic regex validation that a lot of sites use. In fact, there was a good discussion of this very issue on Slashdot in a larger article on regexes. One comment: read more »
Komodo is a great cross-platform IDE. But I’ve noticed that as file size increases, Komodo’s performance slows to a crawl, becoming practically unusable once files hit 2.5k lines or so.
I opened a thread about it on ActiveState’s community site (which happens to be running Drupal!). It seems this is a known issue on OSX and they’re looking into it. read more »
It’s super annoying when you’re looking for a string in your code, so you do a recursive grep, only to get a ton of matches within svn’s “.svn” directories.
Here’s a solution:
Inside your ~/.bash_profile, insert this line:
alias rgrep="find . -follow ( -name ".svn" ) -prune -o -print | xargs grep -Hn"
Save it, then log out and back in.
Now instead of grep -ir "sprintf" *, do rgrep sprintf. Cake!
My session on Amazon AWS & Drupal at DrupalCampLA. We're walking out the door at DrupalCamp, so I'll get more details up shortly.
“Adobe Air requires Adobe Air to function”
lolwut?
I’m trying to install Twhirl, which is an Adobe Air app on my MacBook, and Air keeps taking a dump while trying to install itself.
Turns out, making a change in the International Preferences Pane fixes the problem /sigh…
Big thanks to Andrew Peterson for his step-by-step blog entry on how to make Air behave!
So I’m working on a project now where nodes are mass-imported from a third party. By default, these nodes are unpublished until the delegated party can add additional information that the import can’t capture. We publish the node when it’s through being reviewed and updated.
To be clear, the workflow looks like: 1) Import nodes (CCK type: “Item”), default status is Unpublished. 2) User with “Reviewer” role looks at the queue of Items that needs reviewed 3) Reviewer reviews Item nodes, then sets them as Published.
Here’s the problem though: read more »
Like a lot of you, I’ve had to create many many backgrounds for jQuery tabs.
I’ve mocked up a little template in Photoshop which should help make creation super-simple and fast. An example gradient is included as a style for the less photoshop-literate.
Enjoy! (click to get it!) (Here’s an RGB version that should be GIMP-able)
When I was in high-school, I worked at an office supply chain in the “Business Machines” department. I sold computers, adding machines, Palm Pilots (the first revision!), printers, cables, you name it. Aside from helping customers, I had to stock those items on the floor, take daily inventory, complete cleaning/organizing projects, set up new displays to specs (Planograms) and take on whatever other tasks my managers wanted me to finish. Eventually, I was promoted to “Business Machines Lead” — which came with a sweet $0.75/hr raise. read more »
Some months ago, I discussed multiple values in CCK using AJAX. A few people showed interest, so here's Part 1 of how AJAX can go together with Drupal.
We'll start with a common use case: checking that a username is available when a new user signs up. After you're done with this tutorial, you should be able to give the new user near-instant feedback on whether or not their username is available. I like to start at my desired result and work backwards, so that's what we'll do. read more »
So, if you want more than one value for a field, it’s a problem.
Say you want a user to be able to enter an arbitrary number of email addresses/IM names/phone numbers/whatever on his profile. The “Allow multiple values” option in CCK is woefully adequate.
Aaron tackled this problem with aplomb (well, as far as Drupal allows) by creating a new CCK type for each field that we need to allow multiple fields on. We create a block view for it, then simply embed that view in the profile edit form. read more »
