Wow, over a year?

Been way too long since I've kept up here. Just been too busy with life and earning a paycheck, I guess. I know it's awfully lame to see a themer using a default theme for his personal site, so maybe I'll be able to squeeze in some time to finish off that half baked design I started last year.

The past few months have seen me work on, and/or lead theming at Advomatic for several major sites. All of which I've been very proud to be a part of, such as...

Absolute URL paths

Just stumbled onto this nice little function, probably not big news to Drupal code-heads... but as a themer that frequently works in a staging development environment, I find that sometimes I'll need to use an absolute path for an image path or whatever.

Well, if you need to print the absolute path to a given file, use the url() function:

http://api.drupal.org/api/function/url/6

The fourth argument of the function allows you to make it return the absolute path, including the http:// and the domain part.

Usage:

Truncating text in Drupal

As a themer, you frequently want to cut a bit of text to a certain length, be it for layout reasons, or teasers.

Luckily, instead of trying to figure out how to do it cleanly with PHP, Drupal API provides a very handy function that does what we need to do, to any text string.

truncate_utf8() api.drupal.org/api/function/truncate_utf8/5

Restoring a file from SVN that has been removed

First, cd to the directory that once held the file you want to restore.  Then, run the following to get a list of all the files that were in this directory at some point, along with revision numbers:

svn log --verbose

Find the file you want to restore, note the revision number from the revision BEFORE the file was deleted.  This is what you'll be restoring.  Next, use the following command and format to being that file back from the dead:

Agua Azul Panorama

Agua Azul Panorama

San Jose Rooftop Panorama

San Jose Rooftop Panorama

the next depression

i think that if all of a sudden, the economy crashed, and all we could eat were peanut butter and jelly sandwiches... it wouldn't be THAT bad.

Syndicate content