Page 1 of 2

[Request] Tutorial for a Website Orientated Control Panel

Posted: Sat Aug 11, 2012 5:18 am
by DoctorJ999
Hey People, i wanted to create a website orientated control panel for my Armagetron Advanced server, could anyone create a tutorial?

Re: [Request] Tutorial for a Website Orientated Control Pane

Posted: Sat Aug 11, 2012 5:37 pm
by bmjerk
Sorry Doc, but Im not sure if Pri wants you saying that to help your server aswell. I am not saying that you cannot talk about the server, but this is completely up to Pri to help you.

Re: [Request] Tutorial for a Website Orientated Control Pane

Posted: Sat Aug 11, 2012 6:05 pm
by Dumskalle123
This is Armagetron Advanced he's not talking about a Minecraft server, bm.

Re: [Request] Tutorial for a Website Orientated Control Pane

Posted: Sat Aug 11, 2012 6:36 pm
by DoctorJ999
yeah, all i want is to be able to stop, restart, or start the server, and then be able to change ranks it shouldnt be that complicated from what i understand, but i have no idea what to do.

Re: [Request] Tutorial for a Website Orientated Control Pane

Posted: Sat Aug 11, 2012 8:54 pm
by Pri
Obviously I wrote the awesome control panel for our Minecraft servers but that was relatively easy because there are a whole bunch plugins for Minecraft that help to get information out of the server (Like an online player list) and there are also lots of plugins to help you do stuff to servers like banning and unbanning through standardised API's (MCBans).

I really don't know anything about Armagetron to be able to advise you on what to do to manage that. I suppose you could easily write a restarter using PHP by terminating the process on your server then launching it with a shell command but beyond that I don't really have any advice. Does the game support any kind of plugins?

Re: [Request] Tutorial for a Website Orientated Control Pane

Posted: Sat Aug 11, 2012 10:08 pm
by DoctorJ999
i do not believe so, how did you write the control panel? does it require a login from a website? or is it like a download. Dunno what to really do, i would like website based. but i dont know how to do much. and btw my computer works great :P using it right now :P

Re: [Request] Tutorial for a Website Orientated Control Pane

Posted: Sat Aug 11, 2012 11:20 pm
by Pri
Ours is web based. It is accessed via our forum, basically on the main index there is a Link which only staff can see. They click that and it opens the ACP in another page. The password to access the site is embedded in the link as a httpget variable which the webserver reads and verifies. Then they can bookmark the page and open it without needing to visit the forum.

The front end of the control panel is written in HTML and Javascript with Cascading Style Sheets for styling. I'm using the CSS from Twitter's Bootstrap open source project to produce all the nice buttons and things.

The page layout, all the information on it is dynamically generated by the server side PHP. It retrieves the player list from our Minecraft server by using a Bukkit plugin which puts online users in to a MySQL database. The PHP takes this list from all three servers, combines them then creates a Table out of them and displays them on the page. Similarly the Tickrate of the server is similar. I use a console side command to the servers (/lag) to check the tickrate. PHP then inserts that in to another table with the Start/Restart/Shutdown buttons. I use httppost for everything on the site, forms, buttons and dropdowns.

Dropdowns are handled by Javascript because you can't submit a form from a dropdown list of links without using javascript to grab the clicking and redirect that click query to a form submission trigger.

So to recap you'll definitely need to know PHP and HTML at a minimum.

Re: [Request] Tutorial for a Website Orientated Control Pane

Posted: Sun Aug 12, 2012 12:31 am
by DoctorJ999
what about making it a java program? Couldnt i do that and embed it into a webpage?

Re: [Request] Tutorial for a Website Orientated Control Pane

Posted: Sun Aug 12, 2012 12:35 am
by Pri
Yeah you could totally do that. My advice is use what you're comfortable with.

Re: [Request] Tutorial for a Website Orientated Control Pane

Posted: Sun Aug 12, 2012 12:37 am
by DoctorJ999
alright :P, i was already making it in java. Then you said php and html and i got all confused, im guessing it might be more difficult or it migh not?