Welcome to Gallery 2.0. This is the fourth “Beta” release of Gallery 2, code named “Flippin' Sweet!”. Please read through this document carefully before installing Gallery 2 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.

## Quick Start

If you’re impatient like us, you just want to get going. The odds are that your system is all set to handle Gallery 2 so just skip right to the installer and start clicking. It should walk you through everything you need to get going. Before you do that though, you really should read the When should I use it? and When should I NOT use it? sections. But if you hit a snag, please come back here and read more before asking questions! Enjoy.

## What is Gallery?

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 and photos can have read, write, caption and other permissions per individual authenticated user for an additional level of privacy. It's great for communities - give accounts to your friends and family and let them upload and manage their own photos on your website!

## What is this “beta” thing?

The final version of Gallery 2 hasn't been released yet. This is an almost final version of the product that you can install and use to get an idea of what it will be like when we're done. You can give us feedback about what you like and dislike, and any bugs that you find. This provides valuable testing for us, and it gives you a little control over the end product. Even though it's not finished yet, Gallery 2 is very stable and reliable!

## System requirements

- 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: PHP's safe_mode must be disabled! Read this forum thread for a safe_mode discussion.
- One of the following databases: MySQL 3.x or 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!)

## When should I use it?

You should install Gallery 2 to try it out. You could install it next to your production version of Gallery 1 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. You can use the migration module to import some or all of your Gallery 1 albums into Gallery 2 for test purposes (this shouldn’t affect your Gallery 1 installation at all).

## When should I NOT use it?

Do not use it as the main repository for your data. Do not use it for a production web site. Although we provide an upgrade path we do not provide the same level of support for Gallery 2 that we provide for Gallery 1 until we get to release candidates. We know that Gallery 2 is much better than Gallery 1, and it may be tempting to just replace your Gallery 1 with it. But we're still making plenty of changes and mistakes happen so if you use it in production, be prepared to dig into it yourself and fix things if they break.

### Warning!

Gallery 2 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, do not hesitate to email us at:
security AT gallery.menalto.com

## What’s new in this release?

Gallery 2 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 Gallery 1 and we did them again the right way. Three years of design and development have gone into Gallery 2. It’s got customizable themes using XHTML compliant templates which makes it much easier for you to personalize your Gallery 2 install. All the cool bells and whistles are in modules that can be enabled separately for maximum control.

### Highlight of changes in Gallery 2 Beta 4 (Flippin' Sweet!) -

1. New Theme System - You spoke -- we listened. The old layout and theme system was far too complicated so we've completely overhauled it leaving control firmly in the hands of the theme designer while keeping it simple and easy to work with.
2. Square Thumbnails - This module now offers a mode to fit thumbnails inside a square with a specified background color instead of cropping the image into a square.
3. CMYK Jpegs - ImageMagick module can now detect jpegs using CMYK colorspace and convert to RGB for display in the Gallery, still keeping the original file available for download.
4. Multisite Support - The multisite system has been completely redesigned and is now compatible with both URL Rewrite module and embedded G2. Multisite G2 refers to multiple independent sites using a single codebase.
5. Localization - The installer and upgrader can now be localized.
6. Improved Installer - The installer offers now a clean install option, catches version mismatches between database/g2data/code, detects the proper locking system to use, and has a more detailed admin user setup.
7. Improved Upgrader - There’s now a progress bar in the module upgrade step to combat server timeouts.
8. Guest Preview Mode - Click this to see almost exactly what a guest will see when browsing your albums. Useful if you want to test permissions and other settings.
9. Improved Cookie Management - New optional configuration parameters enable cookie support in embedded G2 while maintaining maximum security by default and the flexibility to support embedded G2 installs on separate subdomains.
10. Colorpacks - Now that layouts are gone and there are only themes, colorpacks let you change the color scheme of a theme.
11. Many, many bugs fixed.

### Highlight of changes in Gallery 2 Beta 3 (Bingo!) +

