Internet Explorer is not supported. Please upgrade to a more modern browser.
Hi
I want to customize the Play Page and change it so that doesn't say Play and instead says servers with a drop down menu that contains each server and the status of that server, online offline. How would I go about doing this. Do I create a custom addon and can you help me find all the code that is needed to do this and if it works I might upload it :P
Actually how do you add a dropdown menu to the navigation
Unfortunately this wouldn't be too easy to implement in the current release, however I've made a quick example of how this could be done at the moment.
Add this code to around line 57 of core/includes/template/navbar.php
Create a new file in the pages folder named "servers.php", and paste this code inside.
You can then customise the servers.php page as you wish.
Okay thank you that worked, but how would I add a server status to the side and display a URL based on each server and can I add a server status in the dropdown like for each server displayed in the drop down :3 (it will be probs be a dot)
You'd be able to do all this within core/includes/template/navbar.php, if you change the code I provided for the navbar.php file to query each server within the foreach loop, you can then display the server status in the dropdown items, and also assign server information into a Smarty variable which can be displayed in the template files (styles/templates).
Unfortunately I can't provide any sample code for this, it's something which can be quite advanced because if the query is run on every page load, it could slow your page down by a number of seconds, so you'd need to cache each query for a minute or two (there is a caching library included, you can see it in use in the core/init.php file).
Hope that helps, sorry I can't really be of more use here as the current 1.x system is pretty rigid in terms of customisations; this is something which will be changed for the future 2.x releases.
okay thank you, I love namelessmc and I have been working on customizing it a lot. I will work on this and see what I can do. Thank you for your help and I can't wait to see what will happen in future releases. One thing I want to ask on the play page is says connect to the server with the IP: (ip). how do I add that to each server page that is done through the query :3. it is simply just a line?
I've updated the gist code for pages/servers.php to display the text, I haven't tested it but hopefully there won't be any issues.
i working with a server page too http://cubedcraft.com/servers
Its not finish will add server status and player counter if i get it to work
My minecraft name: Partydragen
My Website: https://partydragen.com/
Owner of CubedCraft network: https://cubedcraft.com/