Website Template (Displays Server Stats and Players Online!) -
FreAkeD - 12.10.2015
WARNING: I suggest you to not use this as it is very outdated. I will not be supporting this anymore, although it might be updated one day.
Introduction
This is a old website I had when I used to run my server. It was a page where my server would be displayed. I found it lying around and I thought I'd release it. The template was made back in late 2014, but I've made some little changes to make it better.
I thought this would come in handy for newbies who don't know much about web designing or general coding.
Features
- Displays your servers information.
- Displays all players online on your server.
- Simple error page. The user will be redirected to this page if the server is offline.
- Easy to configure and setup.
Configuring
Everything must be configured in the 'settings.php' file. To simply display your server, open up settings.php and add your server IP into $serverIP = "";. Eg: $serverIP = "123.4.1.6";. You will also need to change the port, if you need to.
You may also change the defines. These will change the Server name, Owner, Server IP and Server Slogan texts. You will not need to change them manually in the index.php file. Once you save settings.php, upload everything to a webserver and everything should run fine and you should notice all changes.
Download
PHP Version:
http://www.mediafire.com/download/8elna38ry5tnp08/web-template-php.rar
Special Thanks
Woet - PHP Query - https://sampforum.blast.hk/showthread.php?tid=99649
Bootstrap - http://getbootstrap.com/
NOTES:
Everything was tested on a local XAMPP server. Everything was working fine and as usual.
Re: Website Template (Displays Server Stats and Players Online!) -
timsar - 12.10.2015
Well done!
Re: Website Template (Displays Server Stats and Players Online!) -
SecretBoss - 12.10.2015
Exactly what I wanted, thanks a lot mate
+REPed
Re: Website Template (Displays Server Stats and Players Online!) -
FreAkeD - 12.10.2015
Quote:
Originally Posted by SecretBoss
Exactly what I wanted, thanks a lot mate
+REPed
|
Thanks, if you need any help let me know
.
Re: Website Template (Displays Server Stats and Players Online!) -
SecretBoss - 12.10.2015
Quote:
Originally Posted by FreAkeD
Thanks, if you need any help let me know .
|
No problem, but if you could make a template with more info like score, admin level, cash etc. based on MySQL that would be very nice
You can make another topic so players who are not using MySQL won't use MySQL version that gets data from database, I think that there are a lot of people who need this also the top list thingy
Re: Website Template (Displays Server Stats and Players Online!) -
bgedition - 12.10.2015
Very nice, I like it. It's cool that you used bootstrap for it.
+1
Re: Website Template (Displays Server Stats and Players Online!) -
FreAkeD - 12.10.2015
Quote:
Originally Posted by SecretBoss
No problem, but if you could make a template with more info like score, admin level, cash etc. based on MySQL that would be very nice
You can make another topic so players who are not using MySQL won't use MySQL version that gets data from database, I think that there are a lot of people who need this also the top list thingy
|
I'm working on a MYSQL one.
Re: Website Template (Displays Server Stats and Players Online!) -
FreAkeD - 13.10.2015
Updated with an
MYSQL version where you can display your servers top players or anything you'd like to straight from your MYSQL database!
Re: Website Template (Displays Server Stats and Players Online!) -
SecretBoss - 13.10.2015
Quote:
Originally Posted by FreAkeD
Updated with an MYSQL version where you can display your servers top players or anything you'd like to straight from your MYSQL database!
|
Great release I will may add it on sbAdmin as an example on using it on their servers (I will credit you of course)
Thanks again
Re: Website Template (Displays Server Stats and Players Online!) -
FreAkeD - 13.10.2015
Quote:
Originally Posted by SecretBoss
Great release I will may add it on sbAdmin as an example on using it on their servers (I will credit you of course)
Thanks again
|
No problem, feel free to use it for that pupose.
Re: Website Template (Displays Server Stats and Players Online!) -
Fairuz - 13.10.2015
Awesome!
Re: Website Template (Displays Server Stats and Players Online!) -
prineside - 13.10.2015
21 queries in one page? Thanks, but I'll never use it.
Re: Website Template (Displays Server Stats and Players Online!) -
SecretBoss - 13.10.2015
Quote:
Originally Posted by FreAkeD
No problem, feel free to use it for that pupose.
|
Just one thing more how can I display all staff?
Re: Website Template (Displays Server Stats and Players Online!) -
FreAkeD - 13.10.2015
Quote:
Originally Posted by SecretBoss
Just one thing more how can I display all staff?
|
Will all of the staff members be saved into the database?
Re: Website Template (Displays Server Stats and Players Online!) -
SecretBoss - 13.10.2015
Quote:
Originally Posted by FreAkeD
Will all of the staff members be saved into the database?
|
For example there is a column with level that gets player's admin level in-game for example and the website will display all the player who got that column > 0 and each level will have a different name for ex if column is 1 it will be trial admin
Re: Website Template (Displays Server Stats and Players Online!) -
ZaBraNjeNi - 14.10.2015
You are forgot to add
demo.php in files....
PHP Code:
<li class="active"><a href="demo.php">Server</a></li>
Re: Website Template (Displays Server Stats and Players Online!) -
FreAkeD - 17.10.2015
Quote:
Originally Posted by ZaBraNjeNi
You are forgot to add demo.php in files....
PHP Code:
<li class="active"><a href="demo.php">Server</a></li>
|
The demo.php files are just examples.
Re: Website Template (Displays Server Stats and Players Online!) -
Roberto81 - 17.10.2015
Can u upload on github?
Re: Website Template (Displays Server Stats and Players Online!) -
Adzdon - 01.12.2015
Possible for a fresh demo? Current links are broken
Re: Website Template (Displays Server Stats and Players Online!) -
Vince - 01.12.2015
Wouldn't use this. The code is truly horrible. It sends a new query for each item, seriously misusing the limit keyword at that. Table rows should be created within a loop by PHP, not by sending multiple separate queries for each row. The entire page can be generated with just two or three queries.