Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist


Simpel foto viewer php

Help keep UberGallery free for all, donate today.

Introduction

UberGallery is an easy to use, simple to manage, web photo gallery written in PHP and distributed under the MIT License. UberGallery does not require a database and supports JPEG, GIF and PNG file types. Simply upload your images and UberGallery will automatically generate thumbnails and output standards compliant XHTML markup on the fly.

Features

  • Simple first time installation
  • Database-less configuration
  • Include galleries within pre-existing sites
  • Create multiple galleries with a single installation
  • Easily customize your gallery styles via CSS
  • Install and update the gallery easily wth Git (optional)

Demo

  • 4488826 6f061c99ec b d
  • 7023222 87b23bb0cd d
  • 20952852 82e90a3b68 o d
  • 94767733 b9863ff689 b d
  • 117630263 e99fd48e32 b d
  • 144692464 f0053e1093 z d
  • 153787007 197af15ce4 b d
  • 186655895 28fc2d82ce b d
  • 187485628 3cb9d94f9b o d
  • 214879279 c937ada1d5 b d
  • 327559662 5dae865e69 z d
  • 328202856 5330fd134a z d
  • 339763584 d3511b63a3 b d
  • 354864230 a8fe1fe864 o d
  • 354864240 96e9b003cf o d
  • 382329525 bc85bc1309 z d
  • 385653748 774c009624 b d
  • 457209657 64ecc69ace z d
  • 539719106 a8ef607268 b d
  • 560380352 5353d7b089 z d
  • 634556562 034ce1ae60 o d
  • 838111057 1fe8b4aa79 o d
  • 1015023385 58ce654405 z d
  • 1060076785 48ce88e86d b d

Download Current Version: 2.4.8

Download as zip Download as tar.gz

UberGallery requires PHP 5.2+ and the PHP-GD image library to work properly.
For more information on PHP and the PHP-GD image library, please visit http://php.net.

Simple Installation

Copy resources/sample.galleryConfig.ini to resources/galleryConfig.ini and modify the settings to your liking.

Upload index.php, resources/ and gallery-images/ to your web server.

Upload images to the gallery-images/ directory.

Make the resources/cache/ directory writable by the web server:

chmod 777 /path/to/resources/cache

Open your web browser and load the page where you installed UberGallery.

Custom Installation

Copy resources/sample.galleryConfig.ini to resources/galleryConfig.ini and modify the settings to your liking.

Upload the resources/ folder to your web server.

Insert the following code into the PHP page where you would like the gallery to be displayed (be sure to change the include and image folder path to match your configuration):

<?php include_once('path/to/resources/UberGallery.php'); $gallery = UberGallery::init()->createGallery('path/to/images-folder'); ?>

Include the UberGallery and desired Colorbox style sheet in your page header:

<link rel="stylesheet" type="text/css" href="path/to/resources/UberGallery.css" />
<link rel="stylesheet" type="text/css" href="path/to/resources/colorbox/1/colorbox.css" />

Include the jQuery and Colorbox javascript files in your page header:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="path/to/resources/colorbox/jquery.colorbox.js"></script>

Include the Colorbox jQuery call in your header (below the jQuery and Colorbox javascript includes):

<script type="text/javascript">
$(document).ready(function(){
$("a[rel='colorbox']").colorbox({maxWidth: "90%", maxHeight: "90%", opacity: ".5"});
});
</script>

Upload images to your images directory.

Make the resources/cache/ directory writable by the web server.

chmod 777 /path/to/resources/cache

Open your web browser and load the page where you installed UberGallery.

Install with Git

ssh into the your server and clone the UberGallery repository:

git clone --recursive git://github.com/UberGallery/UberGallery.git /path/to/ubergallery

Copy resources/sample.galleryConfig.ini to resources/galleryConfig.ini and modify the settings

cp resources/sample.galleryConfig.ini resources/galleryConfig.ini
nano resources/galleryConfig.ini

Upload images to the gallery-images/ folder within your gallery directory.

Make the resources/cache/ directory writable by the web server.

chmod 777 /path/to/resources/cache

Open your web browser and load the page where you installed UberGallery.

When using this method to install UberGallery, you can update your installation by running the following commands:

cd /path/to/ubergallery
git pull origin master

NOTE: If you are installing UberGallery via git into an existing git repository, you will need to add it as a submodule.

git submodule add git://github.com/UberGallery/UberGallery.git path/to/ubergallery
git submodule update --init --recursive path/to/ubergallery

Troubleshooting

Pages / Images Loading Slow or Not at All

If pages are loading slow or not loading at all, ensure your images are not too large. We recommend 1024px - 1280px for the longest side. Large images can slow down page and/or image load times or considerably.

If you have too many large images to resize one at a time here are a few batch image resizing tools:

Other Issues

Here are a few additional troubleshooting tips:

  • Verify that you have PHP 5.2 or later installed. You can verify your PHP version by running:

    php --version
  • Make sure you have the latest version of UberGallery installed.

  • Replace your galleryConfig.ini with sample.galleryConfig.ini to ensure proper configuration:

    rm resources/galleryConfig.ini
    cp resource/sample.galleryConfig.ini resources/galleryConfig.ini
  • Clear your cache and make sure the directory is writable by the web server:

    rm -f resources/cache/
    chmod 777 resources/cache
  • Enable debugging by setting the enable_debugging option in resources/galleryConfig.ini to true, try loading your gallery in a web browser then inspect the debug.log file in your cache directory for any errors.

If you continue to have issues, send us an email explaining your issue.


Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 83
50 Excellent Image Galleries You Can Use Today - TutsPlus Code
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 45
10 Best Free and Open Source PHP Image Galleries - Updated
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 64
Preview: A very simple php javascript image viewer Random
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 83
ImageGlass - A lightweight, versatile image viewer
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 89
Highslide Image Viewer - SMF Customization
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 25
JQuery image viewer Plugins jQuery Script
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 71
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 66
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 66
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 28
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 87
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 3
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 13
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 78
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 14
Simple Image Viewer Using PHP - Tutorial - Tech-Evangelist 12