diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40b32c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +ldap-user-manager.iml diff --git a/README.md b/README.md index 28ae3ea..be783a6 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,24 @@ To send emails you'll need to use an existing SMTP server. Email sending will b * `ACCOUNT_REQUESTS_EMAIL` (default: *{EMAIL_FROM_ADDRESS}*): This is the email address that any requests for a new account are sent to. +#### Website customization + +* `$CUSTOM_LOGO` (default: *FALSE*)*: If this is defined with path to image file, then this image will be displayed in header. You need also mount volume with this file. + +* `$CUSTOM_STYLES` (default: *FALSE*)*: If this is defined with path to css file, then this style will be used in header. Also helps vith logo positioninig. You need also mount volume with this file. + +docker-compose.yml example: + +```yaml +ldap-user-manager: + environment: + CUSTOM_LOGO: "../gfx/logo.svg" + CUSTOM_STYLES: "../css/custom.css" + volumes: + - '/opt/openldap/www/gfx:/opt/ldap_user_manager/gfx' + - '/opt/openldap/www/css:/opt/ldap_user_manager/css' +``` + #### Debugging settings * `LDAP_DEBUG` (default: *FALSE*): Set to TRUE to increase the logging level for LDAP requests. This will output passwords to the error log - don't enable this in a production environment. This is for information on problems updating LDAP records and such. To debug problems connecting to the LDAP server in the first place use `LDAP_VERBOSE_CONNECTION_LOGS`. diff --git a/www/includes/config.inc.php b/www/includes/config.inc.php index 77c1935..d62de2d 100644 --- a/www/includes/config.inc.php +++ b/www/includes/config.inc.php @@ -169,6 +169,9 @@ # Sanity checking + $CUSTOM_LOGO = (getenv('CUSTOM_LOGO') ? getenv('CUSTOM_LOGO') : FALSE); + $CUSTOM_STYLES = (getenv('CUSTOM_STYLES') ? getenv('CUSTOM_STYLES') : FALSE); + $errors = ""; if (empty($LDAP['uri'])) { diff --git a/www/includes/web_functions.inc.php b/www/includes/web_functions.inc.php index dea3fc0..0efa695 100644 --- a/www/includes/web_functions.inc.php +++ b/www/includes/web_functions.inc.php @@ -247,7 +247,7 @@ function log_out($method='normal') { function render_header($title="",$menu=TRUE) { - global $SITE_NAME, $IS_ADMIN, $SENT_HEADERS, $SERVER_PATH; + global $SITE_NAME, $IS_ADMIN, $SENT_HEADERS, $SERVER_PATH, $CUSTOM_STYLES; if (empty($title)) { $title = $SITE_NAME; } @@ -260,6 +260,7 @@ function render_header($title="",$menu=TRUE) { + ' ?> @@ -295,14 +296,15 @@ function render_menu() { #Render the navigation menu. #The menu is dynamically rendered the $MODULES hash - global $SITE_NAME, $MODULES, $THIS_MODULE, $VALIDATED, $IS_ADMIN, $USER_ID, $SERVER_PATH; + global $SITE_NAME, $MODULES, $THIS_MODULE, $VALIDATED, $IS_ADMIN, $USER_ID, $SERVER_PATH, $CUSTOM_LOGO; ?>