TFT-Gallery Manual



1. Introduction

2. Installation
   2.1 Where to get TFT-Gallery
   2.2 Requirements
   2.3. Step-by-step installation

3. Using TFT-Gallery
   3.1 Features
   3.2 Config.inc reference
   3.3 Customizing a subfolder
   3.4 Styling guide

4. Troubleshooting

5. Credits & License




1. Introduction

TFT Gallery is a PHP-based Web image gallery. The project has been started by me because I've needed a simple, easy to handle gallery. All the galleries I've found in the web either needed a database or missed some important features.
After the first release on freshmeat.net, I got a mail from Mike Scalora, who had some very good ideas how to improve TFT-Gallery and added some nice features, too. He joined the team, and now we both work together to make TFT-Gallery the best gallery ever ;-)

2. Installation

2.1. Where to get TFT-Gallery

The easiest way to get TFT-Gallery to take a look the
homepage. Or get the files directly from Sourceforge.net.
Which way you may prefer, make sure that you always get the latest version, to take advantage of all the new features!

2.2. Requirements

There aren't much things you need to run TFT-Gallery:
  1. PHP 4 (or higher)
  2. GD 2.0 (support for GD 1 is planned but not implemented yet)

2.3. Step-by-step installation

  1. Download and unpack package:
  2. Download the actual version of TFT Gallery from our website and unpack the package.

  3. Edit config.inc:
  4. Most important are $album_directory and $thumb_directory. This variables tell the script where to find the pictures ($album_directory) and where to create the thumbnails. Have a look at
    '3.2. Config.inc Reference' for a complete reference of the configuration-file.

  5. Upload the files:
  6. Upload all the files from the package to your website.

  7. Create the directories for the albums and the thumbnails:
  8. Create these directories as subdirs of the directory, you've put in the script. Defaults are 'albums' and 'thumbs'.

  9. Make sure the script has write-permission to the thumb_directory:
  10. This is a very important step, otherwise the script cannot create the thumbnails and you get a lot of errors.

  11. Create your albums and upload your pictures:
  12. You can now make new albums/categories by creating subdirs in your $album_directory. If you put a 'description' plain-text-file in an empty dir the script will show this text when you navigate to this album.


3. Using TFT-Gallery

3.1. Features

If you miss an important feature, submit a Feature-Request on Sourceforge.net.


3.2. Config.inc reference

$album_directory The relative path to the directory in which the pictures are stored.
$thumb_directory The relative path to the directory where the thumbnails are created.
$thumb_height, _width, _quality Define the maximum dimensions of a thumbnail. The thumbnails don't lose the aspect ration when scaled down. The quality is a number between 0-100 (100 is best quality).
$rows_per_page, $pics_per_row How many rows and columns should the thumbnailview have.
$show_filenames_with_thumbnails Show the filennames under the thumbnails? Can be true or false.
$max_picture_height, _width Here you can define the maximum size of the pictures that will be shown. If the original picture is bigger than these values it will be scaled down and a link to the fullsize picture will appear under the scaled down one. Very usefull, if you want to make sure that the picture fits into the browser-window.
$standard_style The name of the css-file you want to use.
$language Defines which string.inc should be included. Set to 'en' to include 'string.en.inc'.
Note, that this setting is should not be taken for granted. If the user configured his browser to get some other language, and you provide the right strin.*.inc then this language is used.
$pic_extensions Defines, what types of files should be displayed as thumbnails
$other_extensions What other files should be displayed through default thumbnails?
$gd_available Select which version of GD is enabled on your web server:
0: no GD at all; You have to create the thumbnails by yourself
1: GD 1.x; Not so nice thumbnails
2: GD 2.x; Nice looking thumbnails (default)
$thumb_map This option maps the filetypes to the default thumbnails.


3.3. Customizing a subfolder

album.css and album.inc:

You can override the global settings from style.css and config.inc for each subfolder by just adding a album.css and/or a album.inc file into this directory.

description, description.txt and description.html:

If you add one of this files to a subfolder which doesn't include any files (but as many subdirectories as you like), this file will be shown. This can for example be used as albumdescriptions etc.


3.4. Styling guide

You can change the complete appearance and even the layout of your gallery by editing 'style.css'. A good reference is
HTML Utopia: Designing Without Tables Using CSS. And have a look at the additional style-files to get an impression on how to style your gallery to your needs.
Maybe I'll write a Howto on this topic some day but for now you are on your own... If you've created a new style and want it to be included in the next release, send it to me.

4. Troubleshooting

Before you move on, make sure you have the latest version of TFT-Gallery which includes all the new bugfixes.
If you have trouble with TFT-Gallery feel free to
send me a mail.

5. Credits & License

TFT-Gallery is developed and maintained by
Mike Scalora (mscalora@users.sourceforge.net) and Jan Berndt (jan_berndt@users.sourceforge.net).

This program is released under the terms of the GNU Gereral Public License.