PHP Image Gallery Softcomplex Logo

PHP Image Gallery Documentation v1.0

Table of Contents

Description

Create absolutely new dimension of user and community interaction on your web site with PHP Image Gallery. It is a feature-packed photo gallery system that lets users upload and discuss photos in your galleries as well as in public and private albums. It can be seamlessly integrated into your current site design and even use your existing forum login system (if you have one) to keep your users from having to register twice.

Features

System Requirements

Installation

Preparations

Before beginning installation process collect the following information:

Your host master or administrator may help you to obtain this kind of information.

Installation Steps

  1. Download the install package. File name is php_image_gallery.zip.
  2. Unzip the install package to the directory which is appointed for the image gallery.
  3. Open config.php file in your preferred text editor.
  4. Correct the file with your values of the database connection properties.

    Example
      $GLOBAL_CONF['db_host'] = 'localhost';
      $GLOBAL_CONF['db_user'] = 'dbuser';
      $GLOBAL_CONF['db_passwd'] = '123456';
      $GLOBAL_CONF['db_name'] = 'gallery1';
    
  5. Open your preferred web-browser and browse install.php in your new gallery. The "PHP Image Gallery v1.0 - Installation Page" gives you information about installation process. Successfull installation looks like on the picture below:

    Section "Create Admin account" informs that the installation is successfully completed.
  6. Enter an admin account login name, enter an admin account password.
  7. Click on "Add" button.
    Installation is completed.
  8. We strongly recommend to permanently delete install.php from your gallery as anyone can accidentally call the file and as a result all data in database will be lost.

Now you can log in to the gallery with admin account and manage your gallery directory.

Site Setup

To call Site Settings page click on "Site Settings" link on Main Menu. You should have Administration authorization to do this. The following picture represents the Site Settings form.

The following table describes each setting.

SettingDescription
Site settings
Site index pathA full path to site root on the server
Site WEB pathURL to the site with the gallery
Classes dir pathA full path to the php classes of the gallery
Skins Appearance of the gallery. By default gallery is shipped with only "standard" skin
Global page title This line is shown on root folder of the gallery
Upload image settings
Upload image pathA full path where all images are stored
Upload image WEB path URL to direct access to the gallery images
Small images pathFor informational purpose only
Large images pathFor informational purpose only
Small album icons pathFor informational purpose only
Large album icons pathFor informational purpose only
Small album default icon pathA full path with icon file name
Large album default icon pathA full path with icon file name
Thumbnail images height After setting this parameter all new uploaded images will appear in "Approve images" section with new size. After images approvement they will be shown in "Preview" section also with new size. Notice that old images don't resize.
Thumbnail images width After setting this parameter all new uploaded images will appear in "Approve images" section with new size. After images approvement they will be shown in "Preview" section also with new size. Notice that old images don't resize.
Normal images height After setting this parameter all new uploaded and approved images will appear in "Slide show" and "View" sections with new size. Notice that old images don't resize.
Normal images width After setting this parameter all new uploaded and approved images will appear in "Slide show" and "View" sections with new size. Notice that old images don't resize.
Listings settings
Thumbnails on page Amount of thumbnails images in preview section.
Comments on page Amount of comments shown in "Comment" section
Users on page Amount of user accounts or registered groups shown on one page. It affects "Manage Users" and "Manage Groups" pages.
Page per scroll Amount of page ranges shown on page selector area.
Slide next Amount of images loaded into temporary buffer before and during slide show
Users settings
Default group This is one of your registered groups to which the new registered user account is added by default.
Admin group Admin group is a one of registered groups which allow user acconts that are members of this group to have Administration authorization
Admin email This is the sender email address sent to the user in the post with forgotten password.

Control Elements Overview

Main Menu

Main Menu under Unauthorized authorization looks like

| Home | Search |

OptionDescription
Home Starting browsing the gallery
Search Opening a search form for the image searching

Main Menu under Authorization authorization looks like

| Home | Edit Profile | Search |

IconDescription
HomeStarting browsing the gallery
Search Opening a search form for the image searching
Edit Profile Opening a "Profile" form for editing current user profile

Main Menu under Administration authorization looks like

| Home | Search | Site Settings |
| Manage Users | Manage Groups | Edit Profile |
| Manage Albums | Approve Images | Add User |

