How to create custom Photo Gallery in Drupal.

In this tutorial I will explain how to create customized Photo Gallery in Drupal in 5mins.
First of all we will need to download and enable following modules:

*We must enable one of one of its toolkits (GD or ImageMagick).

First we will go to Site building -> Image Cache -> Add new preset.

 

 

In here we will add action to create thumbnail images. We will call it gallery-thumbs. In there we add action "Add scale and Crop" becouse we want all thumbnails to have same size. Put width and height for thumbnail images. We added 125x95.

Afterwards we will create new Content Type called "Photo gallery" with machine name photo-gallery.

Next we add field called Photos of type File Upload and widget Image. In field settings under Global Settings we put Number of values to unlimited.
Then we go to Display Fields settings and under Full Node we select "Lightbox2 gallery_thumbs->original". This will display thumbnails instead of original images and when clicked will open original image using Lightbox.

In the next step we need to create node-photo_gallery.tpl.php in our theme. Note that in theme folder you must also have node.tpl.php otherwise our custom template won't work. In there we add following code:

 

 

In the last step we create new node of type "Photo Gallery" and start uploading images. We will get gallery that looks like this: