You can change the default Main Logo in Manager: General Parameters > Portal > Customization > Main Logo.
A blank value disables Main Logo display.
- Logo file path must be like my/path/logo.png
- Main logo is included in Portal templates AND mail body
You can disabled languages choice in Manager: General Parameters > Portal > Customization > Show languages choice.
Option enabled by default.
LemonLDAP::NG is shipped with bootstrap skin.
But you can make your own. See Skin customization below.
You can change the default skin in Manager: General Parameters
> Portal
> Customization
> Default skin
.
Select the Custom
skin, then set the name of the skin you want to use in the input below.
Go in General Parameters
> Portal
> Customization
> Skin background
. You can define a background by selecting one of the available image. Use None
to use the default skin background configuration.
To set your own background, copy your file in /usr/share/lemonldap-ng/portal/htdocs/skins/common/backgrounds/
and register it in /etc/lemonldap-ng/lemonldap-ng.ini
:
[portal] portalSkinBackground = file.png
You can also use lemonldap-ng-cli
:
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli set portalSkinBackground file.png
You might want to display different skin depending on the URL that was called before being redirected to the portal, or the IP address of the user.
To achieve this, you can create a rule in the Manager: select General Parameters
> Portal
> Customization
> Skin display rules
on click on "New key". Then fill the two fields;
A skin is composed of different files:
A skin will often refer to the common
skin, which is not a real skin, but shared skin objects (like scripts, images and CSS).
Here we explain how to create a new skin, named myskin
, from the bootstrap
skin.
First copy static content:
cd /usr/share/lemonldap-ng/portal/htdocs/static mkdir myskin cd myskin/ cp -a ../bootstrap/js/ . cp -a ../bootstrap/css/ . mkdir images
Then create symbolic links on template files, as you might not want to rewrite all HTML code (else, do as you want).
cd /usr/share/lemonldap-ng/portal/templates/ mkdir myskin cd myskin/
We include some template files that can be customized:
To use custom files, copy them into your skin folder:
cp ../bootstrap/custom* .
Then you can add your media to myskin/images
, you will be able to use them in HTML template with this code:
<img src="<TMPL_VAR NAME="STATIC_PREFIX">myskin/images/logo.png" class="img-responsive center-block" />
To change CSS, two options:
<link href="<TMPL_VAR NAME="STATIC_PREFIX">myskin/css/myskin.css" rel="stylesheet" type="text/css" />
Put then all custom HTML code in the custom template files.
To configure your new skin in Manager, select the custom skin, and enter your skin name in the configuration field. For example with lemonldap-ng-cli:
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli -yes 1 set portalSkin 'myskin' portalSkinBackground ''
Messages are defined in source code. If they really do not please you, override them! You just need to know the ID of the message (look at Portal/Simple.pm).
There are two methods to do this:
lemonldap-ng.ini
:[portal] # Custom error messages error_0 = Big brother is watching you, authenticated user # Custom standard messages msg_lastLogins = Your last connections
You can also define messages in several languages or disable message boxes by using the bareword _hide_
:
error_en_0 = Big brother is watching you, authenticated user error_fr_0 = Souriez vous êtes surveillés ! msg_fr_lastLogins = Dernières connexions error_9 = _hide_
If you have a custom skin, then you can create a lang file in templates/<your skin>
similar to the default lang files provided in htdocs/static/languages/
.
For example templates/myskin/en.json
:
{ "PE9":"Please authenticate!" }
You can also create a file called all.json
to override messages in all languages.
If you modify the menu template to add some tabs, you should add the new tabs in `customMenuTabs` parameter in lemonldap-ng.ini:
[portal] customMenuTabs = test, test2
This will allow one to display the tab directly with this URL: http://auth.example.com/?tab=test
Template parameters are defined in source code. If you need to add a template parameter for your customization, then add to lemonldap-ng.ini
:
[portal] # Custom template parameters tpl_myparam = world
Then you will be able to use it in your template like this:
Hello <TMPL_VAR NAME="myparam">!
All session variables are also available in templates, with the prefix session_
:
Hello <TMPL_VAR NAME="session_cn">!
You can also display environment variables, with the prefix env_
:
Your IP is <TMPL_VAR NAME="env_REMOTE_ADDR">
This node allows one to enable/disable buttons on the login page:
Connected as
in the menuX-Frame-Options
and CSP frame-ancestors
headers (see Browser compatibility)