Differences

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

Link to this comparison view

documentation:white-pages:latest:config_photos [2018/04/09 16:30] (current)
Line 1: Line 1:
 +====== Photos ======
  
 +<​note>​Configuration file: use [[config_general#​configuration_files|White-Pages'​ local configuration file]]</​note>​
 +
 +==== Default photo ====
 +
 +Configure which file is used as default photo:
 +<file php>
 +$default_photo = "​images/​240px-PICA.jpg";​
 +</​file>​
 +
 +==== LDAP attribute ====
 +
 +Set the name of the LDAP attribute where photo is stored:
 +<file php>
 +$photo_ldap_attribute = "​jpegPhoto";​
 +</​file>​
 +
 +==== Fixed size ====
 +
 +It is possible to resize all photos to a defined width and/or height:
 +<file php>
 +$photo_fixed_width = 240;
 +$photo_fixed_height = 240;
 +</​file>​
 +
 +==== Local photos ====
 +
 +This is possible to load a local photo from file if photo is not found in LDAP directory.
 +
 +Directory where photo are stored (relative to htdocs/ directory):
 +<file php>
 +$photo_local_directory = "​../​photos/";​
 +</​file>​
 +
 +LDAP attribute that is used as photo file name:
 +<file php>
 +$photo_local_ldap_attribute = "​uid";​
 +</​file>​
 +
 +File extenstion (with the dot):
 +<file php>
 +$photo_local_extension = "​.jpg";​
 +</​file>​