1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
|
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<title>documentation:1.9:portalcustom</title>
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="index,follow"/>
<meta name="keywords" content="documentation,1.9,portalcustom"/>
<link rel="search" type="application/opensearchdescription+xml" href="lib/exe/opensearch.html" title="LemonLDAP::NG"/>
<link rel="start" href="portalcustom.html"/>
<link rel="contents" href="portalcustom.html" title="Sitemap"/>
<link rel="stylesheet" type="text/css" href="lib/exe/css.php.t.bootstrap3.css"/>
<!-- //if:usedebianlibs
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
//elsif:useexternallibs
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
//elsif:cssminified
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css" />
//else -->
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.css" />
<!-- //endif -->
<script type="text/javascript">/*<![CDATA[*/var NS='documentation:1.9';var JSINFO = {"id":"documentation:1.9:portalcustom","namespace":"documentation:1.9"};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="lib/exe/js.php.t.bootstrap3.js"></script>
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.min.js"></script>
//else -->
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.js"></script>
<!-- //endif -->
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/lib/scripts/jquery-ui.min.js"></script>
//else -->
<script type="text/javascript" src="/lib/scripts/jquery-ui.js"></script>
<!-- //endif -->
</head>
<body>
<div class="dokuwiki export container">
<!-- TOC START -->
<div id="dw__toc">
<h3 class="toggle">Table of Contents</h3>
<div>
<ul class="toc">
<li class="level1"><div class="li"><a href="#skin">Skin</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#default_skin">Default skin</a></div></li>
<li class="level2"><div class="li"><a href="#skin_background">Skin background</a></div></li>
<li class="level2"><div class="li"><a href="#skin_rules">Skin rules</a></div></li>
<li class="level2"><div class="li"><a href="#skin_files">Skin files</a></div></li>
<li class="level2"><div class="li"><a href="#skin_customization">Skin customization</a></div></li>
<li class="level2"><div class="li"><a href="#messages">Messages</a></div></li>
<li class="level2"><div class="li"><a href="#template_parameters">Template parameters</a></div></li>
</ul>
</li>
<li class="level1"><div class="li"><a href="#buttons">Buttons</a></div></li>
<li class="level1"><div class="li"><a href="#password_management">Password management</a></div></li>
<li class="level1"><div class="li"><a href="#other_parameters">Other parameters</a></div></li>
</ul>
</div>
</div>
<!-- TOC END -->
<h1 class="sectionedit1" id="portal_customization">Portal customization</h1>
<div class="level1">
<div class="noteclassic">The portal is the visible part of LemonLDAP::NG, all user interactions are displayed on it.
</div>
</div>
<!-- EDIT1 SECTION "Portal customization" [1-142] -->
<h2 class="sectionedit2" id="skin">Skin</h2>
<div class="level2">
<p>
LemonLDAP::NG is shipped with 4 skins:
</p>
<ul>
<li class="level1"><div class="li"> pastel</div>
</li>
<li class="level1"><div class="li"> impact</div>
</li>
<li class="level1"><div class="li"> dark</div>
</li>
<li class="level1"><div class="li"> bootstrap</div>
</li>
</ul>
<div class="notetip">It is recommended to use <code>bootstrap</code> skin, as other may be deprecated in the future.
</div>
<p>
But you can make your own, see Skin customization below.
</p>
</div>
<!-- EDIT2 SECTION "Skin" [143-408] -->
<h3 class="sectionedit3" id="default_skin">Default skin</h3>
<div class="level3">
<p>
You can change the default skin in Manager: <code>General Parameters</code> > <code>Portal</code> > <code>Customization</code> > <code>Default skin</code>.
</p>
<p>
<img src="documentation/manager-skin-selection.png" class="mediacenter" alt="" />
</p>
<p>
Select the <code>Custom</code> skin, then set the name of the skin you want to use in the input below.
</p>
</div>
<!-- EDIT3 SECTION "Default skin" [409-705] -->
<h3 class="sectionedit4" id="skin_background">Skin background</h3>
<div class="level3">
<p>
Go in <code>General Parameters</code> > <code>Portal</code> > <code>Customization</code> > <code>Skin background</code>. You can define a background by selecting one of the available image. Use <code>None</code> to use the default skin background configuration.
</p>
<p>
<img src="documentation/manager-skin-background.png" class="mediacenter" alt="" />
</p>
</div>
<!-- EDIT4 SECTION "Skin background" [706-1007] -->
<h3 class="sectionedit5" id="skin_rules">Skin rules</h3>
<div class="level3">
<p>
You might want to display different skin depending on the <abbr title="Uniform Resource Locator">URL</abbr> that was called before being redirected to the portal, or the <abbr title="Internet Protocol">IP</abbr> address of the user.
</p>
<p>
To achieve this, you can create a rule in the Manager: select <code>General Parameters</code> > <code>Portal</code> > <code>Customization</code> > <code>Skin display rules</code> on click on “New key”. Then fill the two fields;
</p>
<ul>
<li class="level1"><div class="li"> <strong>Rule</strong>: a Perl expression (you can use %ENV hash to get environment variables, or $_url to get <abbr title="Uniform Resource Locator">URL</abbr> called before redirection, or $ipAddr to use user <abbr title="Internet Protocol">IP</abbr> address). If the rule evaluation is true, the corresponding skin is applied.</div>
</li>
<li class="level1"><div class="li"> <strong>Skin</strong>: the name of the skin to use.</div>
</li>
</ul>
</div>
<!-- EDIT5 SECTION "Skin rules" [1008-1650] -->
<h3 class="sectionedit6" id="skin_files">Skin files</h3>
<div class="level3">
<p>
A skin is composed of different files:
</p>
<ul>
<li class="level1"><div class="li"> <strong>.tpl</strong>: Perl <abbr title="HyperText Markup Language">HTML</abbr>::Template files, for <abbr title="HyperText Markup Language">HTML</abbr> content</div>
</li>
<li class="level1"><div class="li"> <strong>.css</strong>: <abbr title="Cascading Style Sheets">CSS</abbr> (styles)</div>
</li>
<li class="level1"><div class="li"> <strong>.js</strong>: Javascript</div>
</li>
<li class="level1"><div class="li"> images and other media files</div>
</li>
</ul>
<p>
A skin will often refer to the <code>common</code> skin, which is not a real skin, but shared skin objects (like scripts, images and <abbr title="Cascading Style Sheets">CSS</abbr>).
</p>
</div>
<!-- EDIT6 SECTION "Skin files" [1651-1985] -->
<h3 class="sectionedit7" id="skin_customization">Skin customization</h3>
<div class="level3">
<div class="noteimportant">If you modify directly the skin files, your modifications will certainly be erased on the next upgrade.
</div>
<p>
To customize a skin, the simplest way is to create a new skin folder:
</p>
<pre class="code">cd portal/skins
mkdir myskin
mkdir myskin/css
mkdir myskin/images</pre>
<p>
Then create symbolic links on template files, as you might not want to rewrite all <abbr title="HyperText Markup Language">HTML</abbr> code (else, do as you want).
</p>
<pre class="code">cd myskin
ln -s ../pastel/*.tpl .</pre>
<p>
We include some template files that can be customized:
</p>
<ul>
<li class="level1"><div class="li"> customhead.tpl : <abbr title="HyperText Markup Language">HTML</abbr> header markups (like <abbr title="Cascading Style Sheets">CSS</abbr>, js inclusion)</div>
</li>
<li class="level1"><div class="li"> customheader.tpl : <abbr title="HyperText Markup Language">HTML</abbr> code int the header div</div>
</li>
<li class="level1"><div class="li"> customfooter.tpm : <abbr title="HyperText Markup Language">HTML</abbr> code in the footer div</div>
</li>
</ul>
<p>
To use custom files, delete links and copy them into your skin folder:
</p>
<pre class="code">rm custom*
cp ../pastel/custom* .</pre>
<p>
Then you <em>only</em> have to write <code>myskin/css/styles.css</code> and add your media to <code>myskin/images</code>. Put all custom <abbr title="HyperText Markup Language">HTML</abbr> code in the custom template files.
</p>
<p>
To configure your new skin in Manager, select the custom skin, and enter your skin name in the configuration field.
</p>
</div>
<!-- EDIT7 SECTION "Skin customization" [1986-3080] -->
<h3 class="sectionedit8" id="messages">Messages</h3>
<div class="level3">
<p>
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) and then add to <code>lemonldap-ng.ini</code>:
</p>
<pre class="code file ini"><span class="re0"><span class="br0">[</span>portal<span class="br0">]</span></span>
# Custom error messages
<span class="re1">error_0</span> <span class="sy0">=</span><span class="re2"> Big brother is watching you, authenticated user</span>
# Custom standard messages
<span class="re1">msg_22</span> <span class="sy0">=</span><span class="re2"> Your last connections</span></pre>
<div class="notetip">You can alse define messages in several languages:
<pre class="code file ini"><span class="re0"><span class="br0">[</span>portal<span class="br0">]</span></span>
<span class="re1">error_en_0</span> <span class="sy0">=</span><span class="re2"> Big brother is watching you, authenticated user</span>
<span class="re1">error_fr_0</span> <span class="sy0">=</span><span class="re2"> Souriez vous êtes surveillés !</span></pre>
</div>
</div>
<!-- EDIT8 SECTION "Messages" [3081-3672] -->
<h3 class="sectionedit9" id="template_parameters">Template parameters</h3>
<div class="level3">
<p>
Template parameters are defined in source code. If you need to add a template parameter for your customization, then add to <code>lemonldap-ng.ini</code>:
</p>
<pre class="code file ini"><span class="re0"><span class="br0">[</span>portal<span class="br0">]</span></span>
# Custom template parameters
<span class="re1">tpl_myparam</span> <span class="sy0">=</span><span class="re2"> world</span></pre>
<p>
Then you will be able to use it in your template like this:
</p>
<pre class="code file html4strict">Hello <span class="sc2"><TMPL_VAR <span class="kw3">NAME</span><span class="sy0">=</span><span class="st0">"myparam"</span>></span>!</pre>
</div>
<!-- EDIT9 SECTION "Template parameters" [3673-4043] -->
<h2 class="sectionedit10" id="buttons">Buttons</h2>
<div class="level2">
<p>
This node allows to enable/disable buttons on the login page:
</p>
<ul>
<li class="level1"><div class="li"> <strong>Check last logins</strong>: displays a checkbox on login form, allowing user to check his login history right after opening session</div>
</li>
<li class="level1"><div class="li"> <strong>Reset password</strong>: display a link to <a href="resetpassword.html" class="wikilink1" title="documentation:1.9:resetpassword">reset your password page</a> (for password based authentication backends)</div>
</li>
<li class="level1"><div class="li"> <strong>Register</strong>: display a link to <a href="register.html" class="wikilink1" title="documentation:1.9:register">register page</a> (for password based authentication backends)</div>
</li>
</ul>
</div>
<!-- EDIT10 SECTION "Buttons" [4044-4497] -->
<h2 class="sectionedit11" id="password_management">Password management</h2>
<div class="level2">
<ul>
<li class="level1"><div class="li"> <strong>Require old password</strong>: used only in the password changing module of the menu, will check the old password before updating it</div>
</li>
<li class="level1"><div class="li"> <strong>Hide old password</strong>: used only if the password need to be reset by the user (LDAP password policy), will hide the old password input</div>
</li>
<li class="level1"><div class="li"> <strong>Send mail on password change</strong>: send a mail if the password is changed from the Menu, or from forced password reset (LDAP password policy)</div>
</li>
</ul>
</div>
<!-- EDIT11 SECTION "Password management" [4498-4948] -->
<h2 class="sectionedit12" id="other_parameters">Other parameters</h2>
<div class="level2">
<ul>
<li class="level1"><div class="li"> <strong>User attribute</strong>: which session attribute will be used to display <code>Connected as</code> in the menu</div>
</li>
<li class="level1"><div class="li"> <strong>New window</strong>: open menu links in new window</div>
</li>
<li class="level1"><div class="li"> <strong>Anti iframe protection</strong>: will kill parent frames to avoid some well known attacks</div>
</li>
<li class="level1"><div class="li"> <strong>Ping interval</strong>: Number of milliseconds between each ping (Ajax request) on the portal menu. Set to 0 to dismiss checks.</div>
</li>
</ul>
</div>
<!-- EDIT12 SECTION "Other parameters" [4949-] --></div>
</body>
</html>
|