Saturday, March 20, 2010

1st try with the Admin theme

I checked out the admin module ( http://drupal.org/project/admin ) last night on a side project I've got - I think I like it.

It reorganizes your admin menu structure into groups which are more sensible, and looks really nice if you're using the rubik theme ( http://code.developmentseed.org/rubik ). Rubik is a subtheme of Tao ( http://code.developmentseed.org/tao ).

Both the admin module and it's accompanying themes were created by Development Seed, may they live forever.

So here's the process I followed to get them set up:

  1. install the module
  2. install the two themes
  3. enable all the module and the themes
  4. Try to set the admin theme to Rubik by visiting /admin/settings/admin on my site.
  5. Discover that with the admin module turned on, it appears that /admin/settings/admin doesn't work at all.
  6. disable admin module
  7. visit /admin/settings/admin to set rubik as the admin theme
  8. re-enable admin module
  9. admire pretty new admin screens and nicer information architecture.
  10. feel sad that my themes are so incomplete and not pretty
  11. start thinking dangerously about starting a new theme for UNT based on Tao.
Admin module appears to be the next best thing to Drupal 7's usability improvements for Drupal 6. Try it out. Watch out for the /admin/settings/admin bug, in case it bites you.

Friday, March 19, 2010

Building a feature

I'm building a person directory that ought to be reusable across various projects. My goal through this process is to document the building of a feature, including the content type, views, context, etc.

So far, my team and I have created a CCK content type that contains the following fields:

  • First name
  • Last name
  • Job title
  • Head shot
  • Email
  • Office Hours
  • Phone
  • Location
  • Website(s)
  • Bio/description
Once that's created, we need a listing of people. Be sure to name the view something descriptive ( in my case, peopledirectory ) and put a note on it to describe what it is.

Once you're in the view editing screen, ( /admin/build/views/edit/{viewname} ), you have to do a few things to get started. These steps are pretty much true for any view you create...
  1. Set a couple of filters, especially the 'public or admin' filter, plus one for the specific content type that you are creating a list for.

    There may be other filters depending on what your view is meant to accomplish...in my case, filtering for published/admin and for content type were sufficient.

  2. In the Basic settings box, choose whether you want your view's row style to be a set of fields, or full node. Node-based views will run through the Drupal theme layer and respect any theming you've done for that content type. In my case, I want to theme them specifically, so I choose 'node'.

  3. Also under Basic settings, you can select how many items should be on the list, whether to use pagination controls, header and footer text, etc.

  4. Next, I made a new display for my view - a page display that can be visited at a specific URL on my site. Once added, choose a path for your page view under Page options and set any specific sorting or additional filter criteria that you might want this page to have.

    Display-specific sorting, filters, or other settings can be set as overrides to the default view, or they can update the entire view. Think about how specific you need to be, and if there will be multiple displays of this view with different filters, sorting, etc. that need specific overrides.
With a view set up to list your records and sort them properly, you can move on to theming your view to your liking.

*Update*

After posting this yesterday, I did a few other things:
  • I used the ImageCache module to resize images as they're uploaded to generate thumbnails or other form factors as appropriate for the theme

  • I themed the view by using a node-view-viewname.tpl.php file, where viewname is the name of my view. my view was called node-view-PeopleDirectory.tpl.php.

    Important tip: This works whether or not you're in 'node' or 'fields' display type. It appears that the node-whatever supersedes the views tpl files to some extent. More research needed on this...

  • I themed the content type a little bit using node-person.tpl.php

  • Last, I used the features module to package the content type, view, and ImageCache presets into a tarball that can be reused across sites. I imported it into another development site I was working on, and the content type came in fine, but the view did not. Guess I'll have to try again Monday to see what I did wrong.

Monday, March 8, 2010

wireframing

Most of my day is spent taking a bunch of ideas and turning them into a finished product. Many times, this involves making prototypes of the desired outcome so that my team and I can communicate with one another about what we're trying to achieve.

As my team and I grow together, one of the things I've identified is that I'm not always able to communicate what's in my head, how I go about my work, etc.

That's natural, I suppose, since I've been growing into my own skill for over a decade. I can't remember how I acquired this or that skill most of the time, and I've thrown my team for a loop several times by telling them to 'go make a wireframe'.

One of the resources that taught me to wireframe or prototype what should be on a page is this article by 37signals' Lead UI designer, Ryan Singer ( twitter ). Well worth reading.

In the article, Ryan walks through the design of a 'My account' page. Even though he's handling little bits of information, the same process applies to a landing page assembling various kinds of content for various audiences to navigate.

He uses several steps to achieve his finished product:

  1. List your bits
    You have to know what content you're handling.

  2. Figure out what bits relate to one another
    How does your content group itself Some things are related, some aren't.

  3. Prioritize
    What's most important? What's the next thing after that?

  4. Design each chunk
    Design could mean scribble a quick solution. or it could mean sit down with a graphic designer. You decide.

  5. Put the chunks together
    With all the important things decided, you can now arrange your page based on priorities and relationships.

  6. Make it real
    This will usually involve a code monkey, unless you are one.
So the main thing here is knowing what content you want to showcase - in my case that means knowing:
  • what content you have
  • what content you wish you had
  • what other resources are available
Sometimes you need institutional history to get the full picture, but basically, if you know waht content you're handling, you can
  • group it
  • prioritize it
  • then put the most important thing front and center.