User Tools

Site Tools


podoc:configuration_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
podoc:configuration_file [2007/08/16 23:21] pizzapodoc:configuration_file [2008/02/16 21:49] (current) – Added $ad_script sample code to show quote substitution Richie
Line 19: Line 19:
   $db_dsn = "dbname=po_db user=po_user password=po_password";   $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 [[podoc:installation|Installation]] documentation for valid syntax.+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 [[podoc:installation|Installation]] documentation for valid syntax.
  
   $image_repository_path = "/export/po_dev_image_repository";   $image_repository_path = "/export/po_dev_image_repository";
Line 28: Line 28:
  
 This must be disabled during normal operation, and enabled if you wish to run the installer as part of an upgrade process. This must be disabled during normal operation, and enabled if you wish to run the installer as part of an upgrade process.
 +
  
 ==== Advanced Settings ==== ==== 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 = "";   $ad_script = "";
Line 35: Line 40:
 If you wish ads to be displayed on your PO site, fill this variable with the javascript code that your ad provider supplied.  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://
 +<code>
 +  $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>";
 +</code>
 + 
 + 
   $compress_pages = true;   $compress_pages = true;
  
Line 46: Line 68:
    
   $po_session_path = "";   $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 storage pathit goes here. +If you wish to override PHP's default session handlerthese options should be set to whatever is appropriate.  See the //config.php// file for other examples.
- +
-  $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";   $tmp_volume_path = "/tmp";
Line 68: Line 88:
  
 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. 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 ==== ==== Helper applications ====
Line 78: Line 102:
  
 The path to ImageMagick's //composite// tool.  This is used to watermark images. 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";   $sys_dcraw = "/usr/bin/dcraw";
Line 119: Line 147:
 |PO_USER_TYPE_ADMIN|User has full access to system| |PO_USER_TYPE_ADMIN|User has full access to system|
  
-  $po_options_default['volume_max_size'] = 640;+  $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. 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';+  $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. Set this to 'f' to disable bulk upload for new users.  This can be changed on a per-user basis via the administration interface.
Line 134: Line 162:
  
 This is the maximum number of images a user can upload.  Setting this to //0// disables the quota.   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 ==== ==== Per-User Settings ====
Line 141: Line 173:
 === Photo Browser Settings ===  === Photo Browser Settings === 
  
-  $po_options['lang'] = 'en_US'+  $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: 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:
Line 149: Line 181:
   * fr_FR   * fr_FR
   * nl_NL   * nl_NL
 +  * it_IT
  
-  $po_options['order_by'] = 7+  $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: Default image sort order.  It is overridable at any time, on any of the photo listing pages.  Here are the valid values:
Line 171: Line 204:
 |15|Identifier ->| |15|Identifier ->|
 |16|Identifier <-| |16|Identifier <-|
 +|17|Access Rights ->|
 +|18|Access Rights <-|
 +|19|Owner ID ->|
 +|20|Owner ID <-|
 +|21|Random|
  
-  $po_options['photos_per_page'] = 20+  $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: 
 + 
 +^value^meaning^ 
 +|1|Date Created->
 +|2|Date Created <-| 
 +|3|Caption ->| 
 +|4|Caption <-| 
 +|5|Date Changed ->| 
 +|6|Date Changed <-| 
 +|7|Access Rights ->| 
 +|8|Access Rights <-| 
 +|9|Number of Photos ->| 
 +|10|Number of Photos <-| 
 +|11|Number of sub-folder/albums ->| 
 +|12|Number of sub-folder/albums <-| 
 +|13|Owner ID ->| 
 +|14|Owner ID <-| 
 +|15|Random| 
 + 
 +  $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.  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+  $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.  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'+  $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. This can also be set to 'list' to show a tabular listing of the images, rather than the slide view which includes thumbnails.
Line 186: Line 245:
 === Import Settings ===  === Import Settings === 
  
-  $po_options['preview_format'] = 'jpeg'+  $po_options['preview_format'] = 'jpeg';
  
 The format of the preview images.  Can also be 'png'. The format of the preview images.  Can also be 'png'.
  
-  $po_options['preview_quality'] = 85+  $po_options['preview_quality'] = 85;
  
 A percentage.  Higher numbers are higher quality but larger files. A percentage.  Higher numbers are higher quality but larger files.
  
-  $po_options['preview_color_space'] = 'RGB'+  $po_options['preview_color_space'] = 'RGB';
  
 The colorspace used for image scaling and other transformations.  You should never need to change this. The colorspace used for image scaling and other transformations.  You should never need to change this.
  
-  $po_options['preview_gamma'] = 1+  $po_options['preview_gamma'] = 1;
  
 Gamma correction used when generating the preview image. Gamma correction used when generating the preview image.
  
-  $po_options['preview_sharpen_radius'] = 0.5 +  $po_options['preview_sharpen_radius'] = 0.5; 
-  $po_options['preview_sharpen_sigma'] = 0.5 +  $po_options['preview_sharpen_sigma'] = 0.5; 
-  $po_options['preview_sharpen_amount'] = 1.4 +  $po_options['preview_sharpen_amount'] = 1.4; 
-  $po_options['preview_sharpen_threshold'] = 0.05+  $po_options['preview_sharpen_threshold'] = 0.05;
  
 The default parameters for the //unsharp mask// transform. The default parameters for the //unsharp mask// transform.
  
-  $po_options['preview_border_width'] = 0 +  $po_options['preview_border_width'] = 0; 
-  $po_options['preview_border_height'] = 0 +  $po_options['preview_border_height'] = 0; 
-  $po_options['preview_border_color'] = '000000'+  $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. 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'+  $po_options['thumb_format'] = 'jpeg';
  
 The format of the thumbnail images.  Can also be 'png'. The format of the thumbnail images.  Can also be 'png'.
  
-  $po_options['thumb_quality'] = 85+  $po_options['thumb_quality'] = 85;
  
 A percentage.  Higher numbers are higher quality but larger files. A percentage.  Higher numbers are higher quality but larger files.
  
-  $po_options['thumb_color_space'] = 'RGB'+  $po_options['thumb_color_space'] = 'RGB';
  
 The colorspace used for image scaling and other transformations.  You should never need to change this. The colorspace used for image scaling and other transformations.  You should never need to change this.
  
-  $po_options['thumb_gamma'] = 1+  $po_options['thumb_gamma'] = 1;
  
 Gamma correction used when generating the thumbnail image. Gamma correction used when generating the thumbnail image.
  
-  $po_options['thumb_sharpen_radius'] = 0.5 +  $po_options['thumb_sharpen_radius'] = 0.5; 
-  $po_options['thumb_sharpen_sigma'] = 0.5 +  $po_options['thumb_sharpen_sigma'] = 0.5; 
-  $po_options['thumb_sharpen_amount'] = 2.2 +  $po_options['thumb_sharpen_amount'] = 2.2; 
-  $po_options['preview_sharpen_threshold'] = 0.00+  $po_options['preview_sharpen_threshold'] = 0.00;
  
 The default parameters for the //unsharp mask// transform.  Thumbnails generally need excessive sharpening. The default parameters for the //unsharp mask// transform.  Thumbnails generally need excessive sharpening.
  
-  $po_options['thumb_border_width'] = 0 +  $po_options['thumb_border_width'] = 0; 
-  $po_options['thumb_border_height'] = 0 +  $po_options['thumb_border_height'] = 0; 
-  $po_options['thumb_border_color'] = '000000'+  $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. 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_brightness'] = 0; 
-  $po_options['watermark_location'] = 'center'+  $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. 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'+  $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. 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+  $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: 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:
Line 261: Line 320:
 |2|AdobeRGB 1998| |2|AdobeRGB 1998|
  
-  $po_options['ufraw_gamma'] = 0.45 +  $po_options['hide_originals_default'] = 't'; 
-  $po_options['ufraw_gamma_linearity'] = 0.10+ 
 +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.   The gamma curve used by the //ufraw// RAW decoder.  
  
-  $po_options['dcraw_brightness'] = 1.0+  $po_options['dcraw_brightness'] = 1.0;
  
 The brightness correction factor used by the //dcraw// RAW decoder.  //1.0// is a neutral setting. The brightness correction factor used by the //dcraw// RAW decoder.  //1.0// is a neutral setting.
  
-  $po_options['raw_white_balance'] = "camera"+  $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. This is recommended; the other settings is "auto" which causes the raw decoder to guess the correct white balance.
  
-  $po_options['raw_bitdepth'] = 24+  $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. 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'+  #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. 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.
Line 284: Line 351:
 === Other Settings === === Other Settings ===
  
-  $po_options['print_out'] = 'pdf'+  $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// 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['start_hour'] = 8  //8:00am// 
-  $po_options['end_hour'] = 20    //8:00pm//+  $po_options['end_hour'] = 20   //8:00pm//
  
 The first and last hours to show on the daily calendar. The first and last hours to show on the daily calendar.
  
-  $po_options['start_day'] = 1   //Sunday//+  $po_options['start_day'] = 1  //Sunday//
  
 The first day of the week as shown on the calendar. The first day of the week as shown on the calendar.
Line 305: Line 372:
 |6|Saturday| |6|Saturday|
  
-  $po_options['paper'] = 13  //A4// +  $po_options['paper'] = 13 //A4// 
-  $po_options['label'] = 17  //Avery 6020//+  $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. 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_enable'] = 't'; 
-  $po_options['popup_delay'] = 100+  $po_options['popup_delay'] = 100;
  
 The toggle, and delay (in ms) for the popup informational windows. The toggle, and delay (in ms) for the popup informational windows.
  
-  $po_options['search_engine_type'] = 1 +  $po_options['search_engine_type'] = 1; 
-  $po_options['search_enable_stemming'] = 'f'+  $po_options['search_enable_stemming'] = 'f';
  
 ^id^type^ ^id^type^
 |1|General Text| |1|General Text|
 |2|Advanced Text| |2|Advanced Text|
 +
 +  $po_options['export_format'] = 'tar'; 
 +
 +Change this to //'zip'// if you want to default to exports in the ZIP format.
podoc/configuration_file.1187306472.txt.gz · Last modified: 2007/08/16 23:21 by pizza