koragg Posted June 27, 2017 Share Posted June 27, 2017 I tried to add my server's scoreboard to my website using the webadmin resource. But it asks every player who visits the link (http://5.196.159.12:22095/scoreboard/) to login with their in-game username and password in order to see the scoreboard. How can I remove that login restriction so that anyone can view the scoreboard by going to that link? And another, for now, less important question is: How to change the width of the columns and show their friendlyName instead of columnName? Link to comment
MIKI785 Posted June 28, 2017 Share Posted June 28, 2017 I guess there is a httpRequestLogin somewhere in the scoreboard, look for that and comment it out, restart the resource and see what that does. Link to comment
koragg Posted June 28, 2017 Author Share Posted June 28, 2017 1 hour ago, MIKI785 said: I guess there is a httpRequestLogin somewhere in the scoreboard, look for that and comment it out, restart the resource and see what that does. Sadly that's not the case. Notepad++ gives 0 results Link to comment
koragg Posted June 28, 2017 Author Share Posted June 28, 2017 This is what I get every time: Link to comment
koragg Posted June 29, 2017 Author Share Posted June 29, 2017 So I managed to fix the column names thing today but still need help with two things: 1. How to remove that login request every time I visit the link? 2. How to make the following work (it's in CSS): For example I have this: td.player#Name { color: #FFFFFF; width: 15%; } and that makes the "Name" column be 15% wide and it's content to be white. Now I wanna know how to do the same but for this column: td.player#Player State { color: #FFFFFF; width: 6%; } The problem is that the space after "Player" and before "State" kind of bugs the CSS and it doesn't work. Is there any 'white-space symbol' specific for CSS or any other way to make it work? Link to comment
pa3ck Posted June 29, 2017 Share Posted June 29, 2017 HTML5 doesn't allow you to have spaces in the id attribute. Are you able to change the ID? If not, you can maybe use the https://www.w3schools.com/cssref/sel_nth-child.asp selector. Link to comment
koragg Posted June 29, 2017 Author Share Posted June 29, 2017 I fixed it the following way: In the scoreboard.js file there is var columnName = columns[i].friendlyName.htmlEntities(); After a few searches around the net I figured out how to fix it by using the javascript replace method from the function "htmlEntities" and made another function called "htmlEntitiesFix" which is literally the same only with an extra .replace(/>/g,'>').replace(/ /,'_') at the end. This way all spaces in the column name (note: not in the rows, just columns) get replaced by an underscore "_". So now in the .css I easily do this td.player#Player_State { color: #FFFFFF; width: 4%; } and there's no problems at all. Yeah, sure there is an underscore but that's seen only in the web scoreboard and only in 3 of the column names so it's no big deal at all. But I still cannot figure out why it keeps asking everybody for their in-game username and password when they visit the link to view the scoreboard: http://www.classicracing.tk/scoreboard.html At my race clan's site (http://www.fullysik.net) the scoreboard is embedded into the home page the same way (I asked my boss to give me the SiK site's files ) so I don't think it's a script problem. Maybe some setting somewhere? That's the last and actually the biggest problem that I have had since the start with the web scoreboard. PS: Also in webadmin all resources are in the "Everyone" under "Groups" but t still wants authentication (SiK's owner told me that this can be a problem if it isn't in that group). Link to comment
koragg Posted July 1, 2017 Author Share Posted July 1, 2017 @jbeta you made the scoreboard, help please @ccw anyone Link to comment
pa3ck Posted July 1, 2017 Share Posted July 1, 2017 Might be useless, but have you look at this yet: include( "mta_sdk.php" ); $mtaServer = new mta("example.com", 33004, "myUsername", "myPassword" ); $mtaServer->getResource("someResource")->call("someFunction"); Source: https://wiki.multitheftauto.com/wiki/PHP_SDK Link to comment
koragg Posted July 1, 2017 Author Share Posted July 1, 2017 8 hours ago, pa3ck said: Might be useless, but have you look at this yet: include( "mta_sdk.php" ); $mtaServer = new mta("example.com", 33004, "myUsername", "myPassword" ); $mtaServer->getResource("someResource")->call("someFunction"); Source: https://wiki.multitheftauto.com/wiki/PHP_SDK Um, I searched for this and there is nothing like it anywhere in the 'resources' folder according to Notepad++ Link to comment
pa3ck Posted July 1, 2017 Share Posted July 1, 2017 That should be in the PHP when you create the "mta instance" and call some resource functions. In your PHP code search for "new mta" and see if it passes your MTA credentials. Link to comment
koragg Posted July 1, 2017 Author Share Posted July 1, 2017 1 hour ago, pa3ck said: That should be in the PHP when you create the "mta instance" and call some resource functions. In your PHP code search for "new mta" and see if it passes your MTA credentials. Oh in that case, no. It's not a php script that I use, just a simple iframe in a html. Link to comment
kikos500 Posted July 2, 2017 Share Posted July 2, 2017 (edited) I'm not sure about it but i think this what you are searching for https://wiki.multitheftauto.com/wiki/Server_mtaserver.conf check the auth_serial_http part i searched in most mta files now i still can't find anything related to login so i think you can turn it off from mta server configuration file Edited July 2, 2017 by kikos500 Link to comment
koragg Posted July 2, 2017 Author Share Posted July 2, 2017 3 hours ago, kikos500 said: I'm not sure about it but i think this what you are searching for https://wiki.multitheftauto.com/wiki/Server_mtaserver.conf check the auth_serial_http part i searched in most mta files now i still can't find anything related to login so i think you can turn it off from mta server configuration file I changed it from '1' to '0' and restarted the server but nothing changed... it's still asking for username and password every time i visit the link. Link to comment
koragg Posted June 16, 2018 Author Share Posted June 16, 2018 Sorry for the huge bump but almost 1 year later this thing still annoys. Anyone found a way to remove the login prompt yet? Link to comment
koragg Posted December 3, 2018 Author Share Posted December 3, 2018 I finally fixed it! From here: https://wiki.multitheftauto.com/wiki/Resource_Web_Access#Calls_from_the_HTTP_web_interface I had to set all occurrences of "<right name="general.http" access="true"></right>" to true and also had to add it for all ACL groups. Now works like a charm No annoying login anymore. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now