Help for a Photographer Friend (Drupal 6)

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Cecily's picture

Hi all,

A friend of mine is getting into Drupal and is far more advanced than I am with customizing the system using PHP. I'd asked someone else I know with some advanced Drupal experience this question, but they weren't able to help me either, so I thought I'd post it here on his behalf.

He's a photographer, and takes both PG and more adult photographs. He wants to be able to display content based on the EXIF data in his photographs, e.g., front page, or no? Horizontal, or vertical orientation (which will determine how it displays in the theme) and to use the copyright date for on-the-fly copyright date rendering.

In his own words:

As a really straightforward example that still stymies me: I'm using a new cck content type 'picture', to which I'm attaching exif fields height and width and a 'computed field' for orientation that determines whether the picture (which may have undergone extensive cropping/manipulation since the tags were first written) is vertically or horizontally aligned. (square pix are vertical, for my purposes.)

I want the computed field to determine if the numeric content of field 'height' is greater than or equal to the numeric content of field 'width', and to assign the value of field 'orientation' appropriately.

the muddle below doesn't seem to accomplish this.

if $node->field_exif_exifimageheight[0]['value'] >= $node->field_exif_exifimagewidth[0]['value']
$node_field[0]['value'] ='vertical';
else
$node_field[0]['value'] ='horizontal';

There are probably far cleaner means to do this. One would be to add some bits to the batch functions of the imagefield import module, where image height, width and other exif particulars are already being collected. Imagefield import also seems to talk to taxonomy, and my fondest hope would be to insert model names, keywords, and gallery assignments into relevant vocabularies per picture at the import stage. Looking under the hood in imagefield import just gives me a headache, though.

Where should he go from here?

Thanks for any help you might be able to provide.

Vancouver

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: