Copyright 2000-2002 Daniel M. Lowe
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
A copy of the GPL can be found at http://www.gnu.org/copyleft/gpl.html
Mig requires a web server which supports PHP [ http://www.php.net/ ]. At least PHP 3.0.6 is required, or any version of PHP4. The development platform is Apple OSX, so the code tends to assume a unix-like environment. As such it may or may not work (and has not been tested by the author) on non-unix-like platforms. Mig has been tested with Apache (and reportedly it works with Microsoft's IIS server).
Windows users, please see the section labeled "Running Mig Under Windows" below.
The mkGallery.pl utility requires Perl [ http://www.perl.com ]. To generate thumbnail images, it also requires ImageMagick [ http://www.imagemagick.org/ ]. Neither are required to use Mig itself.
The jhead utility which is called by mkGallery.pl for EXIF header parsing is a C source code file - it must be compiled before use. On most unix-like systems this is as easy as going into the jhead directory and typing "make".
Windows users can download the pre-built jhead program from Mathias Wandel's site at http://www.sentex.net/~mwandel/jhead/
See the "utilities" document for more information about mkGallery.pl and jhead.
PHP-Nuke, PostNuke, PHPWebSite and PHPWebThings users: see the phpnuke document.
Read this section if you are installing Mig for the first time. If you are upgrading, skip to the next section which deals with upgrading.
People Family Friends The_Zoo Dolphins Bears Lions Cars
Notice that I used an underline character in The_Zoo. Mig will display that as a space, so the album will be called The Zoo as far as visitors will know. This makes things simpler since some systems make using underlines in directory names unfriendly.
The above example ends up being these eight gallery folders:
People People : Family People : Friends The Zoo The Zoo : Dolphins The Zoo : Bears The Zoo : Lions Cars
Mig supports JPEG, GIF and PNG files. So files with any of these extensions will be recognized:
.gif .png .jpg .jpe .jpegPoint your web browser to the newly-installed Mig and browse away! If you can run Perl scripts on the commandline on your server, and you have Perl and ImageMagick available, use mkGallery.pl to create thumbnail images. See the utilities document for more information on how.
You should create a utilities subdirectory in your Mig installation and copy mkGallery.pl there, as well as jhead if you plan to use jhead. If Perl is somewhere other than /usr/bin/perl on your system you may need to modify the first line of mkGallery.pl to reflect the proper location of Perl.
If you can't run Perl scripts, you can make your own thumbnail images in whatever way is handy for you (an image editing program, for example). In each album folder, create a subdirectory called thumbs, and put thumbnail images inside. A thumbnail should have the same filename as the full-size image it represents.
The thumbnail subdirectory is thumbs by default, but this can be
customized (see the $thumbSubdir
option in config.php).
If you are upgrading from a previous version of Mig, follow these steps:
If you want mkGallery.pl to be able to use jhead, put jhead in the utilities subdirectory of your Mig installation with mkGallery.pl.
Mig can run under Windows (so I'm told) as long as the web server supports PHP. The Windows version of PHP is available from http://www.php.net/
Mig is reported to work with IIS, Personal Web Server, and the Windows port of Apache. One user noted that a fairly recent version of PHP is needed for it to work, so if you're having trouble, make sure you're using the most recent release of PHP.
Another user reported that having a comma (,) in the directory name of any album would cause problems, so avoid using commas.
I've had reports that Windows text editors leave files without trailing end of line characters, which apparently confuses Mig. If you're editing files in a Windows text editor (such as mig.cf files), you may want to leave one blank line at the end of the file, just so there's at least one end of line character after the last "real" line.
If you want to see an example gallery (that is, install one on your system and examine the files that it contains), you can download one from the Mig project page at http://sf.net/projects/mig/ (look in the "Extras" section in the project files listing). After downloading the file, unpack it in the albums sub directory and it should appear as "Mig Example Gallery".
You can see a list of sites using Mig at: http://mig.sf.net/users.php
If you'd like to list your site there, email me: at dan@tangledhelix.com
A per-folder custom template can be used in any given folder. See the
FolderTemplate
section of the mig_cf document for more information.
Comments are shown in a box below the image in image views. In
thumbnail views, they are shown as the ALT tag text. (That behavior can
be suppressed by setting $suppressAltTags
to TRUE
in config.php).
As an example, let's say you have files house.jpg, car.gif and dog.jpg. Let's say you wanted a comment on the house and the dog, but nothing in particular to say about the car. Add this to mig.cf:
<Comment "house.jpg"> This is my house, which I bought in the fall of 1998. </Comment>
<Comment "dog.jpg"> This is the dog we had when I was growing up. She was a lot of fun! Sadly, she died when I was 12 years old (she had cancer). We had other dogs afterward, but none of them were as much fun. </Comment>
(mkGallery.pl users, see the -c
option which handles comments.)
The description can be multiple lines, as long as it's enclosed inside the <comment>...</comment> structure. Tags such as <comment> must be at the start of a new line.
(If you want to use shorter comments for thumbnail hover-overs and leave your longer comments only on the image page itself, see the mig_cf document and read about <Short> tags).
EXIF data generally contains information such as shutter speed, aperture, ISO rating, the original shooting date and time, and sometimes comments. Mig can read some, but not all, of this data. Future versions of Mig may understand more of the data than it currently does.
By default Mig only shows embedded comments. To show more, adjust the
format string $exifFormatString
found in config.php. There are
examples in that file that explain how the formatting works.
Note that most graphic editors destroy EXIF blocks! They don't know how to write them so when they save images, they are simply not written back into the file.
See config.php.default for more information - Mig now supports English, French, German, Norwegian, Portugese, Finnish, Romanian, Russian (Windows-1251 and KOI8-R), Turkish, Swedish, Danish, Italian, Spanish, Slovak, Dutch, Polish (including an ISO-8859-2 version), Estonian and Japanese (ISO-2022-JP).
It's also possible to use multiple languages with Mig, although you must
pick one to be the default language - that is the one you define in
config.php in the $mig_language
variable. To change the language,
simply add the parameter mig_dl=LANG
to a URL as a parameter. For
example, take this URL:
http://mysite.com/gallery/index.php?currDir=./MyStuff
Assuming the default is something else, you can tell Mig to display it in Spanish by doing this:
http://mysite.com/gallery/index.php?currDir=./MyStuff&mig_dl=es
To do this at the root of your page (i.e. to have links to your site in different languages for example) you can do this:
http://mysite.com/gallery/index.php?mig_dl=no (Norwegian)
http://mysite.com/gallery/index.php?mig_dl=fi (Finnish)
http://mysite.com/gallery/index.php?mig_dl=ro (Romanian)
$imagePopup
option in
config.php).
This can be controlled using two options in config.php:
$maxThumbColumns
and $maxThumbRows
. Their names are
self-explanatory. Set $maxThumbColumns
to the maximum number of columns
desired (how many thumbnails across from left to right in one row). Set
$maxThumbRows
to the maximum number of rows per page/screen. The
defaults are 4 columns and 5 rows (for 20 images per page).
$randomFolderThumbs
to TRUE
in config.php.
(See also $folderNameLength
and $useRealRandThumbs
.)
If the folder itself contains only other folders, and no images, Mig will traverse subdirectories until it finds a usable thumbnail to use as an icon. So the only time the generic icon will be used is in a situation where there is a folder that contains no thumbnails, whose subfolders and their subfolders, etc, contain no thumbnails. In other words, only a useless folder branch would result in the generic folder icon being shown.
UseThumb
option in
mig.cf files. See the mig_cf document for more information.
If you can't do it that way, don't despair - you can make your own thumbnails in any image editing program. Earlier in this document are instructions on how to name the files and where to put them.
error_reporting
set
incorrectly in the PHP configuration in your web server. Put this line
near the top of index.php (but not before the "<?php"
line at the top).
error_reporting (E_ALL & ~E_NOTICE); // for PHP3 systems
error_reporting (2039); // for PHP4 systems
To report a bug, or view existing bug reports, go to:
http://sourceforge.net/tracker/?group_id=24365
To request a feature, or view existing feature requests, go to:
http://sourceforge.net/tracker/?group_id=24365
http://lists.sourceforge.net/lists/listinfo/mig-announce
http://lists.sourceforge.net/lists/listinfo/mig-users
http://lists.sourceforge.net/lists/listinfo/mig-devel