Blacksail£ Posted May 4, 2016 Share Posted May 4, 2016 Hi, Earlier i saw some people was asking how AltisLife created their Server Statistic at the top of their website. This guide will help you make exactly the same. Go to Admin CP -> Customization -> Themes -> Your Theme -> Edit HTML and CSS -> CSS -> custom.css and open the css file. Paste the following CSS code onto the custom.css: .infoTab { float: left; line-height: 42px; font-family: 'Montserrat', sans-serif; font-size: 130%; padding-left: 75px; } .msg { float:right; line-height:42px; font-family:'Montserrat', sans-serif; font-size:140%; } .serverBar li { padding-left:10px; } .playerCount { color:#536e41; } .msgText { margin-right:15px; } .serverOnline { color:#536e41; } .serverOffline { color:#972E33; } Go to Templates -> core -> front -> global -> globalTemplate and open it. Paste the following HTML code into the globalTemplate: <div class="ipsLayout_container ipsClearfix" style="margin-bottom: 4px;"> <div id="navBar" class="ipsClearfix"> <ul style="font-size: 1.4rem;" class="infoTab ipsList_inline cSignedIn ipsClearfix ipsResponsive_showDesktop serverBar"> <li class="serverName" data-ipstooltip="" data-ipstooltip-label="Tooltiphere">TEAMSPEAK</li> {block="ts_slot_check"} <li class="serverName" data-ipstooltip="" data-ipstooltip-label="Tooltiphere">SOME</li> <li class="playerCount" data-ipstooltip="" data-ipstooltip-label="Tooltiphere"><span id="server_0" class="serverOnline">ONLINE</span></li> <li class="serverName" data-ipstooltip="" data-ipstooltip-label="Tooltiphere">CONTENT</li> <li class="playerCount" data-ipstooltip="" data-ipstooltip-label="Tooltiphere"><span id="server_1" class="serverOnline">ONLINE</span></li> <li class="serverName" data-ipstooltip="" data-ipstooltip-label="Tooltiphere">HERE</li> <li class="playerCount" data-ipstooltip="" data-ipstooltip-label="Tooltiphere"><span id="server_3" class="serverOnline">ONLINE</span></li> <li style="font-size: 1.4rem;" class="msg" data-ipstooltip="" data-ipstooltip-label="Tooltiphere">Your Website Name</li> </ul> </div> </div> Now you need to create a php block that can display real time server status. In this example i will show you how to do it with the Teamspeak, for others you have to write your own script or get one from internet. Go to Pages -> Block -> Create New Block -> Custom -> Manual PHP -> Next Name: Anything you want Template Key: ts_slot_check Content: require_once("misc/libraries/TeamSpeak3/TeamSpeak3.php"); try {$ts3 = TeamSpeak3::factory("serverquery://SERVERQUERYUSERNAMEHERE:SERVERQUERYPASSWORDHERE@SERVERIPORDNSHERE:10011/?server_port=9987"); echo "<li class='playerCount' data-ipstooltip='' data-ipstooltip-label='Tooltiphere'><span id='server_2' class='serverOnline'>" . $ts3->virtualserver_clientsonline . " / " . $ts3->virtualserver_maxclients . "</span></li>";} catch(Exception $e){echo "<li class='playerCount' data-ipstooltip='' data-ipstooltip-label='Tooltiphere'><span id='server_2' class='serverOffline'>OFFLINE</span></li>";} And now you just have to download PlanetTeamSpeak Framework from HERE Then copy the libraries folder and all of its content to your webserver /misc/ folder. It should looks like /misc/libraries/TeamSpeak3/TeamSpeak3.php The script is working now, and your website will display the user number on your teamspeak. Please note that this guide is only makes possible to display Teamspeak status. The other 3 column is just a static content that you can make dynamic with a script. Enjoy 1 Quote Link to comment Share on other sites More sharing options...
bobster Posted May 15, 2016 Share Posted May 15, 2016 Can't seem to get it working/ can you help me on skype? Quote Link to comment Share on other sites More sharing options...
Blacksail£ Posted May 15, 2016 Author Share Posted May 15, 2016 Send me your skype in Private Message Quote Link to comment Share on other sites More sharing options...
Strobe Posted May 14, 2017 Share Posted May 14, 2017 How would I connect this to my Altis Life server? Quote Link to comment Share on other sites More sharing options...
ni1kko Posted December 26, 2017 Share Posted December 26, 2017 having some issues, when it come to creating the php block. I click save and reload then instantly i get a white screen and nothing saved. im running 4.2.6 Quote Link to comment Share on other sites More sharing options...
MrWale Posted February 10, 2019 Share Posted February 10, 2019 same here can someone update this pls Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.