Community discussions

MUM Europe 2020
 
c95539
just joined
Topic Author
Posts: 23
Joined: Fri Apr 25, 2014 4:11 pm

local language

Sat May 03, 2014 2:52 pm

how to use The local language tips,when the login's error?(user manager)
 
c95539
just joined
Topic Author
Posts: 23
Joined: Fri Apr 25, 2014 4:11 pm

Re: local language

Sat May 03, 2014 4:45 pm

# radius-reply
# Radius server returned some custom error message

radius-reply = $(error-orig)


HOW TO CHANGE?
 
User avatar
bax
Member Candidate
Member Candidate
Posts: 269
Joined: Mon Dec 20, 2004 8:45 pm
Location: Croatia

Re: local language

Sat May 03, 2014 6:04 pm

You have errors.txt in hotspot directory ... change it wherever you like :)
 
User avatar
mousa1983
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Mon Apr 21, 2014 2:36 pm
Location: ilam-iran

Re: local language

Wed May 07, 2014 5:37 pm

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>
 
c95539
just joined
Topic Author
Posts: 23
Joined: Fri Apr 25, 2014 4:11 pm

Re: local language

Wed May 07, 2014 10:06 pm

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!
 
User avatar
mousa1983
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Mon Apr 21, 2014 2:36 pm
Location: ilam-iran

Re: local language

Wed May 07, 2014 10:20 pm

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.
 
c95539
just joined
Topic Author
Posts: 23
Joined: Fri Apr 25, 2014 4:11 pm

Re: local language

Wed May 07, 2014 10:31 pm

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
 
c95539
just joined
Topic Author
Posts: 23
Joined: Fri Apr 25, 2014 4:11 pm

Re: local language

Wed May 07, 2014 10:42 pm

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!
 
jlct021
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Sun Mar 13, 2011 8:12 pm

Re: local language

Sun Sep 06, 2015 4:14 am

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>
====================================================
You do not have the required permissions to view the files attached to this post.
 
mynetwork
just joined
Posts: 2
Joined: Mon Jul 17, 2017 5:29 am

Re: local language

Wed Jul 19, 2017 3:54 am

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

Who is online

Users browsing this forum: No registered users and 7 guests