How To Make Scaled Images Look Better in IE

Alert reader Chris S. emailed me to point out this post by a developer at flickr about how to make IE scale images more smoothly. All you have to do is add...

img { -<span>ms</span>-interpolation-mode:bicubic; }

to the stylesheet. It worked!

Via Joel on Software.

Altering Profile Field (profile.module) View Functionality

Someone here at DIWD had a question on how to modify a view (in Views 1.6) that uses profile fields (defined with profile.module). The specific idea was taking a “name” field and making it link to the user profile. This can be done with two functions defined in a module.

For this particular scenario, we created a module specifically for this called obs.module (named for Austin Smith’s obs module during his NYO Site Dissection @ DIWD ). In it, we define two functions:

This first function implements view’s views_tables_alter hook. This allows us to alter the huge tables array generated by hook_views_tables. The stuff we want to change is auto-generated by the default installation of views (which comes with profiles support). You’ll have to put the name of your field in here (you can find it while editing your profile).

function obs_views_tables_alter(&$table) {
  $table[‘profile_display_name’][‘fields’][‘value’][‘handler’] = ‘obs_profile_name_handler’;
  $table[‘profile_display_name’][‘fields’][‘value’][‘uid’] = ‘uid’;
  $table[‘profile_display_name’][‘fields’][‘value’][‘addlfields’] = array(‘uid’);
}

The first line of the function sets up our output handler. The second maps the uid value to the uid field and the third pulls the uid field out of the profile_values table so that we can access it. We’ll need it to generate the link to the user’s profile.

The next function we add is the handler for the field, which just renders the field. Pretty simple here:

function obs_profile_name_handler($fieldinfo, $fielddata, $value, $data) {
  $value = (unserialize($value) === false) ? $value : unserialize($value);
  return l($value,‘user/’.$data->profile_display_name_uid);
}

Pretty much it’s copied verbatim as the default handler for profile fields in the views module but adds the link and returns that instead of the value.

Not that for your field, you’ll have to replace any instance of profile_display_name with the name of your profile field.

Hope that helps!

Do It With Drupal

Do It With Drupal has been great so far! Met lots of people and have been having a great time! We went out to eat last night at Bourbon House Seafood on Bourbon Street:

It’s a wonderful place. Great food and not too pricey! Seafood platter = win.

The conference came up to full speed this morning and there has never been a dull moment. Lots of great ideas and some good conversations.

So far, a few thoughts:

  • There are a lot of .edus here. 50% or more at least.
  • I’ve heard “we have that problem, too” a lot. People feel less dumb knowing that others are running into the same problem as they are.
  • Themes seem to cause more “issues” than any other piece of Drupal. (You know, as opposed to modules or things not working right.)

Update

I’ve been pretty quiet on here for the past month or so. Things have been pretty crazy. Two(ish) weeks ago I moved to Temple, TX. I know what some of you are thinking but I have to honestly say that I thought I was going to die of boredom here. Turns out I’ve barely been able to sit down and hack around on fun stuff like I normally did.

Moving here was great. Now, however, the real task is going to be prepping the condo for rent. Then I’ve got to get cleaning supplies, hang the christmas lights, fertilize the lawn, go to the dump and then next week I’m heading to NOLA for Do It With Drupal, which promises to be a ton of fun.

Anyhoo, I’ve got another blog post in the works here that I’ll get posted today or tomorrow. It’s going to be long and inspired. I promise. Until then, drink a cup of hot chocolate, throw another log on the fire, and sing another Christmas Carol!

I Hate Microsoft Office 2008 For Mac

I have no earthly idea why it does this, but it really makes my blood boil:

Just in case you are wondering what the problem is, my documents are not named Document1 [Compatibility Mode] and Document2 [Compatibility Mode]. They are called… well it doesn’t matter what they are called but it’s not this! I’m sure you can imagine what it’s like having to use 2 programs to figure out what I’m looking at. And yes, these documents were originally created by Microsoft Word (for Windows, no doubt).

I’m uninstalling Office 2008 this afternoon. I’m tired of this crap.

Do Your Hot Corners Ever Stop Working In OSX?

Mine do. I’m not sure what’s causing it, but I know what fixes it:

killall Dock

Now, if I could only get my system to wake up 100% every time.

Different Strokes For Different Folks

My boss was kind enough to send me the link to this Wired.com article about how ‘Twitter, Flickr, Facebook Make Blogs Look So 2004’. I think their article has some merit, but there is something they are missing. I’m not sure about you, but I’m the exact opposite of what they are talking about.

Twitter — which limits each text-only post to 140 characters — is to 2008 what the blogosphere was to 2004. You’ll find Scoble, Calacanis, and most of their buddies from the golden age there. They claim it’s because Twitter operates even faster than the blogosphere. And Twitter posts can be searched instantly, without waiting for Google to index them.

It’s all about getting their information and ideas out there. That is, Scoble, Calacanis, et al. originally started blogs because they had information they wanted to know and blogs provided them with an adequate time-to-published latency. They wanted to get their ideas out there as fast as they could. But just because something is fast, doesn’t mean it’s better. Take txt messaging as an example.

You can let someone know that you’re going to be late by txting them. It’s extremely fast and is perfect for what you are trying to do. But you wouldn’t want to try to explain anything in great detail in bursts of 140-characters-or-less messages that automatically broadcast to anyone who might be even slightly interested in what you have to say. It’s too easy to be too-brief and pull the trigger too quickly on something that might be dumber than you expected because it’s not subjected to the scrutiny that a regular, typed out post very well would be.