1. New Modules
   - New Quotas module allows limiting disk usage for users and groups.
   - New Iconpack module adds icons for various links.
   - New dcraw module adds support for the raw image format of many cameras.
   - New Publish XP modules allows adding items directly from Windows XP.
   - New Slideshow applet module shows images in a fullscreen slideshow using Java.
2. Layouts
   - Simplified the PHP code required for a layout. This makes it easier to create a new layout that mostly involves building the tpl files, but still allows use of additional PHP code for more advanced layouts.
   - Standard $user template variable now available in all views, which makes it easier to customize content for guests, registered users or administrators.
3. Hotlinked image protection
   - URL Rewrite module now offers the ability to restrict item downloads from external referers not on an approved list. This prevents other websites from directly linking to images on your server.
   - Watermark module offers an alternate rule in Rewrite module which can apply a watermark on the fly to images for external referers.
4. Tree view - Album Select module now offers a dynamic tree view in addition to the simple select box for navigating to any album.
5. Thumbnails - Expanded ability to override the album default thumbnail size to any item or album, not just for photo thumbnails.
6. IPTC - Support for reading IPTC data added to EXIF/IPTC module.
7. Forgot Password - New system to reset the password for any Gallery 2 user with an email address.
8. Short URLs - More control in Site Admin over how short URLs are constructed.
9. Owner Permissions - Permissions are now transferred to the new owner when changing the owner of an album or item.
10. Updated Albums - Modification date of albums now updated for item add, move, delete in that album (so New Items module will show "Updated").
11. Add From Web - Improved support for URLs where extension doesn't match the actual mime type (like Gallery 2 URLs!).
12. Email Test - Added ability to send a test email from Site Admin to verify email settings are correct.
13. System Maintenance - New maintenance tasks:
    - Reset view counts for all albums and photos.
    - Build all thumbnails and resizes at once.
    - Display system information, useful for copy/paste to support forum.
    - Rewrite module task to check for conflicts between short URLs and actual Gallery files.
14. Integrations - Improved support for integration with external applications.
15. Installer - Verify that the database user has the correct permissions before installing.
16. Many, many bugs fixed including several localization fixes.

### Highlight of changes in Gallery 2 Beta 2 (Holy Hand Grenade) +

1. Performance Improvements
   - Automatic fast download code for publicly visible images. We bypass most of the framework and render thumbnails and resizes quickly on demand, while still preserving the complete image firewall. This radically reduces server load.
   - Replaced the permissions table with access control lists. This change isn't visible to the end user, but results in a significant performance increase for large galleries.
2. Themes/CSS
   - We updated the CSS across the entire app to clean it up and make building new themes a bit easier.
   - Added new mblue theme.
3. Layouts
   - The main content no longer wraps below the sidebar in Matrix layout when viewed with IE.
   - Hybrid, slider and tile layouts are now themeable and have improved cross browser compatibility.
   - Added Nico Kaiser's siriux layout.
4. New Modules
   - New captcha module allows you to require that users have to prove that they're human in order to log in or register a new account.
   - New mime management module allows you to control which mime types Gallery understands.
5. Localization
   - Localized into Chinese (Simplified)
   - 6 localizations support 75% or more of Gallery.
6. Embedding
   - Considerable progress in the API and documentation.
   - Xaraya, PHP-Nuke, Tikipro, Drupal and Mambo integrations available in CVS.
7. Many, many bugs fixed.

### Highlight of changes in Gallery 2 Beta 1 (Dark Fibre) +

