ADMIN 322 Posted May 4, 2016 Member ID: 1 Group: 👑 OWNER ✨ Topic Count: 476 Topics Per Day: 0.08 Content Count: 214,639 Content Per Day: 36.45 Reputation: 322 Days Won: 58 Joined: 03/29/2010 Status: Offline Last Seen: Monday at 03:54 PM Timezone: Asia/Karachi Device: Windows 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 0 Quote 📚 Discover More Useful Sections on FundayForum 🏠 Portal Homepage 🔥 Latest Activity Wall 🔍 Search Topics & Posts 📜 All Shayari (Urdu / Roman Urdu / English) 🖋️ Famous Urdu Poets Collection 📚 Urdu Adab Literature Section 🍲 Cooking Recipes & Pakwan Zaiqa 👗 Female Fashion Discussions 🏡 Interior Decoration Ideas 😂 Jokes & Riddles Section 👨 Male Gossip Lounge ⚙️ IPS Community Help & Tutorials 🏛️ Historical Articles Blog 📸 Public Gallery Images 🖼️ Poetry Gallery Collection 👋 Welcome & Introductions Thread 📩 Contact Support
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.
Note: Your post will require moderator approval before it will be visible.