OptionDescription
HomeStarting browsing the gallery
SearchOpening a search form for the image searching
Manage Users Opening user's table for user management procedures
Manage Groups Opening group's table for User Group Management procedures
Edit Profile Opening a "Profile" form for editing current user profile
Manage Albums Opening a gallery structure browser to manage it
Approve Images Opening an "Approve Image" form to censor images posted to gallery
Add User Opening "Add user" form to add a new user account

Login Options

Not logged in: [ Login | Register ]

IconDescription
LoginOpening a "Login" form for logging in
Register Opening "Add user" form to register a new user account

Logged in as tester: [ logoff ]

IconDescription
logoffA current user logging off

Actions Album Buttons

Actions Image Buttons

If you don't see some of these icons that means you don't have access permissions for the selected album.

User Authorization Modes

There are three user authorization modes in PHP Image Gallery. The following table describes each of them, their abilities and differences.

Authorization modeDescriptionMain Menu /
Login Options
Unauthorized This is minimal authorization assigned to a user who is not restricted in access to the site containing the gallery at all. The categories of visitors are the following: all visitors who don't have any user account; all visitors who have user account but still have not logged in; all visitors who have performed logoff process. Typically this mode is used for public access. | Home | Search |

Authorized This authorization mode is for ordinary users of PHP Image Gallery. The categories of visitors are the following: all visitors who have logged in and belong to one of the registered groups with the exception of visitors with Administration authorization. This is general authorization mode and it very useful when you as gallery administrator need to allow or to restrict access for some users to part of the gallery. Permission management in Authorization mode is more flexible than in Unauthorized | Home | Edit Profile | Search |

Administration This authorization mode can have users who belong to one specific group only. Normally, these users have exclusive (administrative) privileges to perform maintenance tasks within PHP Image Gallery. The group is one of the registered groups. The categories of visitors are the following: all users that have an account and have successfully performed login process and the user account belongs to a group which is assigned as Admin group in Site settings. How to configure this group will be discussed in Site Setup section. | Home | Search | Site Settings |
| Manage Users | Manage Groups | Edit Profile |
| Manage Albums | Approve Images | Add User |


Based on the authorization mode the appearance of control elements is slightly different.

User Management

This section describes management procedures over an user account. You must be under Administration authorization mode to perform all these procedures.

Creating a New User Account

Click on "Add user" in Main Menu. The "Profile" dialog appears

Fill in the following fields:

Optional. Fill Info field with additional information and choose user group. By default Group field is set to value which is defined in Site Setup.
Click on "Add" button.
Remember, it's impossible to add two different users with the same e-mail address or login name.

Edit an Existing User Account

Click on "Manage Users" in Main Menu. The users table appears.

If you don't see a particular user adjust your view with the following options:

To edit a particular user account click on "edit" link opposite the user account name. The "Profile" dialog appears. The fields are filled with information about particular user account. Edit desired properties. To apply changes click on "Update" button. To cancel the edition click on any Main Menu link.

Delete an Existing User Account

Click on "Manage Users" in Main Menu. The users table appears.

If you don't see a particular user adjust your view with the following options:

To delete a user account click on "delete" link opposite the user account name. The confirmation message box appears.

Click on "Ok" button. The user account has been deleted. Remember, you can't delete user account by which you have been logged in. A red text "You can't delete yourself" at top of user table indicates this condition.

Note: When you decide to delete an user account remember that all images posted by the user will be removed from gallery without confirmation!

User Group Management

This section describes management procedures over user's group. Group is the main unit for permissions control process through a gallery structure (albums). A user account always resides to one and only one group.

You must be under Administration authorization mode to perform all these procedures.

Creating a New User Group

Click on "Manage Groups" at Main Menu. Table of registered groups appears.

If you don't see a particular user adjust your view with the following options:

Click on "Add new group" link. A "Group" form appears.

Enter a desired group name. Click on "Add" button. A new group has been added.

Rename an Existing User Group

Click on "Manage Groups" in Main Menu. Table of registered groups appears.
Group field is filled with particular group name. Enter a desired new group name. Click on "Update" button.

Change a User Group Membership

A user account can reside to one group at the same time. You can change user account membership for many reasons. Perform the following sequence

Click on "Manage Users". The users table appears.

Click on "edit" link opposite the user account name. The "Profile" dialog appears

The fields are filled with information about particular user account. Select a required group by group combo-box.

Click on "Update" button.

Make a Default Group for New Created Accounts

