From 38bb1b77637affd66f04ff4df5e59c50cb2f92f4 Mon Sep 17 00:00:00 2001 From: Paul Curie Date: Mon, 7 Jun 2021 14:33:11 +0200 Subject: [PATCH] #88 photos --- docs/index.rst | 1 + docs/photos.rst | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 docs/photos.rst diff --git a/docs/index.rst b/docs/index.rst index 1332929..6a5d428 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,3 +11,4 @@ LDAP Tool Box White-Pages documentation general-parameters.rst ldap-parameters.rst attributes.rst + photos.rst diff --git a/docs/photos.rst b/docs/photos.rst new file mode 100644 index 0000000..742727f --- /dev/null +++ b/docs/photos.rst @@ -0,0 +1,55 @@ +Photos +====== + +.. note:: Configuration file: ``white-pages/conf/config.inc.local.php`` + +Default photo +------------- + +Configure which file is used as default photo : + +.. code-block:: php + + $default_photo = "images/240px-PICA.jpg"; + +LDAP attribute +-------------- + +Set the name of the LDAP attribute where photo is stored : + +.. code-block:: php + + $photo_ldap_attribute = "jpegPhoto"; + +Fixed size +---------- + +It is possible to resize all photos to a defined width and/or height : + +.. code-block:: php + + $photo_fixed_width = 240; + $photo_fixed_height = 240; + +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) : + +.. code-block:: php + + $photo_local_directory = "../photos/"; + +LDAP attribute that is used as photo file name : + +.. code-block:: php + + $photo_local_ldap_attribute = "uid"; + +File extenstion (with the dot) : + +.. code-block:: php + + $photo_local_extension = ".jpg";