Welcome to Gallery 2.0 (G2). This is the fourth and final
“Alpha” release of G2, code named “Nice
Commits”. Please read through this document carefully
before installing G2 and before asking for help. We have taken
care to try to answer as many of your questions here as
possible. If you don't read this and have problems, we may
refer you back to this document as a first resource.
Contents
If you’re impatient like us, you just want to get going.
The odds are that your system is mostly all set to handle G2 so
just skip right to the installer and start clicking. It should
walk you through everything you need to get going. But before
you do that, you should really read the When to use G2 Alpha and When not to use G2 Alpha sections!
But if you hit a snag, please come back here and read
more before asking questions! Enjoy.
Gallery is a web based software product that lets you manage your photos
on your own website. You must have your own website with PHP support in
order to install and use it. With Gallery you can easily create and
maintain albums of photos via an intuitive interface. Photo management
includes automatic thumbnail creation, image resizing, rotation, ordering,
captioning, searching and more. Albums can have read, write and caption
permissions per individual authenticated user for an additional level of
privacy. Give accounts to your friends and family and let them upload and
manage their own photos on your website!
An Alpha version or Alpha release is the first official release
of a product. An Alpha release is usually unstable, contains
both known and unknown bugs, and is missing some intended
features. We release it early so that you can see what is
coming and give us feedback that will help us improve the final
release.
-
Web server that can run PHP (Apache 1, Apache 2, IIS, Zeus, etc)
-
PHP version 4.1.0 or more recent (including PHP 5).
Note: safe_mode must be disabled!
-
One of the following databases: MySQL 3.x, MySQL 4.x, PostgreSQL 7.x, Oracle 9i or 10g
-
One of the following graphics toolkits: NetPBM 9.x or newer, ImageMagick 5.x or newer, GD 2.x or newer (or else you get no thumbnails!)
You should install G2 Alpha to try it out. You could install it
next to your production version of Gallery 1.x in a hidden
directory. You could install it on a development server. We
want you to try it, test it, break it, and tell us all about it.
Get your friends and colleagues to poke around. However, please
be prepared to delete your G2 Alpha installation and all of the
data at any time and start over from scratch. You can use the
migration module to import a few of your G1 albums into G2 for
test purposes (this shouldn’t affect your G1 installation at
all).
Do not use it as the main repository for your data. Do not use
it for a production web site. We will probably not provide an
easy upgrade path to the next release until we reach beta. We
know that it’s much better than G1, and it may be tempting to
just replace your G1 with it. But be warned that we know that
the database schema will change between now and beta and
we won’t support upgrading your G2 Alpha data so if you use it
in production, you’re on your own.
Warning!
G2 has not yet been subjected to a rigorous security audit!
While we have taken great pains to make sure that it is
secure, there is still the chance that there are some big
security holes in it that might cause you trouble. If you
find a security flaw, please contact us at gallery@menalto.com
right away!
G2 has been redesigned from the ground up and is database driven! It is secure,
scalable, reliable, modular, customizable, portable and intuitive. In short,
we looked at all the things we did wrong in G1 and we did them again the right
way. Two years of design and development have gone into G2. It’s got customizable
themes and layouts using XHTML compliant templates which makes it much easier
for you to personalize your G2 install. All the cool bells and whistles are
in modules that can be enabled separately for maximum control.
Highlight of changes in Gallery 2 Alpha 4 (Nice Commits)
-
-
Upgradeable Core and Modules - At long last we
support upgrading from one version of G2 to the next.
Unfortunately, this may not work reliably for all version
before Alpha 4, so we recommend that you reinstall Alpha 4
from scratch just to be sure.
-
Module Uninstall - You can now completely uninstall a
module and then delete it from your Gallery 2 installation.
-
Installer Improvements
-
The interface for installing modules is now much easier to
use. It shows you all the modules and lets you select the
ones you want to install, and lets you repeat the process
as often as you like.
-
Added better instructions and examples for several steps
that were confusing (your user feedback at work!)
-
The installer now works on browsers that don't allow
cookies.
-
User Interface enhancements - Some changes in our
main layout place the most important system links on top of
every page (Site Admin, Login, Logout, ...). This gives you
easy access to these commands. The sidebar has some improved
functionality, like a direct login form and some more details
on your cart and members (if those modules are active). This
is another step towards a "block" system where modules can
provide any amount of blocks of information to be placed in
the sidebar.
-
Navigation - It's now easier to navigate around Gallery.
Meaningful "back" links will bring you back to the last last
visited pages, e.g. it's now possible to visit the Site Admin
while editing an album and have an easy way to return.
-
Random Highlight - New module allows albums to
periodically change highlight, selecting randomly from
the album's items.
-
WebCam - New module creates items that
periodically refresh the image from an external URL.
-
Thumbnail Page - New module gives more control
over thumbnails for movies and documents. For multipage
documents (like PDF/Postscript) or images (like multiscene
TIFF) you can pick the page number for the thumbnail (Note:
PDF/Postscript require both ImageMagick and Ghostscript).
When used in conjunction with the Ffmpeg module you can
pick a time offset for generating thumbnails for movies.
-
Graphics Toolkits -
-
The ImageMagick and NetPBM toolkits have been optimized
to make fewer calls to external binaries when used for
multiple operations. For example, cropping and resizing
to make a thumbnail now requires only a single call to
"convert" with ImageMagick.
-
We now preserve extra operations (like crop settings) on
thumbnails when moving an item between albums or
rebuilding thumbnails.
-
Added ability to set toolkit priority. This means you
can activate multiple toolkits to support more mime types
but still select which toolkit is used in cases where
multiple toolkits support the same type.
-
Added support for ImageMagick 6.1.x
-
Sort Order - "Default sort order" and "Manual sort
order" are now separate choices, allowing albums to properly
inherit the site default for sort order; Ascending/descending
is disabled for these choices.
-
New Items - New module shows "new" and "updated"
images next to appropriate images and albums, and adds a new
sort where new items are shown first followed by other items
sorted by view count.
-
SMTP Authentication - We now support sending email
via a SMTP server that requires user authentication. Any
module that sends email (like the registration module) can
take advantage of this support.
-
Embedding G2 - We've made great improvements in
embedding Gallery 2 into other applications. We've
successfully (though not completely) embedded it into Xaraya
and have begun working on other platforms. There's now a
rudimentary document to
explain how to do it.
-
Thumbnail Creation - We now let you create thumbnails
at upload time, which greatly improves performance the first
time you view an album. It's optional, but on by default.
-
Improved Error Pages - We now show you a nice error
page when two simultaneous and conflicting changes happen.
This new page explains how to resolve the problem.
-
Members - We now show a list of the recent
changes that a user has made, and let you page through the
entire list of changes.
-
Removed IE7 - We were experimenting with IE7,
a compatibility layer in Javascript reduces some of the
incompatibilities between IE6 and other browsers. However we
were not able to get the performance and reliability that we
needed so we've decided to abandon using it (at least for now).
-
Localization - Gallery 2 is now translated into 18 languages, though only
German, Danish and Swedish are over 50% translated. We can
use your help!
-
Bug fixes - Many bugs closed!
Highlight of changes in Gallery 2 Alpha 3 (Farva)
+
-
Watermark Support - We now support image
watermarking. You can add a watermark to the thumbnail,
resize or full sized version of an image using a DHTML
drag-and-drop interface.
-
Oracle Database Support - The installer now offers
Oracle (version 9i and higher) among the supported database types.
-
Module Manifests - All modules now come with a
manifest file, and the installer checks to make sure that
you’ve got a complete set of files on the server.
-
Auto Completion - the Site Admin user and groups
pages, and the permissions pages now perform appropriate
completion for you. Just type a few characters of the
username you’re searching for and it’ll give you up to 10
possible matches. Tested on Firefox, but not extensively
tested on IE yet.
-
New version of IE7 - We’re experimenting with IE7,
a compatibility layer in Javascript reduces some of the
incompatibilities between IE6 and other browsers. The older
version caused weird problems with images getting overlayed
with a red X, or IE6 crashing.
-
Migration improvements -
-
We now properly migrate item owners
-
We now preserve the order of imported subalbums
-
G1 summary and description fields are now transposed on
import so that the G1 "summary" (which was shown inside
the album itself) is now the G2 "description" and vice
versa.
-
CMS Integration - Although this is not yet readily visible, a
great deal of work has been done on getting G2 ready to integrate into
external content management systems. We’ve successfully done partial
integrations with Xaraya and Drupal, with more on the way.
-
Square Thumbnails - We fixed a noticeable bug where
the first time you viewed a square thumbnail it might appear
distorted (this was mentioned in the "known bugs" list of the
alpha-2 release).
-
Zip Cart Plugin - You can now download the contents
of your cart as a zip file.
-
User Albums - You can use the new User Albums module
to automatically create a new album for a user whenever you
create a new user.
-
Installer - Many minor tweaks including adding more
install checks to make sure that your system is OK.
-
Members - The members module now has privacy settings
so that you can prevent the unauthorized from seeing your list
of members, and/or their email addresses.
-
Bug fixes - Many bugs closed!
Highlight of changes in Gallery 2 Alpha 2 (Grand Theft Photo)
+
-
User Interface - Many small and large user interface
improvements. Made the XHTML more standards compliant and
used less divs in favor of more sensible tags (like h1, h2,
etc).
-
Performance - Significant performance increases in
general, and especially for image views. This also reduces
the overall load on your system when (for example)
viewing a page with 9 thumbnails on it.
-
Installer - The installer now installs the core
module for you, as well as allows you to optionally install
other modules right away instead of having to do it later via
the Site Admin.
-
Custom Fields - New custom field module allows you to
define global and per-album custom fields for your item meta
data.
-
Java Upload Applet - New upload option where you can
drag and drop files onto an applet and G2 will upload them for you.
-
GD Graphics toolkit - Implemented GD based graphics toolkit. This enables
use of PHP’s built-in imaging functions for thumbnails, resizes,
cropping and rotating. Requires GD 2.0 or newer. No external binaries
needed.
-
Square Thumbnails - New module that allows you to
specify that all gallery thumbnails have a 1:1 aspect ratio
-
Imageframe module - This module allows you to apply
frames to your photos and albums in the Matrix and Hybrid layouts.
-
Self Registration module - Allows guests to register
for their own account in your G2.
-
Language selection - There’s a new box in the sidebar
where guests can choose their preferred language
-
Nokia Mobile Phone Uploader Module - Upload images to
your G2 from your mobile phone!
-
Migration module - We now import G1 permissions, and
allow you to choose the source encoding (character set) of
your Gallery 1 so that we can convert it to UTF-8 as part of
the migration. We now also track where your G1 albums wound
up in G2 so that you can create an .htaccess file in your G1
to redirect G1 URLs to G2, for ease of migration.
-
Gallery Remote - GR now supports creating new G2 albums.
-
PHP5 Support G2 has been tested on PHP 5.0.1 on
FreeBSD and Linux.
-
Bugs - More than 31 bugs closed since Alpha 1.
Highlight of changes in Gallery 2 Alpha 1 (Cowbell)
+
-
Latest Version -
There are two ways to get the code.
-
Tarball - You can download a prepackaged file as a
tarball or a zip file from SourceForge.
-
CVS - This is a better way to get the latest code,
but it’s for advanced users. Follow the CVS instructions to obtain the latest G2
code. It’s easier to stay up to date with this method since
you can run one command and get the latest code at any time.
-
Storage - Create a directory for gallery to store
photos. This must be writable by the web server, but for
security reasons we suggest that you do not put it in the web
root. If you put it in the web root, then anybody can get
directly to your images with their web browser which
circumvents G2’s security.
Unix Example
% cd $HOME
% mkdir g2data
% chmod 777 g2data
Windows Example
C:\> mkdir g2data
In the Unix example, you may note that modes of 777 on your
g2data directory are not all that secure. However, making it
more secure depends on how your system is configured. Talk
with your system administrator about ways to change the
permissions on that directory to make it so that Gallery can
still write to the files but that others can’t.
-
Database - Right now we support MySQL, PostgreSQL and Oracle. MySQL is generally faster than
PostgreSQL. We require you to create the database yourself.
In our examples below, we’ll be creating a database called
gallery2. You can use any database name that you
choose.
MySQL
mysqladmin -uroot create gallery2
mysql gallery2 -uroot -e"GRANT ALL ON gallery2.* TO username@localhost IDENTIFIED BY 'password'"
- Choose your own username and
password
-
If MySQL denies you access, try adding "-p" right before the "-e "
PostgreSQL
createdb gallery2
Oracle
create database gallery2 {additional parameters};
-
Graphics Toolkits - G2 works with NetPBM, ImageMagick or GD. They’re all equally good,
though some say that NetPBM has slightly better quality and
that ImageMagick is slightly faster than NetPBM. GD is the
fastest and is compiled into PHP by default if your PHP is
4.3.0 or more recent, however it may not have support for all
image types (e.g. it might not have JPEG support). If the
binaries for NetPBM and ImageMagick are installed in default,
or standard, locations then G2 will auto-detect them during G2
installation. It won’t cause any harm to enable all of
these toolkits—in fact you’ll get the widest file
type support if you do so.
Open up your web browser and browse to the G2
install directory. G2 will walk you through the process of
validating that your system is properly configured and will set
everything up for you.
-
Authenticate - You will be asked to create and save a
small text file in order to authenticate. You may not proceed
until you do this. That’s how G2 knows that you’re authorized
to use the installer.
-
System Checks - The installer checks your system to
make sure that it will support G2.
-
Admin User Setup - You are prompted for an
administrator username and password. In this alpha release the
default Admin username is set to admin and
cannot be changed during the install process(though you can
change it to something else later on). Type in a password and
type it again to validate it. Then click ’Create’ to create
the admin user for this installation of Gallery 2.
-
Storage Setup - Read the instructions on the
installer to set up a storage location for Gallery 2. This is
where G2 will store all of your images, as well as other cache
information.
-
Database Setup - Select your database type and enter
your database authentication information.
-
Create Config File - G2 will create the
config.php file in your G2 directory. This contains
all the answers you’ve provided in the installer and is
necessary for G2 to function properly.
-
Install the Core module - Here’s where we create all
the database tables and initial users and albums to get you
started. Unless something goes wrong, there’s nothing for you
to do here.
-
Install other modules - G2 has lots of different
modules that provide useful functionality. Choose which ones
you want to use. You can always go to the Site
Admin page later on to install, activate or deactivate other
modules, so it’s ok to experiment here.
-
Check Security - G2 walks you through the process of
locking down your new config.php.
-
Finished! - Congratulations! Your Gallery 2 Alpha has
successfully installed!
-
Log in - Once you’ve successfully got G2 Alpha installed, you should
start by logging
in as the admin user that was created for you at install
time. The admin user has special privileges that you’ll need
in order to administer your new G2.
-
Activate Graphics Toolkits - Click on the Site
Admin link then the Modules link to see the module list.
Install, configure and activate one of the NetPBM,
ImageMagick, or GD modules. You can activate as many of them
as you want (more is better, here).
-
Add photos - Browse back to the top of your new G2
and click on the Add Items link. This will bring up a
page with a few different upload options (at least 3, more if
you have other upload modules installed). Select the one you
want and try adding a new photo to your album. If all goes
well, you should see the new photos in your Gallery!.
-
Add an album - You don't want to put all of your
images into the top level of your G2, so you should try
creating a new album. Browse back to the top of your new G2 and click on the
add sub-album link from the left side of
the page. This will give you a form where you can enter
information about the new album you want to create. Fill it
out and click the Create button. Now try adding images
to that album instead, or select the Move Photo link
from under any of the images you added earlier and move them
into this new album.
-
Import Gallery 1.x albums - you can easily import
albums from Gallery 1.x (G1). It won’t cause any harm
to your G1 (or at least, it’s not supposed to). Just go
to the Migration Page and enter the path to your
G1 albums directory and then follow the instructions.
Note - there are known
issues with the migration module. Please read about them
before filing bugs!
-
Plenty to do and see! -
-
Explore the different Site Admin options and tune your G2
the way that you want it.
-
You can activate different layouts and then
experiment with layouts and themes. You can use different
layouts and themes on each album!
-
You can search your G2 and view the members list.
-
If the Ffmpeg module is activated, you can upload movies
and it will automatically create thumbnails of them for
you.
-
Activate the Panorama module and then try uploading
really wide images and then edit them to put them in
Panorama mode to activate the panorama viewer.
-
Activate the Cart and Photoaccess modules,
add all the photos from an album to the cart and try
printing them all at once (you can cancel the print job at
the last second so it’s ok to play around with this)
-
Activate the Cart and Zip Download modules, add
all the photos from an album to the cart and then download
them all at once as a zip file!
-
Create some new users then create some new groups and then try
adding users to groups. You can assign permissions to
entire groups instead of individual users, which makes
permission management much easier.
-
Try uploading a Shockwave or a Director file. You can
view them in-line.
-
Activate the Thumbnail Manager module then try uploading an
MP3 and see that it’s got a custom thumbnail. Use the thumbnail manager to upload your own
custom thumbnails for different file types. G2 lets you
upload files of any type!
-
Activate the ImageBlock module and see random
images appear in the sidebar when you browse through your
G2.
-
Play around with the other modules and see what they do!
There are over 28 different cool modules that do all kinds
of neat stuff. If you decide that you don't want a module
any more, just deactivate and uninstall it and it goes
away.
If you have problems, you should start by looking in the G2
General Development Forum on the Gallery Website. Look
to see if somebody else has posted a similar problem and maybe
there’s an answer there. Failing that, you can file
a bug in our bug tracker on SourceForge. Please read our tracker
guidelines before filing a bug so that we can cut down on
the number of spurious reports. Finally you can try to catch one
of the G2 developers on our irc channel, #gallery on
irc.freenode.net. Please remember that our users outnumber
our developers by many orders of magnitude, and our developers
are doing this in their spare time, so be considerate.
Remember – reporting bugs is good. Even if you think
it’s silly, go ahead and report it. We can always close the bug
or refile it (please don’t be offended in this case) but it’s
harder to find bugs than it is to fix them so we’re counting on
you to help us with the finding part.
-
G1 -> G2 Migration -
-
Migration seems to abort after 5 minutes so if you do a
large import and it suddenly stops without giving you any
feedback, you might want to import in small chunks of
albums for now.
-
Performance - This alpha release is much faster than
the last one. There are still some tweaks that we have
planned that will make it even faster. We’ve still
focused on features and reliability before performance, and
will be continually optimizing during the Alpha and Beta
cycles.
Until G2 hits beta, you may have to discard your current
G2 data any time you upgrade. The proper way to upgrade is to
get the latest code and overwrite
your existing copy with it. If you see weird errors, then
it’s time to delete your database. Starting with Alpha-4,
you should be able to upgrade to future versions of Gallery 2.
However, we're still working the kinks out of the upgrade
process so we reserve the right to screw up horribly
between now and beta.
MySQL
mysqladmin -uroot drop gallery2
PostgreSQL
dropdb gallery2
- These commands assumes the database is called gallery2
Make sure you delete the contents of your g2data directory (but
leave the directory itself around). On Unix, you may need to be
root or use sudo to delete these files.
Unix
/bin/rm -rf /path/to/g2data/*
Windows
cd c:\
rd /s /q g2data
mkdir g2data
Now, go back and recreate the database. Finally, perform a complete reinstall.
Yes, we know that doing all of this sucks, and when we get to
beta we’ll have an upgrade path so that you can just update the
code and it will Do the Right Thing.
We sneaky developer types have a back-door that lets us do
reinstalls much faster. You can play with this too, but we ask
that if something weird is going on, you verify that any bugs
you’re seeing happen when you do the install by hand, so that we
know they’re not caused by our little back-door shenanigans.
The back door is to go to the old test
harness and run the ReInitializeGallery test. This will
immediately nuke your entire G2 from orbit (it’s the only
way to be sure) and start all over again. Be careful, we warned
you. Note - the ReInitializeGallery test may insert some
strange default paths into your G2 since they’re useful to our
developers. You can delete them.
Unit Tests - G2 was designed using Extreme
Programming methodologies. This means that we have a ton of unit
tests that help us make sure that the code is behaving as it should. If
you want to help us out, you can try running the unit tests and report back
to us if any of them fail. Note - these tests
shouldn’t change your G2 settings at all, but if they fail, they
may leave things in a weird state. Be warned that you might
have to ditch your G2 data and start over if something
catastrophic happens.
Test Harness - We also have an older test harness that
we use to do some load testing type tasks that might be fun to
experiment with. Try creating 1000 users or a random tree of
5,000 photos to see what it’s like.
Localization - If you’re interested in localizing
G2 into another language, you can review the current state of localization
and then read the
localization how-to and get started. Submit your localizations early and often -
no need to wait until you’re entirely done.
For Developers - We've gotten started on some documentation
that you should read if you want to start hacking on G2. It's
an early draft and is a little bit out of date, but it's a
start.
$Id: README.html,v 1.48 2004/11/28 21:52:29 bharat Exp $