Ads 468 X 60

Easy Justified Gallery – Image Gallery on the fly! (Images and Media)


Easy Justified Gallery for PHP is a super-simple PHP script that lets you create image galleries on the fly by generating a justified Image Gallery for you from any folder you choose! It also has built-in Flickr support.


This script includes many options to customize the gallery look, and can create unlimited justified image galleries on any page by just using simple PHP code.


Just two steps. Put the script folder in your web project, refer to it in your PHP file. Tell the script which URL contains the images you want to show as justified gallery. The image resizing/different thumbnails (if optimized mode is used) will be generated automatically for you! No resizing or image work needed, just works!


Additionally, you can show photos from Flickr beside Any Folder with Images.


Step 1: Include the script



  • Simply put the easy-justified-gallery folder in your web script.

  • Then include it in your project:

    include 'easy-justified-gallery/easy-justified-gallery.php';


Step 2: Tell the script to create a gallery


Just tell the script which folder contains your images. e.g.



<?php echo ejg('id=gallery1&url=http://ift.tt/1jhU9m3'); ?>

That’s it. The script will automatically create a styled, justified image gallery on page. No extra coding needed!


Built-in Flickr Support


You can dynamically show Flickr photos in justified image gallery, in this case you can just do something like:



<?php echo ejg('id=gallery2&flickr_user=38039613@N08&captions=true'); ?>

All options and customization parameters



  • id: Must be unique ID for each new gallery on the same page. e.g. gallery1, gallery2, mycustomgallery, so on. Each gallery automatically get assigned the clas ejg as parent class, and ejg-GALLERY_ID as ID/class to easily customize your skin via CSS (if needed)

  • url: A full URL to the folder containing the images that you want to create an automated justified gallery from e.g. http://ift.tt/1oO7L7L This is required so the script can prepare and make your justified gallery on page.

  • path: This is not needed if the script is able to find your absolute folder path automatically. However in some cases you may also need to put the absolute path to the images folder (not the URL) – however the script will automatically attempt to get your folder path.

  • width: The width of gallery relative to the container. By default, this is 100% (It means the gallery will take 100% of its parent container)

  • alignment: Alignment of gallery (By default: center)

  • target: _self or _blank. This is the target for image locations

  • captions: Show captions or not. Default to false (Do not show captions)

  • mode: This can be ‘hq’ or ‘optimized’. Default is hq, you can use optimized option to make a compressed/resized gallery.

  • row_height: Optimal row height, used to calculate gallery row height. Example: 120, 150, etc.

  • effect: The effect that occurs when user hovers over images, there are different effects available. Possible values are: overlay_dark, overlay_dark_icon, overlay_dark_animate, overlay_white, overlay_white_icon, overlay_focus

  • flickr_photoset: If you want to load gallery from Flickr, enter the photoset ID here.

  • flickr_user: If you want to show public photos from a specific user, enter his username or ID here.

  • flickr_num_photos: Default: 20 photos from Flickr. Adjust this number to get number of photos you want.



0 comments:

Post a Comment