[RELEASE] Stats Bar in Client

Tiny

Owner, Swift Industry
Aug 14, 2013
616
61
Hello! I'm Aruthra, here with another cool release :D
I really wanted this for many decades and i finally got the script from a retro. Many people badly wants this, so I thought to share it!

Here is a screenie of the script:

7f0ca6882797ca9b7f64ffb5fb5ba0ba.png


Live Demo -

How to install:
  1. Save this code as statsbar.css in your skin's styles folder ( )
  2. Replace your client.php file with this
PHP:
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>Swift Hotel - Client</title>

<script src="{url}/app/tpl/skins/{SKIN}/styles/js/jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="{url}/app/tpl/skins/{SKIN}/styles/statsbar.css" type="text/css">

<script type="text/javascript">
$(document).ready(function() {
      $("#bars").load("{url}/statsbar");
   var refreshId = setInterval(function() {
      $("#bars").load('{url}/statsbar');
   }, 3000);
   $.ajaxSetup({ cache: false });
});
</script>

<div id="topbar">
<div style="padding:4px;">
<div id="bars" style="width:100%;font-size:14px;color:white;font-family:verdana"><center>Enjoy your stay, <b> {username}! </b> ● There are currently <b>{online}</b> SWIFTER(S) ONLINE<script type="text/javascript" src="http://player.wavestreamer.com/cgi-bin/swf.js?id=JTK04WSV1Y8X9XN2"></script>
<script type="text/javascript" src=" http://player.wavestreaming.com/?id=JTK04WSV1Y8X9XN2"></script></center></div></center></div>
</div>
</div>


<script type="text/javascript" src="{url}/app/tpl/skins/{SKIN}/js/swfobject.js"></script>
<style type="text/css">
* { margin: 0; padding: 0; }
html, #client { height: 94.9%; text-align: left; background-color: black; }
#client { position: absolute; overflow: hidden; left: 0; top: 35; right: 0; bottom: 0; }
</style>
<script type="text/javascript">

     
            var BaseUrl = "http://swift-hotel.org/extra/swfs";
            var flashvars =
            {
                "client.starting" : "",
                "client.allow.cross.domain" : "1",
                "client.notify.cross.domain" : "0",
                "connection.info.host" : "IP",
                "connection.info.port" : "PORT",
                "site.url" : "http://swift-hotel.org",
                "url.prefix" : "http://swift-hotel.org",
                "client.reload.url" : "http://swift-hotel.org/client",
                "client.fatal.error.url" : "http://swift-hotel.org/me",
                "client.connection.failed.url" : "http://swift-hotel.org/me",
                "external.variables.txt" : "http://swift-hotel.org/extra/swfs/external_variables.txt",
                "external.texts.txt" : "http://swift-hotel.org/extra/swfs/external_flash_texts.txt",
                "productdata.load.url" : "http://swift-hotel.org/extra/swfs/productdata.txt",
                "furnidata.load.url" : "http://swift-hotel.org/extra/swfs/furnidata.txt",
                "use.sso.ticket" : "1",
                "sso.ticket" : "{sso}",
                "processlog.enabled" : "0",
                "flash.client.url" : BaseUrl,
                "flash.client.origin" : "popup"
            };
            var params =
            {
                "base" : BaseUrl + "/",
                "allowScriptAccess" : "always",
                "menu" : "false"             
            };
            swfobject.embedSWF(BaseUrl + "/Habbo.swf", "client", "100%", "100%", "10.0.0", "http://swift-hotel.org/extra/swfs/expressInstall.swf", flashvars, params, null);
        </script>
    </head>
 
    <body>
 
        <div id="client"></div>
 
    </body>
</html>
<?php include('checktheban.php'); ?>
DONE!

Note: The online users won't be updated automatically, someone who codes an auto updater script would be appreciated.
 
Last edited:

Brackston

Member
Aug 6, 2014
232
20
Wanted this for a long time now. Don't really like how the radio isn't aligned to the text though. I was about to put this in my client but I saw that you said the user count doesn't update automatically. Does anyone have a script for that? Anyway, 7/10 ;)
 

Zodiak

recovering crack addict
Nov 18, 2011
450
411
Wouldn't recommend it refreshing every 3 seconds. Should add the ability to be able to close and reopen it, and make the reload only happen if open. Or add a "refresh stats" button:p
 

Wickd

The first member of the Knights of the Pink Table
Jan 15, 2013
1,936
612
Just like Westyy said great for noobs thanks for the share.
 

Rogify

Member
Dec 15, 2013
80
16
Could somebody make a stats bar like this, which includes health and hunger part? I've tried to do it myself but couldnt.
 

Zodiak

recovering crack addict
Nov 18, 2011
450
411
Could somebody make a stats bar like this, which includes health and hunger part? I've tried to do it myself but couldnt.
PHP:
$check = mysql_query("SELECT `health`,`hunger` FROM `table_your_selecting_from` WHERE `id` = '".$_SESSION['user']['id']"' LIMIT 1");

if(mysql_num_rows($check) >= 1)
$user = mysql_fetch_assoc($check);
Then use "$user" to insert your health/hunger into the stats bar
 

Rogify

Member
Dec 15, 2013
80
16
PHP:
$check = mysql_query("SELECT `health`,`hunger` FROM `table_your_selecting_from` WHERE `id` = '".$_SESSION['user']['id']"' LIMIT 1");

if(mysql_num_rows($check) >= 1)
$user = mysql_fetch_assoc($check);
Then use "$user" to insert your health/hunger into the stats bar
Thanks :)
 

proW163

New Member
Aug 16, 2015
20
0
jaycustom du you know how to code this html if you now can you give me it
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
jaycustom du you know how to code this html if you now can you give me it
It's called CSS and HTML, I am not going to help you rip features from another retro, you can learn yourself how to inspect element and grab what you need, or you can learn yourself on how to code.
 

Users who are viewing this thread

Top