Customizing Error Messages - MikroTik RouterOS v2.9 Reference Manual

Reference manual
Table of Contents

Advertisement

• radius<id>u - show the attribute identified with <id> in unsigned form (in case RADIUS
authentication was used; "0" otherwise)
• radius<id>-<vnd-id> - show the attribute identified with <id> and vendor ID <vnd-id> in text
string form (in case RADIUS authentication was used; "" otherwise)
• radius<id>-<vnd-id>u - show the attribute identified with <id> and vendor ID <vnd-id> in
unsigned form (in case RADIUS authentication was used; "0" otherwise)
Working with variables
statements can be used in theses pages. Following content will be included, if
$(if <var_name>)
value of <var_name> will not be an empty string. It is an equivalent to
is possible to compare on equivalence as well:
have effect until
$(elif <var_name>)
Only one of those expressions will be shown. Which one - depends on values of those variables for
each client.

Customizing Error Messages

All error messages are stored in the errors.txt file within the respective HotSpot servlet directory.
You can change and translate all these messages to your native language. To do so, edit the
errors.txt file. You can also use variables in the messages. All instructions are given in that file.
Multiple Versions of HotSpot Pages
Multiple hotspot page sets for the same hotspot server are supported. They can be chosen by user
(to select language) or automatically by JavaScript (to select PDA/regular version of HTML pages).
To utilize this feature, create subdirectories in HotSpot HTML directory, and place those HTML
files, which are different, in that subdirectory. For example, to translate everything in Latvian,
subdirectory "lv" can be created with login.html, logout.html, status.html, alogin.html, radvert.html
and errors.txt files, which are translated into Latvian. If the requested HTML page can not be found
in the requested subdirectory, the corresponding HTML file from the main directory will be used.
Then main login.html file would contain link to "/lv/login?dst=$(link-orig-esc)", which then
displays Latvian version of login page:
.
And
Latvian
href="/login?dst=$(link-orig-esc)">English</a>
Another way of referencing directories is to specify 'target' variable:
After preferred directory has been selected (for example, "lv"), all links to local HotSpot pages will
contain that path (for example,
hotspot pages reference links using "$(link-xxx)" variables, then no more changes are to be made -
each client will stay within the selected directory all the time.
Notes
If you want to use HTTP-CHAP authentication method it is supposed that you include the
doLogin() function (which references to the md5.js which must be already loaded) before the
Page 524 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
,
$(else)
<a href="/lv/login?dst=$(link-orig-esc)">Latviski</a>
version
would
$(link-status) = "http://hotspot.mt.lv/lv/status"
$(if <var_name> == <value>)
or
. In general case it looks like this:
$(endif)
contain
link
$(if <var_name> != "")
These statements
to
English
version:
It
<a
). So, if all

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents