Month: June 2008

Blueprint CSS framework

Posted by – June 28, 2008

All hail the power of Blueprint. All of my new projects use it as the base for setting up the design. We used it as the basis for the redesign of ArtCal done in cooperation with Subsidiary Design.

It's the easiest grid layout CSS I have ever used, and much more convenient than YUI Grids. You also get the advantage of attractively designed fonts and sizes for all HTML elements including headers.

In anticipation of a big press release distribution announcing the official launch of Culture Pundits, I redesigned my Tristan Media LLC homepage using Blueprint, adding blocks for my three main projects. I'm using PHP with a JSON feed to rotate the featured ArtCat artist on every page load. I'm also using the Google AJAX Feed API to display recent items from RSS feeds.

Subsidiary is also working on new artist and gallery templates for ArtCat, using Blueprint.

Be careful when buying a domain on Dotster

Posted by – June 27, 2008

Yesterday, I used Dotster to buy a domain name for a new art gallery client. Their name is a Polynesian name shared with a certain beach in the Pacific, and has no hint of a porn connection, as far as I know. This is a screen grab of what Dotster put up as a placeholder page. I recommend pairNIC in the future.

dotster-porn-placeholder.jpg

Custom Drupal Modules and Views

Posted by – June 26, 2008

I'm working with a client on a Drupal site where another programmer has implemented several custom content types via a module, not CCK. I'm researching how to integrate this with the Views module, and found this useful information so far.

The hook of note seems to be hook_views_tables to get the view editing interface to know about the columns in our custom table.

Here is the start of a function to return the information to the Views module. In this example we use product_id as the primary key of our table, which is the same as the node's nid. This only exposes the name of the product to the view, but more columns and tables will be added later.

// hook to tell views about our tables
function mymodule_views_tables() {
  $tables['mymodule_product'] = array(
    'name' => 'mymodule_product',
    'join' => array(
      'left' => array(
        'table' => 'node',
        'field' => 'nid'
      ),
      'right' => array(
        'field' => 'product_id'
      )
    ),
    'fields' => array(
      'name' => array('name' => t('Product: Name'),
      'sortable' => TRUE),
    ),
  );
  return $tables;
}