
KB 2120: Examples of customizing the lockout page
Examples of customizing the blocking page: 1. Allow the user to send an email to the administrator if an unclassified site is blocked, 2. Warn users differently about using the override function depending on whether the site is unclassified or classified.
Background
Olfeo blocking pages are customizable and can contain HTML code as well as JavaScript. Using this technology, Olfeo blocking pages can be assigned dynamic behavior.
Here, we will use the label, which is either the alias of the category or, if it does not have one, the name of the category. The variable is case sensitive.
STEPS
Two examples are given here.
Allow the user to send an email to the administrator if an unclassified site is blocked.
In the Blocking Pages section – Main message:
<script type="text/javascript">
var label = '%Req.Category.Label%';
if (label == "URL Non Classée") {
document.write("L'accès à l'url <a title='%Req.Url%' href='%Req.Url%'>%Req.ShortUrl%</a> est restreint.
<br>L'url est dans la catégorie <a title='%Req.Category.Description%' href='%Req.Category.UrlDoc%'>%Req.Category.Label%</a>
<br><br>Si vous souhaitez que cette url soit catégorisée, merci de cliquer sur le lien ci-dessous afin que votre demande soit traitée par votre administrateur :<br>
<a href='mailto:admin@masociete.com?body=%Req.Url% est dans la catégorie : %Req.Category.Label%&subject=Demande de reclassification - %Req.Url%'>
<H4><b>admin@masociete.com</b></H4></a>");
}
else {
document.write("Le site <a title='%Req.Url%' href='%Req.Url%'>%Req.ShortUrl%</a> est bloqué");
}
</script>
Results for ranked sites:

Results for unranked sites:

Notify users differently about the use of the override function depending on whether the site is unclassified or classified.
In the Overridesection – Override request:
<script type="text/javascript">
var label = '%Req.Category.Label%';
if (label == "URL Non Classée") {
document.write("Ne reconnaissant pas ce site, vous pouvez tout simplement l'outrepasser en étant bien conscient des risques que cela peut avoir");
}
else {
document.write("<b>Si vous pensez que l'accès à ce site est conforme à la charte Internet, vous pouvez y accéder librement hors de cette règle. Est-ce le cas ? </b>");
}
</script>
Results for ranked sites:
