On Drupal.ru once again raised the question of creating a gallery of "little blood" and most importantly, quickly. No claim to originality, but many are still asking. In general, this is the solution that came out.
We
install drupal , download the following modules:
cck ,
filefield ,
drupal.org/project/imagefield ,
image_fupload (read readme !),
lightbox2 ,
Pathauto ,
Token ,
TransliterationInclude:
all in CCK, except user reference, node reference, filefield meta
path
pathauto
token
imagecache
imageapi
imagefield
filefield
image fupload (cck)
lightbox2
transliteration
')
Making a couple of ImageCache presets
images150x150 (scale and crop) and image800x600 (scale)
Create a new type of material GalleryGo to field management,
create a fieldImage gallery | gallery_single | file | image
In the field settings, change the Path settings
gallery / pics / [site-date-dd] - [site-date-mm] - [site-date-yy] / [user-id]
In global settings set required, number 1
Make another field:Pile of images | gallery_pics | file | image_fupload
In the field settings, change the Path settings
gallery / pics / [site-date-dd] - [site-date-mm] - [site-date-yy] / [user-id]
In global settings we put required, count unlimited
Enable alt text settings and title text settings
Go to the display fieldImage gallery | hidden | image150x150 image linked to node | hidden
Image gallery | hidden | hidden | lightbox2: image150x150-> image800x600
Save, type of material is ready
Go to the setting of synonyms. For the type of material "Gallery" set the following value: gallery / [title-raw]
Open the css of our topic and append to the end:
.field-field-gallery-pics .odd, .field-field-gallery-pics .even {width: 150px; height: 150px; float: left; margin: 5px; }
Go to the creation of the material, create a new gallery. We are checking. Do not forget in the permissions to put the right to view-)
Actually a simple gallery is ready. The idea can be developed: add categories, tagging; turn on the Views module and make a bunch of views.
Here is a
demoScreenshots with settings:Creation of material "Gallery"Field Management (Gallery Image)Field Management (Lots of images)Field displayAdd Gallery