An add-on for swift game panel, clients can
RE-Installtheir server!
Default swift game panel is very popular and interesting, however some of the options are lacking such as client server reinstallation. This script will allow clients to
self-reinstallthe server whenever they want and of course it will be logged in logs. Script support all games in panel.
Just import serverrebuild.php in root of game panel.
In templates/default/serversummary.tpl is already set-up, just replace existing
serversummary.tplin default template folder.
- Open templates/default/serversummary.tpl file and find next line:
<input type="button" value="Start Server" onclick="window.location='servermanage.php?task=start&serverid={$srv.serverid}'" class="button green start" />- Add this code after previus:
<input type="button" value="Reinstall Server" onclick="doServerRebuild('{$srv.serverid}', '{$srv.name}')" class="button blue restart" />
{literal}
<script language="javascript" type="text/javascript">
<!--
function doServerRebuild(serverid, name){ if (confirm("Are you sure you want to rebuild server: #"+serverid+" - "+name+"? \n\nAll files will be deleted from server!")) { window.location="serverrebuild.php?task=serverrebuild&serverid="+serverid; } }
-->
</script>
{/literal}- Delete cache files from
templates_cfolder and that's it! Enjoy!
Reinstall button will bi show only when server stoped, also reinstall proccess only work when server is stoped!
If have problem with integration, i can finish this for you for small donation, just send me message on mail, facebook or here!
If you appreciate my work and if this script helped you, treat me a coffee... ^_^