Visitor of gallery can register an user account itself using "Register" link on Login status row. New user account automatically becomes a member of one of the registered groups specified on "Site Settings" page in "User Settings" section. As administration of gallery you should decide and assign a group for new created accounts to bring down your adminstrative efforts. "Newbie" group is default group for a new account registered by visitors. The following actions change a default group.

Click on "Site Settings". The "Site Settings" page appears

Locate "User settings" section

Select a desired default group by "Default group" combo-box
Click on "Update" button.
Now every new created user account will reside to group which you select in combo-box.

Make an Administrative Group

Click on "Site Settings". The "Site Settings" page appears

Locate "User settings" section

Select a desired administration group by "Admin group" combo-box
Click on "Update" button.
Now every user account resided to group which you select in combo-box will have Administration authorization privilegies. User accounts resided to old administration group have lost their administrative privilegies. They can have Authorized or Unauthorized authorizaton privilegies.

Album Management

You can organize your images in gallery by categories or topics. Well organized gallery structure helps visitors to locate interesting images but for administrators, it helps to manage access permissions. You have two ways to organize your gallery structure. Both of them give the same result.

Click on "Manage Album" from Menu options. You will see gallery album structure as on the picture below.

You can create, rename, delete albums.

Creating a New Album

Click on "insert" link near the album to which you want to add a new album. The "Add Album" form appears.

Enter a desired album name in the "Name" field. Optional. You can enter description in the "Description" field.
Click on "Add" button.
The gallery structure appears.

The next way is to use Action Album Buttons when you browse the gallery. But this method has disadvantage that you can't add new album to the root of gallery.

Deleting an Album

Click on "Manage Album" from Menu options. You will see gallery album structure as on the picture below.

Click on "edit" link near the album which you want to delete. The "Edit Album" form appears.

Click on "Delete" button to delete the album.
Note: You can't delete album that contains images.

Rename an Album

Click on "Manage Album" from Menu options. You will see gallery album structure as on the picture below.

Click on "edit" link near the album you want to rename. The "Edit Album" form appears.

Enter new name in "Name" field. Click on "Update" button.

Access Restriction System

Access restriction system bases on the following key features.

There are three access permission rights to an album. The following table describes each of them.

Access permission rightDescription
Read Visitors belonging to access category which has access permission "Read" are allowed: to show images in the album, to post a comment to an image, to start slide show
Write Visitors belonging to access category which has access permission "Write" are allowed: to post images in the album.
Owner This is special access permission rights. Only one of registered user accounts can be owner of the album at the same time. When user account is set as owner of particular album it has "Read", "Write" access permission rights and is allowed to control access permission rights to the access categories but not allowed to control "Owner" right and "Primary Group". "Owner" access permission right and "Primary Group" is controled by visitor or visitors with Administration authorization only

Note: To allow an user account to post images to an album the user account must have "Read" and "Write" access permission rights to the album.

The Read and Write access rights can be applied to three Access categories.

Access categoryDescription
Group All visitors which user accounts are members of the "Primary Group" and fulfil conditions of Authorized authorization belong to this access category.
Other All visitors which user accounts are not members of the "Primary Group" and fulfil conditions of Authorized authorization belong to this access category.
Unregistered All visitors who fulfil conditions of Unauthorized authorization belong to this access category.

The "Primary Group" setting appoints that the registered group acts as Group access category. On "Edit Album" form it is represented by combo box

You can pass access permissions down through the album structure by access permission rights inheritance:

Check out examples for better understanding of access restriction system. All examples assume the following album structure.

All examples assume three user group CIV, EGR and MIL.

Example 1

Everyone may view and post images in this album.

Example 2

Everyone who has logged in can view and post images in this album with the exception of logged in user who is member of CIV group.

Example 3

Everyone who is member of group MIL can view and post images in this album. Users who have logged in but aren't members of MIL group can only view images in this album.

Miscellaneous Tasks

Image Approval

This feature of the PHP Image Gallery helps to censor images posted to gallery. You must have Administration authorization to do censoring.

Click on "Approve Images" link on menu options. The following form appears.

You may adjust amount of images in form by the "Image per page" control

In the form above only one image is represented but amount of the images awaiting your approvement may differ. You always work with all images seen in the form simultaneously. This means that you must set "Approve" or "Delete" option for the each image seen. Then click on "Apply changes" button. Notice if you have set "Delete" option for an image by mistake and then clicked on "Apply changes" button this image is deleted permanently.

Skin customization

PHP Image Gallery is shipped with only one "skin" - standard. All skins lie under directory skins in your gallery installation. A skin is a set of template files which help you customaze the appearance of the gallery for your need. Make a new directory under skins directory. The easy way to begin your own skin is to copy standard skin to you directory.

