Drupal: Display checkboxes with Images in a Form

Drupal, PHP

A few months ago, I was working on a Drupal module where I wanted to display form that contained a list of checkboxes and images that would allow the user to choose the images that were to be displayed in a block. Surprisingly, it really wasn’t that difficult.

Continue reading

Checkout My New Site - T-shirts For Geeks

Relative Image Paths in Drupal

Drupal

I’m working on a project that uses Drupal and I wanted to add a few images to the home page.

First I created the folders files/images under the root directory. I then created the home page (Create Content->Page). When adding images to the home page, the file location is relative to the root directory:

<img src="files/images/flash1.jpg" width="168" height="112" class="imageFloatLeft">

But when I created another Drupal page (a page other than the home page), the relative path for the image is different:

<img src="../files/images/flash1.jpg" width="168" height="112" class="imageFloatLeft">

And when I created a page using Drupal’s Panels Module, the relative path for the image is once again relative to the root directory:

<img src="files/images/flash1.jpg" width="168" height="112" class="imageFloatLeft">

Adding content to Drupal seems to be fairly straightforward, but I did struggle a bit as I tried to figure out the relative paths of images/files so I hope this helps anyone else who may be struggling.

Checkout My New Site - T-shirts For Geeks

Photoshop: Web Photogallery

Photoshop

In the past, one of the more tedious tasks of web design was creating the thumbnail and large view images for a photogallery. I would open an image in a graphics editor, adjust the size to create a thumbnail image, save, re-adjust the size to create a large view image, and save again. I would repeat these steps for each image of the photogallery. Depending upon the amount of images, creating a web photogallery could take quite a long time.

Quite a few years ago, I began to use Express Thumbnail Creator to create the images for a photogallery. The tool can be used to make web photogalleries, but I only used it to create the thumbnail and large view images. I would select a source folder (or select multiple images), set the width or height for both the thumbnail and large view images, and then let Express Thumbnail Creator generate the images in batch mode. It would reduce each image according to my specifications in a fraction of the time that it took me to manually reduce each image.

Over the last few years, my Mac has become my primary computer. Because Express Thumbnail Creator does not have a version for the Mac, I began to explore other ways to quickly adjust image sizes for a photogallery. Little did I know that Photoshop has the capability of creating a web photogallery.

  1. Open Photoahop and then open all of the images that you want in your photogallery
  2. Select File->Automate->Web Photogallery and the Web Photo Gallery Dialog appears.
  3. You can select a style for the photogallery, but I only use it to adjust the image sizes in bulk, so the default style is fine.
  4. Select the source and destination folders
  5. Under “Options”, select “Large Image” and set the image size and quality. You can also choose whether to constrain the height, width, or both.
  6. Under “Options”, select “Thumbnails” to set the max width.
  7. Click “OK” to create the photogallery.

Easy enough.

Checkout My New Site - T-shirts For Geeks