This manual relates to Classic Gallery version 1.1.1 and may contain information that is not relevent to earlier versions.
Classic Gallery is designed to be an easy-to-use fully functional gallery program as well as an extremely flexible framework for creating complex image galleries. It is a standards compliant, accessible, image gallery that uses semantic XHTML markup for structure and CSS for presentation.
Contact Classical Webdesigns at classicgallery [AT] classical-webdesigns [DOT] co [DOT] uk or visit the homepage to keep up with the latest developments.
Classic Gallery © 2006 Classical Webdesigns.
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.
In addition, you understand that Classical Webdesigns DOES NOT accept any liability for loss or damage resulting from the installation or use of this software. DO NO INSTALL IF YOU ARE NOT COMFORTABLE INSTALLING PHP AND MYSQL APPLICATIONS.
Before attempting to install this software, please check the system requirements.
You can try it on lesser specs, but it won't be supported - let me know how you get on though.
Contact your server administrator if you are unsure of any of your system requirements.
You are now ready to configure your gallery.
To configure your gallery, open the file inc_config.php in your text editor.
The configuration settings are a series of variables, in the format define("VARIABLE_NAME","variable value") - you need to edit the "variable values". Note: strings of letters must be enclosed in quotes.
| Settings | Function |
|---|---|
| Database Login | |
| define("DB_USER", "username") | Database username - consult your hosting provider. |
| define("DB_PASS", "password") | Database password - consult your hosting provider. |
| define("DB_NAME", "gallery") | Database name - create this yourself using your preferred method or consult your hosting provider for instructions. |
| define("DB_HOST", "localhost") | Database host - consult your hosting provider. |
| Database Tables | |
| define("DB_T_CATS", "gallery_categories") | Gallery categories table |
| define("DB_T_PHOTOS", "gallery_photos") | Photos table |
| define("DB_T_USERS", "gallery_users") | Users table |
| Gallery Setup | |
| define("GALLERY_EMAIL", "gallery@yourwebsite.com") | The email address from which password reminders are sent (probably your email, but you may want a "no-reply" address). |
| define("WATERMARK", "http://www.yourwebsite.com") | the watermark is embedded in full-sized images as a form of primitive copy protection. It doesn't stop the determined, of course. |
| define("POPUP_TOGGLE_DEFAULT", 0) | Popup toggle status. 0 = off (recommended!); 1 = on. |
| define("USE_MOD_REWRITE", 0) | 0 = off; 1 = on. If you don't know what Mod_Rewrite is, leave this set to "0". |
| define("TIME_DIFF", 0) | Number of hours difference between your timezone and your server's timezone. For example, if you live 8 hours ahead of your server, then simply enter "8" (wthout quotes). If you live 8 hours behind your server, enter "-8" (no quotes). If you live in the same timezone as your server leave this option as "0" (zero - no quotes). |
| File Structure (probably should be left as is, unless you know what you're doing). | |
| define("GALLERY_URL", "http://www.yourwebsite.com/gallery/") | The url path to your gallery. Leave off "index.php", but do include the trailing slash). |
| define("GALLERY_PHOTO_DIR", "photos/") | Where the photos and thumbnails are stored (remember the trailing slash). |
| define("GALLERY_INDEX", "index.php") | Main Galleries Index |
| define("GALLERY_THUMBS", "gallery.php") | Gallery Thumbnails |
| define("GALLERY_VIEW", "galleryview.php") | View Photo |
| define("GALLERY_POPUP", "gallerypopup.php") | View Popup Photo |
| Default Image | |
| define("DEFAULT_IMAGE_FULLSIZED", "default.jpg") | Default image for when no photo is missing. You could create your own image and type it's name here, or overwrite the existing image. |
| define("DEFAULT_IMAGE_THUMBNAIL", "thumb_default.jpg") | Default image thumbnail version. |
| define("DEFAULT_CAPTION", "No Image") | Default image caption. |
| Resizing Uploaded Images (images larger than the maximums will be resized on upload) | |
| define("IMG_MAX_WIDTH", 500) | The maximum width of a fullsized image |
| define("IMG_MAX_HEIGHT", 375) | The maximum height of a fullsized image |
| define("IMG_MAX_WIDTH_THUMB", 100) | The maximum width of a thumbnail image |
| define("IMG_MAX_HEIGHT_THUMB", 75) | The maximum height of a thumbnail image |
Classic Gallery comes with a basic style template which allows you to use the program out of the box, but you will soon want to make your gallery look pretty, or match the style of your existing web pages; and you can, thanks to Classic Gallery's modular "code chunk" system.
With the modular approach, the back-end programming is completely separated from the front-end content and presentation, so you can rearrange the layout of pages and add your own content without having understand PHP programming. You could even incorporate the system into a weblog ("blog") or forum program. Classic Gallery is only limited by your imagination.
Remember to backup your files before you make changes to your design!!!
Classic Gallery consists of four pages:
At the very top of all gallery pages, before anything else, you should include the following code:
<?php //-- ClassicGallery *** do not move the code below *** --//
require_once("admin/gallery_functions.php");
//-- ClassicGallery *** do not move the code above *** --// ?>
What this does is to include the PHP functions that make the gallery work.
All other code chunks can be moved around, within reason. That is, you can't really place the chunk for the Javascript code at the end of the document, and certain chunks can only appear on particular pages.
All code chunks take the following form: <?php display_chunk("chunkname"); ?> where "chunkname" is the particular chunk of code you wish to display.
| Code Chunk | Function |
|---|---|
| All Pages (* not included in 'Popup View') | |
<?php display_chunk("lang_locale"); ?> |
Displays the appropriate 'locale' for your chosen language file (eg, "en" or "fr" or "de") |
<?php display_chunk("title"); ?> |
Displays dynamic page title, used in <title> tag, and also the main heading on the 'Index' page. |
<?php display_chunk("meta_description"); ?> |
Displays text for 'description' metatag. |
<?php display_chunk("browser"); ?> * |
Displays 'rel' links in some browsers. |
<?php display_chunk("styles"); ?> |
Displays the cascading style sheet. |
<?php display_chunk("script"); ?> |
Displays the Javascript code (used for making popups etc). |
<?php display_chunk("madeby"); ?> * |
Display the Classic Gallery "made by" copyright footer. This chunk should not be removed! |
<?php display_chunk("login"); ?> * |
Displays the Admin login link. |
| Galleries Index | |
<?php display_chunk("about"); ?> |
Displays a small blurb describing/introducing your albums. |
<?php display_chunk("albums"); ?> |
Displays the list (a table) of albums. |
| Gallery Thumbnails | |
<?php display_chunk("album_name"); ?> |
Displays a the current album name. |
<?php display_chunk("link_allalbums"); ?> |
Displays a link back to the Classic Gallery index page. |
<?php display_chunk("album_description"); ?> |
Displays the current album description. |
<?php display_chunk("toggle"); ?> |
Displays the toggle form for the popup windows. |
<?php display_chunk("thumbnails"); ?> |
Displays the table of thumbnails. |
<?php display_chunk("copyright"); ?> |
Displays a copyright message - let people know who owns the copyright on the photos in the gallery. |
| Photo View and Popup View (* not included in 'Popup View') | |
<?php display_chunk("photocaption"); ?> |
Displays the image caption. |
<?php display_chunk("link_allalbums"); ?> |
Same as thumbnails page. |
<?php display_chunk("link_thumbnails"); ?> * |
Displays a link back to the gallery thumbnails. |
<?php display_chunk("link_nextprev"); ?> |
Displays "Previous / Next" navigation bar and the current photo number. |
<?php display_chunk("photoimage"); ?> |
Displays the full sized photo image tag. |
<?php display_chunk("photoadded"); ?> |
Displays the date the photo was added to the gallery. |
<?php display_chunk("phototext"); ?> |
Displays a long description (blurb) for the image. |
<?php display_chunk("keyboard_shortcuts"); ?> |
Displays a list of shortcuts (accesskeys) for navigating through the gallery. |
There is also a default language file /gallery/admin/lang/en-gb_default.php (GB English), which you can customise. Just copy the default file and save it under a new name (eg, "deutch.php"). Then open up the new file and edit the variables - there are some notes in the file to help you.
When you are done, login to the Gallery Admin and select the new language file (it will be listed by the filename you save it under).
Classic Gallery uses PHP headers to output HTML using the UTF-8 character set, which should display most people's needs across several languages. If your required characters do not show up, then feel free to change the headers.
In the admin/includes/inc_formatting.php file, all user supplied input is encoded as HTML entities and output is then decoded for the screen. Again, this is specified using the UTF-8 character set, so may need changing if it does not work for you.
| Name | Character | Entity |
|---|---|---|
| Copyright | © | © |
| British Pound (Sterling) | £ | £ |
| German 'SZ' Ligature (sharp-S) | ß | ß |
| French 'A' Acute | Á | Á |
Bear in mind, however, that character encoding can still go wrong in the browser, especially if visitors do not have a font on their machine capable of displaying your character set. Also, for this reason, it is better to specify common fonts in your CSS file, especially ones which support a wide-range of character sets.
Classic Gallery © 2006 Classical Webdesigns. All rights reserved.