User Tools

Site Tools


podoc:configuration_file

This is an old revision of the document!


Configuration File

Photo Organizer's configuration file lives under include/config.php. However, we recommend you make all configuration changes to include/config_site.php instead.

All configuration settins and their current defaults are shown below:

Core settings

These settings MUST be changed in order for your installation to function

$site_url = "http://localhost/po";

If this URL is entered into a browser it should take you to your Photo Organizer installation.

$site_title = "My Photo Organizer";

The name of the site. Displayed on the title bar of each page.

$db_dsn = "dbname=po_db user=po_user password=po_password";

The Data Source Name used to connect to the database. Several examples are given in config_site.php, but for a detailed explanataion, see the Installation documentation for valid syntax.

$image_repository_path = "/export/po_dev_image_repository";

This is the base directory of where Photo Organizer will keep the images its users upload. It must be writable by the web server user.

$install_enabled = true;

This must be disabled during normal operation, and enabled if you wish to run the installer as part of an upgrade process.

Advanced Settings

$ad_script = ""

If you wish ads to be displayed on your PO site, fill this variable with the javascript code that your ad provider supplied.

$compress_pages = true

When enabled, you can save significant amounts of bandwidth if PO determines that the client browser supports transparent compression.

$local_bulk_upload = false

When enabled, an additional box will appear on the upload screen that allows the user to specify a directory on the web server that contains the images to be imported.

Note: This is a potentially huge security hole. Do NOT enable it if you don't trust all of your users, and NEVER enable it if your site allows open registration.

$po_session_path = “”

If you wish to override PHP's default session storage path, it goes here.

$po_session_lifetime = 60*60*24*30   //(One month)//

This value, in seconds, specifies how long we keep stale sessions around.

$tmp_volume_path = "/tmp"

If you wish to use a different path for PO's temporary working files, it goes here.

$theme = “themes/aqua”

If you wish to use a different theme, specify the path to its files. Please note that PO currently only comes with one theme.

$default_cred_timeout = 60 * 10  //(10 minutes)//

This is the time, in seconds, between session preference refreshes for logged-in users. In practice it only affects users who are logged in simultaneously on multiple computers.

$raw_decoder = "dcraw,ufraw,exiftool"

The RAW decoders we should actually use, in the order they should be tried. If one is not present, it will be ignored. If none are usable, then RAW images will not be supported.

Helper applications

$sys_convert = "/usr/bin/convert"

The path to ImageMagick's covert tool. This is used to convert and resize images. Required

$sys_composite = "/usr/bin/composite"

The path to ImageMagick's composite tool. This is used to watermark images.

$sys_dcraw = "/usr/bin/dcraw"

The path to the dcraw RAW converter.

$sys_exiftool = "/usr/bin/exiftool"

The path to the ExifTool utility. This is used to extract image metadata. Required

$sys_ufraw = "/usr/bin/ufraw-batch"

The path to the UFRaw batch conversion utility.

$sys_dcm2pnm = "/usr/bin/dcm2pnm"

The path to the DICOM dcm2pnm conversion utility. This is only needed if you wish to work with DICOM images.

$sys_ps2pdf = "/usr/bin/ps2pdf"

The path to the PS2PDF utility. Only needed if you wish to print directly to PDF files.

$sys_tar = "/usr/bin/tar"

The path to the tar utility. If you wish to import or export tarballs of images, this is required.

$sys_unzip = /usr/bin/unzip"

The path to the unzip utility. This is required if you wish to import zip files of images.

Default user parameters

$po_options_default['new_user_type'] = PO_USER_TYPE_USER

This specifies the default user type if someone tries to register.

valuemeaning
PO_USER_TYPE_DISABLEDNo user registrations are allowed
PO_USER_TYPE_CLIENTUser has no rights to upload images
PO_USER_TYPE_USERUser has access to all features
PO_USER_TYPE_ADMINUser has full access to system
$po_options_default['volume_max_size'] = 640

This specifies the default image volume size, in megabytes. Once the current working volume reaches this limit, it will be closed and a new one will be created. This allows volumes to be easily backed up, as once closed the volume will not be written to again.

$po_options_default['bulk_upload_enabled'] = 't'

Set this to 'f' to disable bulk upload for new users. This can be changed on a per-user basis via the administration interface.

$po_options_default['quota_size'] = 0

This is the size, in bytes, of the maximum amount of space a user can fill with their images. Setting this to 0 disables the quota.

$po_options_default['quota_files'] = 0

This is the maximum number of images a user can upload. Setting this to 0 disables the quota.

Per-User Settings

These settings can be overridden by individual users.

Photo Browser Settings

$po_options['lang'] = 'en_US'

