User Tools

Site Tools


podoc:configuration_file

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 explanation, 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

$bug_url = "http://bugs.shaftnet.org/"

Logged-in users are shown a link to a URL to where they can report bugs or problems with the installation. The default is the main Photo Organizer bug tracker, but generally it should point to a means to contact the site administrator.

$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.

Remember to substitute any double quotation marks (“) in that code with single quotes (').

Example:

  $ad_script = "<script type='text/javascript'>
  <!--
  google_ad_client = 'pub-1111111';
  /* 234x60 banner */
  google_ad_slot = '1111111';
  google_ad_width = 234;
  google_ad_height = 60;
  //-->
  </script>
  <script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>";

$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 = ”“;

$po_session_lifetime = 0;   // in seconds, 0 means 'system default'
$po_session_handler = "";

If you wish to override PHP's default session handler, these options should be set to whatever is appropriate. See the config.php file for other examples.

$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.

$use_gm = FALSE; //

Set this to TRUE if you wish to use GraphicsMagick instead of ImageMagick. If enabled, the $sys_gm setting must also be set correctly.

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_gm = "/usr/bin/gm";

The path to the GraphicsMagick's gm tool. This can be used instead of ImageMagick.

$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'] = 690;

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_enable'] = '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.

$po_options_default['show_ads] = 'f';

Set this to 't' If you want users to see ads by default. Only matters if you have advertisements globally enabled.

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
  • it_IT
$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 ←
17Access Rights →
18Access Rights ←
19Owner ID →
20Owner ID ←
21Random
$po_options['folder_order_by'] = 7;

Default subfolder/subalbum sort order. It is overridable at any time by clicking on the column headers. Here are the valid values:

valuemeaning
1Date Created→
2Date Created ←
3Caption →
4Caption ←
5Date Changed →
6Date Changed ←
7Access Rights →
8Access Rights ←
9Number of Photos →
10Number of Photos ←
11Number of sub-folder/albums →
12Number of sub-folder/albums ←
13Owner ID →
14Owner ID ←
15Random
$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['hide_originals_default'] = 't';

Default setting for photo imports.

$po_settings['access_default'] = PO_ACCESS_PUBLIC;

Default access rights for photo imports.

$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
$po_options['export_format'] = 'tar'; 

Change this to 'zip' if you want to default to exports in the ZIP format.

podoc/configuration_file.txt · Last modified: 2008/02/16 16:49 by Richie