Blogs are still one of the fastest media out there for publishing and for the other 99.5% of us, they’ll be the medium of choice for many years to come. Twitter and Facebook are the medication deprived ADHD stepchildren of blogs. They are most definitely not the blogs of yesteryear, no matter what their parents might say.

Download, Uncompress, and Untar a File

Just wanted to write this little shell code snippet down because I’ve been using it quite a bit. It downloads, ungzips, and untars a file without saving it using wget:

wget -O – http://example.com/file.tgz | tar xvz

Or, if you’re Mac Like Me, you’d use curl:

curl http://example.com/file.tgz | tar xvz

Beats having all those .tar.gz files laying around like dirty kleenex.

Why Can't We Monitor File Uploads In Major Browsers?

This guy says everything I wanted to say and more. His article was written in late June of this year and everything still applies.

I’m working on something like this right now. Gosh, it’s infuriating.

Fixed My First Dryer Today

I have an old GE Dryer (Model # DDE5300BBL) downstairs. The belt popped in it about a month ago and I finally got around to fixing it. Unscrewed everything, cleaned it, but then I couldn’t find out how the belt fit. Luckily, everything is on the internet.

Had I shopped a little harder, I could’ve gotten the belt for about $6, but I ended up spending about $18 with shipping. Taking the thing apart was easy. Cleaning the beast was a task, taking about 40 minutes and several trips to empty the vacuum. Then the belt wouldn’t fit right. Turns out I was doin it rong. Oh well. A couple more google searches led me to a that describe how to change a GE dryer belt (among other things). Great little site. Now my dryer is happily spinning away and the repair only took about an hour total.

Join The Central Texas Drupal User Group!

After talking with some friends and colleagues, it seemed about time to go ahead and start up the Central Texas Drupal Group. Once we get enough people, we’ll start meeting (monthly most likely). Since the distribution of people is split 50/50 Waco/Temple, the location of the next people that join will decide which city we’ll meet in.

Sign up now, and let anyone else you know of know so we can form a group of developers in Central Texas!

Authorize.Net Password Reset "Bug"

It turns out that when you reset your password in Authorize.Net, the password reset page’s new password fields have a maxlength value of 50. This is great, but the login form for the Merchant page’s login only has a maxlength value of 25.

The end result is that putting in a password of 26 characters or more in the password reset screen will make you pull your hair out when you can’t login to the site (saying that your password is incorrect!)

You can test this by changing your password using the reset link (don’t know if it works from inside the account manager) and change it to something longer than 25 characters. Logout and then try to log back in. It won’t work. If you visit the page with Firefox and Firebug (or any other edit-in-place browser plugin) and modify the maxlength of the password field in the login form, paste, and submit, you’ll be able to login just fine.

Hopefully they will fix this by extending the maxlength of the login password field and not decreasing the maxlength of the password reset field.

Verizon Wireless Early Termination Fee Settlement

Wow… this is pretty cool. Looks like anyone who got charged an Early Termination Fee between July 23, 1999 thru August 10, 2008 might be eligible for a settlement.

Go to http://www.verizonetfsettlement.com/ for more information. I filled out mine this morning!

iPhone Functionality Wishlist

A list things which would be really nice to have for the iPhone:

Using the iPhone as a remote monitor (of sorts)

While docked, for instance, you could have CPU, Memory, HDD, etc usage running on your phone. Apps could use the phone for extra input or space. You could play music on your main machine and have it do visualization. Download managers can talk to the phone and show throughput, etc. Xtorrent could put it’s “finished” display on there. Just some ideas.

Phone Integration

  • Music fades (like it does when listening on the phone) on your machine when you get a call. I love this feature when I’m using it in my car. It would be great if it did it while docked to your machine (or over bluetooth).
  • Caller-ID pops up on your screen when you get a call. Again, would be nice.
  • Ability to make answer the phone from your machine.
  • Send txt messages from an interface on your computer. Need I say more?
  • Auto-lock when you step away from the computer.

Data Export

I would love to be able to export my call data (or have it show up in Address book under notes). When working with clients, it would be nice to be able to just import call logs and have the times associated with each client so you know how much time you talk to them on the phone.

A Question To Everyone Who Downloaded Spore

Spore has become the “Most Pirated Game Ever Thanks To DRM”. I understand and can’t say that I would not do the same thing considering the circumstances.

Erick Schonfeld from TechCrunch explains:

The DRM that comes with the official game only allows customers to use it on three machines (after that you have to call EA for permission to activate the game on additional machines). This is nothing more than an inconvenience. Gamers, in general, are more likely to have more than one computer, and to cycle through computers faster than other PC owners because they always want the latest, greatest, and fastest machines. Many will hit that three-machine limit quickly.


Maybe EA should join the rest of the entertainment industry in coming up with a consistent DRM policy. Unlike iTunes, which imposes a five-machine limit on most purchased songs and movies, there is no way to associate new machines or disassociate old ones from your account online. You have to call. That does not scale.

It now appears that EA has gotten the message, and has vowed to make some changes:

Electronic Arts’ highly-anticipated real-time strategy game, Command & Conquer: Red Alert 3, is going to ease up on its digital rights management (DRM). While Red Alert 3 will still use SecuROM, the same copy protection that Electronic Arts Los Angeles has used for its last three C&C titles, Red Alert 3 will up the installation limit from three to five…

In regards to Spore, a company spokesperson has promised a patch in the “near future” (from MTV Multiplayer Blog", via PaidContent).

Assuming EA fixes these problems and adopts a less draconian DRM policy, will you go out and purchase the game?


Theme & Icons by N.Design Studio
© 2008 Nicholas Vahalik
Syndicate content