The default language of the system. To see a list of available languages, see the lang/* directory of the PO installation. As of this writing, the following langages are supported:

  • de_DE
  • en_US
  • fr_FR
  • nl_NL
$po_options['order_by'] = 7

Default image sort order. It is overridable at any time, on any of the photo listing pages. Here are the valid values:

valuemeaning
1Image Rating →
2Image Rating ←
3Image Views →
4Image Views ←
5Date imported →
6Date imported ←
7Date exposed →
8Date exposed ←
9Filename →
10Filename ←
11Caption →
12Caption ←
13Title →
14Title ←
15Identifier →
16Identifier ←
$po_options['photos_per_page'] = 20

The number of images that appear by default when viewing folders and albums in the slide view. It is overridable at any time, on any of the photo listing pages.

$po_options['rows_list_view'] = 20

The number of images that appear by default when viewing folders and albums in the list view. It is overridable at any time, on any of the photo listing pages.

$po_options['photo_view'] = 'slide'

This can also be set to 'list' to show a tabular listing of the images, rather than the slide view which includes thumbnails.

Import Settings

$po_options['preview_format'] = 'jpeg'

The format of the preview images. Can also be 'png'.

$po_options['preview_quality'] = 85

A percentage. Higher numbers are higher quality but larger files.

$po_options['preview_color_space'] = 'RGB'

The colorspace used for image scaling and other transformations. You should never need to change this.

$po_options['preview_gamma'] = 1

Gamma correction used when generating the preview image.

$po_options['preview_sharpen_radius'] = 0.5
$po_options['preview_sharpen_sigma'] = 0.5
$po_options['preview_sharpen_amount'] = 1.4
$po_options['preview_sharpen_threshold'] = 0.05

The default parameters for the unsharp mask transform.

$po_options['preview_border_width'] = 0
$po_options['preview_border_height'] = 0
$po_options['preview_border_color'] = '000000'

The width and height, in pixels, and the border color, in RRGGBB hexidecimal format, of the border we draw around the image. Set width and height to 0 to disable.

$po_options['thumb_format'] = 'jpeg'

The format of the thumbnail images. Can also be 'png'.

$po_options['thumb_quality'] = 85

A percentage. Higher numbers are higher quality but larger files.

$po_options['thumb_color_space'] = 'RGB'

The colorspace used for image scaling and other transformations. You should never need to change this.

$po_options['thumb_gamma'] = 1

Gamma correction used when generating the thumbnail image.

$po_options['thumb_sharpen_radius'] = 0.5
$po_options['thumb_sharpen_sigma'] = 0.5
$po_options['thumb_sharpen_amount'] = 2.2
$po_options['preview_sharpen_threshold'] = 0.00

The default parameters for the unsharp mask transform. Thumbnails generally need excessive sharpening.

$po_options['thumb_border_width'] = 0
$po_options['thumb_border_height'] = 0
$po_options['thumb_border_color'] = '000000'

The width and height, in pixels, and the border color, in RRGGBB hexidecimal format, of the border we draw around the image. Set width and height to 0 to disable.

$po_options['watermark_brightness'] = 0
$po_options['watermark_location'] = 'center'

The opacity and position of the watermark image. A value of 0 disables watermarking, 100 overlays the watermark on top, and a value in the middle blends the two to varying degrees. The location refers to where on the original image the watermark is applied. It can be one of: northeast, north, northwest, east, center, west, southeast, south, southwest.

$po_options['preview_copy_metadata'] = 't'

If enabled, this transfers the EXIF metadata from the uploaded file to its preview image. This is generally a good thing, although it does enlarge the file a bit.

$po_options['colorspace'] = 1

This refers to the default ICC colorspace used for the image. Any value other than '1' will cause the preview and thumbnail images to be color-corrected to display properly in web browsers. Legal values:

value
1sRGB
2AdobeRGB 1998
$po_options['ufraw_gamma'] = 0.45
$po_options['ufraw_gamma_linearity'] = 0.10

The gamma curve used by the ufraw RAW decoder.

$po_options['dcraw_brightness'] = 1.0

The brightness correction factor used by the dcraw RAW decoder. 1.0 is a neutral setting.

$po_options['raw_white_balance'] = "camera"

This is recommended; the other settings is “auto” which causes the raw decoder to guess the correct white balance.

$po_options['raw_bitdepth'] = 24

This is the working bitdepth for intermediary images when importing RAW files. This can also be set to 48 but unless you have a calibrated ICC profile for the camera, it is not recommended.

#po_options['jpgfromraw'] = 't'

Many RAW formats (NEF and CR2 in particular) include an embedded full-resolution JPEG preview image. When this option is enabled, Photo Organizer will extract this image and import it alongside the original RAW as a secondary version of the image.

Other Settings

$po_options['print_out'] = 'pdf'

You may set this to 'ps' if you wish to generate postscript instead, but unless you cannot install the ps2pdf utility, we recommend you use the default of pdf

$po_options['start_hour'] = 8   //8:00am//
$po_options['end_hour'] = 20    //8:00pm//

The first and last hours to show on the daily calendar.

$po_options['start_day'] = 1   //Sunday//

The first day of the week as shown on the calendar.

numday
1Sunday
2Monday
3Tuesday
4Wednesday
5Thursday
6Saturday
$po_options['paper'] = 13  //A4//
$po_options['label'] = 17  //Avery 6020//

The default paper and label types; the full list is impractical to list here. However, the paper type of '1' corresponds to 'US Letter', which may be a preferred default.

$po_options['popup_enable'] = 't'
$po_options['popup_delay'] = 100

The toggle, and delay (in ms) for the popup informational windows.

$po_options['search_engine_type'] = 1
$po_options['search_enable_stemming'] = 'f'
idtype
1General Text
2Advanced Text
podoc/configuration_file.1187300636.txt.gz · Last modified: 2007/08/16 21:43 by pizza