Page 1 of 1

local language

Posted: Sat May 03, 2014 2:52 pm
by c95539
how to use The local language tips,when the login's error?(user manager)

Re: local language

Posted: Sat May 03, 2014 4:45 pm
by c95539
# radius-reply
# Radius server returned some custom error message

radius-reply = $(error-orig)


HOW TO CHANGE?

Re: local language

Posted: Sat May 03, 2014 6:04 pm
by bax
You have errors.txt in hotspot directory ... change it wherever you like :)

Re: local language

Posted: Wed May 07, 2014 5:37 pm
by mousa1983
Dear Box,error.txt is for Hotspot errors
-----------------------------
For changing UM errors,you must change login page
using javascript code
copy this insteed error in loging page in $(error)
$(if error)<br /><div style="color: #FF8080; font-size: 9px">$(error)</div>$(endif)
---------------------------------
<script type="text/javascript">
var error = "$(error)";
if (error == "simultaneous session limit reached") {
document.write("Equal Your language Error ");
}
else if (error == "invalid password") {
document.write("Equal Your language Error");
}
else if (error == "no valid profile found") {
document.write("Equal Your language Error");
}
else if(error.search("not found") != -1) {
document.write("Equal Your language Error");
}
else document.write("$(error)<br />")
</script>

Re: local language

Posted: Wed May 07, 2014 10:06 pm
by c95539
Dear Box,error.txt is for Hotspot errors
-----------------------------
For changing UM errors,you must change login page
using javascript code
copy this insteed error in loging page in $(error)
$(if error)<br /><div style="color: #FF8080; font-size: 9px">$(error)</div>$(endif)
---------------------------------
<script type="text/javascript">
var error = "$(error)";
if (error == "simultaneous session limit reached") {
document.write("Equal Your language Error ");
}
else if (error == "invalid password") {
document.write("Equal Your language Error");
}
else if (error == "no valid profile found") {
document.write("Equal Your language Error");
}
else if(error.search("not found") != -1) {
document.write("Equal Your language Error");
}
else document.write("$(error)<br />")
</script>
-------------------------------------------------------------------------------

thank you very much!

how to replace the errors' massage?

I want to use

document.getElementById("loginerror").innerHTML.replace("invalid password","xxxxxxxx");

BUT lose!

Re: local language

Posted: Wed May 07, 2014 10:20 pm
by mousa1983
1-open login.html with an editor like notepad
2-search $(error)
3-replace with java script code in last post.
it's completly easy.

Re: local language

Posted: Wed May 07, 2014 10:31 pm
by c95539
1-open login.html with an editor like notepad
2-search $(error)
3-replace with java script code in last post.
it's completly easy.

in last post???
I can't

Re: local language

Posted: Wed May 07, 2014 10:42 pm
by c95539
1-open login.html with an editor like notepad
2-search $(error)
3-replace with java script code in last post.
it's completly easy.

thank you!
I succeed!

Re: local language

Posted: Sun Sep 06, 2015 4:14 am
by jlct021
1-open login.html with an editor like notepad
2-search $(error)
3-replace with java script code in last post.
it's completly easy.
Thanks!

Extract of edited login.html page:

====================================================
<br /><div style="color: #c1c1c1; font-size: 9px">Powered by MikroTik RouterOS</div>
$(if error)<br /><div style="color: #FF8080; font-size: 9px"><script type="text/javascript">
var error = "$(error)";
if (error == "simultaneous session limit reached") {
document.write("simultaneous session limit reached");
}
else if (error == "invalid password") {
document.write("Invalid Password");
}
else if (error == "no valid profile found") {
document.write("Credit limit reached, kinldy top up at reception should you wish to coninue browsing.");
}
else if(error.search("not found") != -1) {
document.write("User Not Found");
}
else document.write("$(error)<br />")
</script></div>$(endif)
</td>
</tr>
</table>

<script type="text/javascript">
<!--
document.login.username.focus();
//-->
</script>
====================================================

Re: local language

Posted: Wed Jul 19, 2017 3:54 am
by mynetwork
Thanks to all, I needed this information, it was very useful. However, the old message was displayed in red, how to put it in red on the login page