1. Rewrite - New module for creating compact, search engine friendly URLs.
2. Recursively Add Directories - You can now add an entire hierarchy of images in directories at once. Gallery will turn each sub-directory into an appropriate sub-album.
3. Locking - New database locking system that allows Gallery to run properly on NFS filesystems.
4. Shutterfly - New module for printing photos with Shutterfly.com.
5. Classic Layout - New layout similar to the Gallery 1 top level album. Shows thumbnails, item details and a tree of links to subalbums.
6. Origination Timestamp - New field to store the date normally shown with items. The field is automatically set from EXIF data if available but can also be changed manually.
7. Resizes - Added support for both width and height bounds for photo resizes and scaling the original image.
8. Archive Upload - New module extracts files from uploaded zip archives and adds each to the album. Implemented to allow support for other archive formats to be added later.
9. Size Limit - New module to define maximum dimensions or file size of uploaded images.
10. Custom Thumbnails - Thumbnail module now allows uploading a custom jpeg thumbnail for any album or item.
11. Rearrange - New module allows rearranging the order of all items in an album at once.
12. Album Select - New module adds a select box for jumping directly to any album.
13. EXIF - Added ability to set item summary/description from EXIF description when new photos are uploaded.
14. Symlink - Option to add items using symbolic links to existing files on a unix server.
15. Sort Order
    - Two levels of sorting now supported.
    - New sort to always show albums first.
16. Image Block Enhancements
    - Picture/Album of the Day/Week/Month.
    - Option to omit certain albums from image blocks.
    - External image blocks using full size images.
    - Scale external image blocks to a specified maximum size.
    - Support for image frames around image blocks.
17. User Album Options
    - Create user albums when first accessed instead of right when the user account is created.
    - Show link to user album.
    - Jump to user album after login.
18. Embedding
    - Further improvements in the API and documentation.
    - Added support for search and image block.
    - Xaraya, PHP-Nuke, Tikipro and Drupal integrations available in CVS.
19. Multisite Support - The installer can now configure multiple independent sites using a single codebase.
20. Internationalization
    - Added basic support for right-to-left languages.
    - New MultiLanguage module adds ability to write captions in multiple languages and display them based on the selected language of each user.
21. Error Handling - Improved handling and display of error messages.
22. Bugs - Many, many bugs fixed.

### Highlight of changes in Gallery 2 Alpha 4 (Nice Commits) +

1. Upgradeable Core and Modules - At long last we support upgrading from one version of Gallery 2 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.
2. Module Uninstall - You can now completely uninstall a module and then delete it from your Gallery 2 installation.
3. 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.
4. 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.
5. Navigation - It's now easier to navigate around Gallery. Meaningful "back" links will bring you back to the 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.
6. Random Highlight - New module allows albums to periodically change highlight, selecting randomly from the album's items.
7. WebCam - New module creates items that periodically refresh the image from an external URL.
8. 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.
9. 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
10. 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.
11. 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.
12. 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.
13. Embedding Gallery 2 - 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.
14. 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.
15. 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.
16. 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.
17. 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).
18. Localization - Gallery 2 is now translated into 18 languages, though only German, Danish and Swedish are over 50% translated. We can use your help!
19. Bug fixes - Many bugs closed!

### Highlight of changes in Gallery 2 Alpha 3 (Farva) +

1. 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.
2. Oracle Database Support - The installer now offers Oracle (version 9i and higher) among the supported database types.
3. 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.
4. 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.
5. 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 overlaid with a red X, or IE6 crashing.
6. Migration improvements -
   - We now properly migrate item owners
   - We now preserve the order of imported subalbums
   - Gallery 1 summary and description fields are now transposed on import so that the Gallery 1 "summary" (which was shown inside the album itself) is now the Gallery 2 "description" and vice versa.
7. CMS Integration - Although this is not yet readily visible, a great deal of work has been done on getting Gallery 2 ready to integrate into external content management systems. We’ve successfully done partial integrations with Xaraya and Drupal, with more on the way.
8. 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).
9. Zip Cart Plugin - You can now download the contents of your cart as a zip file.
10. 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.
11. Installer - Many minor tweaks including adding more install checks to make sure that your system is OK.
12. 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.
13. Bug fixes - Many bugs closed!

### Highlight of changes in Gallery 2 Alpha 2 (Grand Theft Photo) +

1. 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).
2. 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.
3. 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.
4. Custom Fields - New custom field module allows you to define global and per-album custom fields for your item meta data.
5. Java Upload Applet - New upload option where you can drag and drop files onto an applet and Gallery 2 will upload them for you.
6. 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.
7. Square Thumbnails - New module that allows you to specify that all gallery thumbnails have a 1:1 aspect ratio
8. Imageframe module - This module allows you to apply frames to your photos and albums in the Matrix and Hybrid layouts.
9. Self Registration module - Allows guests to register for their own account in your Gallery 2.
10. Language selection - There’s a new box in the sidebar where guests can choose their preferred language
11. Nokia Mobile Phone Uploader Module - Upload images to your Gallery 2 from your mobile phone!
12. Migration module - We now import Gallery 1 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 Gallery 1 albums wound up in Gallery 2 so that you can create an .htaccess file in your Gallery 1 to redirect Gallery 1 URLs to Gallery 2, for ease of migration.
13. Gallery Remote - GR now supports creating new Gallery 2 albums.
14. PHP5 Support Gallery 2 has been tested on PHP 5.0.1 on FreeBSD and Linux.
15. Bugs - More than 31 bugs closed since Alpha 1.

### Highlight of changes in Gallery 2 Alpha 1 (Cowbell) +

- First Release of Gallery 2!

## Preparing to install

1. Latest Version - There are three ways to get the code.
   - Tarball - You can download a prepackaged file as a tarball or a zip file from SourceForge.
   - Nightly Snapshot - You can download a tarball or zip file with a snapshot of the most recent code. Find links to these on the Gallery Download Page.
   - 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 Gallery 2 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.
2. Storage - Create a directory for gallery to store photos. This must be writeable 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 Gallery 2’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.
3. 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.
   Grant all required privileges to your database user. This includes but is not confined to: CREATE TABLE, ALTER TABLE, DROP TABLE in the gallery2 database; SELECT, INSERT, UPDATE, DELETE on all (gallery2) tables in the gallery2 database; CREATE INDEX and some other privileges that are specific to the different database management systems. CREATE/DROP DATABASE and the ability to GRANT privileges to other database users are not required.

   ### 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 -E UNICODE
   If it complains that UNICODE is not a valid encoding name, then try:
   $ createdb gallery2 -E SQL_ASCII
   If it complains about that, too then try:
   $ createdb gallery2

   ### Oracle

   $ create database gallery2 {additional parameters};

4. Graphics Toolkits - Gallery 2 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 can be very fast, but it will also use a lot of memory so it may cause you to run into predefined server limits. It is also 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 Gallery 2 will auto-detect them during Gallery 2 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.

## Installing

Gallery 2 is a web application and must be installed on your web server in order for you to use it. If you've unpacked it on your desktop, you will have to upload it to your server as part of the install process, then you can configure it using your web browser.

1. Upload - Copy the Gallery 2 files to a directory on your webserver. There are several alternatives for this step:
   - Fastest way: Upload the gallery package to your web server archive via FTP or another method, then unpack it using an interactive shell session (eg. ssh or telnet). Example unpacking commands (choose the appropriate one):

     ### For .tar.gz archives

     $ tar xzf gallery2.tar.gz

     ### For zip archives

     $ unzip gallery2.zip

     If you do not have shell access, you can ask your provider to do it for you, or you can make a miniature PHP script containing one of the above commands. Some webhosting companies offer a control panel with a web file-browser which is capable of extracting / unarchiving archive files. It’s worth a try to check if this option is available.
   - Easiest (but slowest) way: If you don't have shell access, you can upload the complete contents of the Gallery 2 archive to the webserver with an FTP program. This may take a lot of time and be error-prone. In this case, pay special attention to the ’System Checks’ step of the installer and make sure that there are no missing or modified files. Consider using a smart FTP program like FileZilla to make sure that your transfer goes smoothly.
   - Advanced way: The best way to install Gallery and stay up to date if you have shell access to your webserver is to use CVS.

     $ cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/gallery login
     (if it asks for a password, just hit enter)
     $ cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/gallery co gallery2

     SourceForge's CVS connection can be slow at times. But this approach is great because any time you want to update your Gallery install all you have to do is do:

     $ cd gallery2
     $ cvs update -Pd

   Note: After uploading, you should close this version of the README and browse to the version that you just uploaded. That way all the links in this document will point to the right places in your Gallery 2 install.
2. Begin Installing - Open up your web browser and browse to the install directory. Gallery 2 will walk you through the process of validating that your system is properly configured and will set everything up for you.
3. 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 Gallery 2 knows that you’re authorized to use the installer.
4. System Checks - The installer checks your system to make sure that it will support Gallery 2. Make sure that all checks are successful!
5. Multisite Setup - Gallery can support multiple independent sites with a single installation of the code. Here you will select a standard single install or the location of a new multisite install.
6. Storage Setup - Read the instructions on the installer to set up a storage location for Gallery 2. This is where Gallery 2 will store all of your images, as well as other cache information.
7. Database Setup - Select your database type and enter your database authentication information. If this is not your first Gallery 2 installation and there are still some remains of the old installation, it will check the state of the installed version and offer a clean install option which will delete all your data in the storage directory and in the database. If the installed version seems to be fine, it will also offer to reuse the existing database tables. Select this option if you did not start the installer with the intent to start from scratch.
8. Admin User Setup - You are prompted for an administrator username and password. Type in a password and type it again to validate it. The full name and the email address are optional. But entering an email address is highly recommended. Once you’re finished, click ’Create’ to create the admin user for this installation of Gallery 2.
9. Create Config File - Gallery 2 will create the config.php file in your Gallery 2 directory. This contains all the answers you’ve provided in the installer and is necessary for Gallery 2 to function properly. At this point, there’s also a sanity check to prevent you from damaging your Gallery install by running the installer when you should rather have started the upgrader.
10. 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.
11. Install other modules - Gallery 2 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, deactivate or uninstall modules, so it’s ok to experiment here.
12. Check Security - Gallery 2 walks you through the process of locking down your new config.php.
13. Finished! - Congratulations! You have successfully installed Gallery 2!

## Using your new Gallery

1. Log in - Once you’ve successfully got Gallery 2 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 Gallery 2.
2. 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).
3. Add photos - Browse back to the top of your new Gallery 2 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!.
4. Add an album - You don't want to put all of your images into the top level of your Gallery 2, so you should try creating a new album. Browse back to the top of your new Gallery 2 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.
5. Import Gallery 1 albums - you can easily import albums from Gallery 1. It won’t cause any harm to your Gallery 1. Just go to the Migration Page and enter the path to your Gallery 1 albums directory and then follow the instructions.
6. Plenty to do and see! -
   - Explore the different Site Admin options and tune your Gallery 2 the way that you want it.
   - You can activate different themes and experiment with them. You can use a different theme on each album!
   - You can search your Gallery 2 and view the members list if these modules are active.
   - Activate the Icons module and select the fun icons from Paul Armstrong Designs.
   - 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. Gallery 2 lets you upload files of any type!
   - Activate the ImageBlock module and see random images appear in the sidebar when you browse through your Gallery 2.
   - Play around with the other modules and see what they do! There are over 40 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.
   - Take a look at the list of User Contributions to find even more modules, themes, utilities, mods and more.

## Updating your Gallery 2 Installation

Updating is quick and easy and should not lose any of your data.

1. Get the latest code and unpack it over your existing copy of Gallery 2. Keep your existing config.php in place, and don't touch your (g2data) data folder or the database. If you're using CVS, you can just do "cvs update -Pd" at any time.
2. If you use a PHP accelerator / cache (e.g. Turk mmCache, Ioncube PHPA, eaccelerator, Zend Studio, etc.), flush (clear) the cache of the accelerator. Omitting this step can sometimes lead to errors during and after the upgrade process.
3. Browse to the upgrader and follow the instructions there. Make a backup of your data (g2data folder and the database) when it tells you to! Should you lose your data due to a bug in the upgrader, the first thing we're going to tell you to do is to restore from your backups! (Then we'll probably ask you to help us reproduce the bug.)
4. Enjoy your new version of Gallery 2.

## Getting Help

If you have problems, you should start by looking in the Gallery 2 Support Forum on the Gallery Website. Search the forum to see if somebody else has posted a similar problem and maybe there’s an answer there, otherwise start a new topic to get help. If the problem seems like a bug in the Gallery 2 software 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. If you're unsure whether to file a bug you can always post in the forums first and we'll ask you to file a bug if needed. If you want to chat in real time, you can talk on our user-to-user irc support channel, #gallery-support on irc.freenode.net.

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.

## Known Issues / Bugs

1. Login Problems - In previous versions, there were known login / session problems. As a consequence of our fix for this problem, you and all your Gallery users have to delete old GALLERYSID cookie(s) in your browser if Gallery seems to ignore login requests.
2. Performance - This beta release is another 10% faster than the previous alphas/betas. There are still some tweaks that we can make to have it go faster, but we may not get to them before the final release.
3. Multisite config.php - The multisite system has changed and old style multisite config.php files are no longer supported. Follow these steps to move your sites to the new system:
   - Replace any symlinks created for multisite support with real directories and/or remove any .htaccess files that were setup to redirect requests from a multisite directory to the G2 codebase.
   - Examine your config.php file and learn the basics of its structure. You will find multiple complete single configurations that each start with `<?php` and end with `?>`, with some additional content above, below and between these sections.
   - Copy each configuration in the combined file into separate single files. Each new file should have `<?php` as the very first line and `?>` as the very last line with no extra spaces or blank lines at the top or bottom, and there should be only one of each of these tags. Place each new single config.php in the multisite directory for that site. The `case 'domain/path':` line just above each configuration in the combined file will help you determine which config.php goes in which multisite directory. Note that this "case" line does not go in the new config.php file. The last configuration in the combined file has `default:` just above it instead of "case". Rename the combined file to something else and put this last configuration in place as the config.php in this directory.
   - Now access the primary site and run through the upgrader. Make sure everything is working correctly with this site.
   - For each additional site follow this process: browse to install/index.php of the primary site. In step 3 enter the path to the multisite directory to update. After this step you should see some new files in the multisite directory, including `upgrade/index.php`. At this point stop using the installer and browse to `upgrade/index.php` for this site (not the primary site). Step through the upgrader to the upgrade core module step. After the core upgrade completes manually edit the config.php for this site. At the bottom you will find a `galleryBaseUrl` setting. Enter the URL for the primary site here, ending with a /. For example, `http://mydomain.com/gallery2/` or `http://photos.mydomain.com/`. Note this is the URL for the primary site, not the site you are currently upgrading. Save this change and finish the remaining steps of the upgrader. Make sure this site now works correctly.
4. Theme upgrade - In beta-4 all layouts have been replaced with the new theme system. During the upgrade process the layout setting on all albums is cleared and the site-wide default theme is set to matrix. You'll have to reselect the default theme and any album specific settings to restore the layout configuration in place prior to this upgrade.
5. View names - In beta-4 the naming convention for views changed from using a colon separator to a period (core:ShowItem is now core.ShowItem). All Gallery code has been updated but there are a few places you should check to make sure your site is up to date:
   - Local tpl files: make sure to update all view names in your customized templates. Compare to the current version of the default tpls if needed.
   - External imageblock: update imageblock:External to imageblock.External in any uses of this feature.
   - PublishXP: Select 'add items' / Windows XP and follow the directions to update your registry so it will reflect the new view name.

## Advanced Topics

Unit Tests - Gallery 2 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 Gallery 2 settings at all, but if they fail, they may leave things in a weird state. Be warned that there's a slim chance that you might have to ditch your Gallery 2 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 Gallery 2 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 developer documentation that you should read if you want to start hacking on Gallery 2. Some of the information is a little bit out of date or in early drafts, but it's a start.

Embedding - See this forum topic for the status of the integration modules to embed Gallery 2 in various applications. This documentation explains how to setup an integrated environment or build the integration module for a new application.

$Id: README.html,v 1.116 2005/07/21 18:20:00 mindless Exp $