The following tables helps you to identify purpose of the each template file.

Template file name Description
add_comm_form.tplTemplate for Add/Edit comments form
add_group_form.tplTemplate for Add/Edit User group form
add_item_form.tplTemplate for Add/Edit images form
add_node_form.tplTemplate for Add/Edit category form
add_user_form.tplTemplate for Add/Edit user form
admin_groups_list.tplTemplate for user group table
admin_main.tplTemplate for Site Settings form(Main configuration)
admin_node_list.tplTemplate for Category list
admin_photo.tplTemplate for Approve Images form
admin_user_list.tplTemplate for user list(user table)
first.tplTemplate for first page
footer.tplTemplate for bottom part of page
head_header.tplHTML header ends with open <body> tag
header.tplTemplate for upper part of page with Search form and Main Menu
list.tplTemplate for image preview and category
login_form.tplTemplate for Login form
main.tplTemplate for page with opened left and bottom panels
main_WOB.tplTemplate for page with opened left panel and closed bottom panel
main_WOBR.tplTemplate for page with closed left and bottom panels
main_WOR.tplTemplate for page with closed left panel and opened bottom panel
menu.tplTemplate for Main Menu
menu_admin.tplTemplate for Admnistration authorization mode Main Menu
menu_logged.tplTemplate for Authorized authorization mode Main Menu
menu_unlogged.tplTemplate for Unauthorized authorization mode Main Menu
move_item.tplTemplate for Move Image form
paging.tplTemplate for paging selector in preview and category page
permissions_denied.tplTemplate for Access permission denied message
search_form.tplTemplate for Search form
search_res.tplTemplate for search result
self_close.tplTemplate for page after successed action
show_by_day.tpl Template for an image preview by day
show_by_user.tplTemplate for an image preview by user
show_comment.tplTemplate for comments
show_large_item.tplTemplate for full size image show with comments
show_large_item_WOCOMM.tplTemplate for full size image show without comments
show_large_node.tplTemplate for category page
show_small_item.tplTemplate for an image preview
show_small_node.tplTemplate for an image preview by category
slide_next.tplTemplate for loaging new data(No design needed)
slide_show.tplTemplate for Slide show
tree.tplTemplate for tree structure
tree_item.tplTemplate for images in a tree structure
tree_node.tplTemplate for accessable categories in a tree
tree_node_hide.tplTemplate for unaccessable categories in a tree

Under you skin directory create admin directory. Copy or create the following files in the admin directiry:

Template file name Description
tree.tpl Template for a tree
tree_item.tpl Template for images in a tree
tree_node.tpl Template for categories in a tree

To switch a new skin see Site Setup and change "Skins" options under "Site Settings" option group.

Terms and Conditions

Regular License

One PHP Image Gallery script license gives the right to use one copy of the script within single domain boundaries.

Demo of Licensing Cases:
First Site URL Second Site URL Number of Licenses Required
http://www.domain.com/site_1/ http://www.domain.com/site_2/ one
http://www.domain1.com/ http://www.domain2.com/ two
http://subdomain1.domain.com/ http://subdomain2.domain.com/ two

To finalize registration process owner of the script license should provide SoftComplex Inc. with domain name which license is associated with.

Developer License

Developer license gives the right to include unlimited number of PHP Image Gallery instances in the products of license owner. Such kind of license is obtained automatically by those who have 9 or more regular licenses.

Discounts

We offer 50% discount for the script starting from second license. To take advantage of this discount use the link sent with every order confirmation message.
Same discount initially applies to educational and religious organizations.

Usage

As owner of the PHP Image Gallery license You are allowed to configure the script in any possible way for use in Internet (public), Intranet (corporate) or offline application, however You are strictly NOT allowed (unless specifically authorized by SoftComplex.com) to:

Technical Support

You are entitled to free product upgrades and technical support for at least one year from the date of purchase. Technical support includes answers to script related questions via e-mail and/or Internet instant messaging services. Full customization services are provided on customer's request at additional charge.

Violations of Terms and Conditions

Should you violate these Terms and Conditions or any other rights of SoftComplex Inc., SoftComplex Inc. reserves the right to pursue any and all legal and equitable remedies against you without limitation.

Refunds Policy

We issue no refunds for this product. Please make sure PHP Image Gallery meets your requirements before purchasing the license.

Glossary

Links and references