View Full Version : Serverstatus
chr@nox
07-21-2002, 10:00 PM
Well ok..this is my first hack i made and actually was eh..(good?) enough to post here.
I'm running an irc network together with some good friends and i made a hack to show which servers are up and what their speeds/locations are.
Also i saw something about clanservers and such.
Just add clanservers in this hack instead of irc servers :)
It shows up on forumhome with the servername as a link to go to the profile of the server.
Where you can view all information of it
Behind the servername is the status
which gives a green 'Up' when the server is up
or a red 'Down' when it's down
(you can set it up/down in the admin cp)
screenshot of how it looks on forumhome :
http://chratnox.servicez.org/pics/screenshot1.jpg
screenshot of the server "profile" :
http://chratnox.servicez.org/pics/screenshot2.jpg
screenshot of when adding a new server :
http://chratnox.servicez.org/pics/screenshot3.jpg
screenshot of editing an existing server :
http://chratnox.servicez.org/pics/screenshot4.jpg
I hope you guys like it. and since it's my first hack
please be patient on me ;)
yes..these are the stats of one of the servers on there, but hell, i trust you guys :)
please click on install if you'd like to install it :)
EchoHype.com
07-23-2002, 12:30 AM
Dude, I like this, even though it's nothing major, it's a spiffy little thing!
Nice work there
DrkFusion
07-23-2002, 12:55 AM
Nice, came in use...thought I didn't think it would.
DemiNeo0101
07-23-2002, 01:59 AM
I run an irc network... dude. thank you so much. For your first hack this is one of the most useful to me :)
Christy
07-23-2002, 03:41 AM
Works great! Got it going here
http://www.force137.com/forum/
Velocd
07-23-2002, 03:49 AM
dude, this is pro. :)
mikey8270
07-23-2002, 04:14 AM
omg, this is perfect for me. thank you!
mikey8270
07-23-2002, 04:33 AM
i get this error:
Database error in vBulletin Control Panel 2.2.4:
Invalid SQL: INSERT INTO serverstatus (servertitle,serverid,serverstatus,serverspeed,ser verlocation,serveroperators,se rverowner,servercomments) VALUES (fear,'','1')
mysql error: Column count doesn't match value count at row 1
Christy
07-23-2002, 04:45 AM
Originally posted by mikey8270
i get this error:
Database error in vBulletin Control Panel 2.2.4:
Invalid SQL: INSERT INTO serverstatus (servertitle,serverid,serverstatus,serverspeed,ser verlocation,serveroperators,serverowner,servercomm ents) VALUES (fear,'','1')
mysql error: Column count doesn't match value count at row 1
I got that same error, I had to change line 31 in serverstatusadmin from
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,ser verlocation,serveroperators,serverowner,servercomm ents) VALUES (NULL,'$servertitle','1')");
to
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,ser verlocation,serveroperators,serverowner,servercomm ents) VALUES ('$serverid','$servertitle','$serverstatus','$serv erspeed','$serverlocation','$serveroperators','$se rverowner','$servercomments')");
Christy
07-23-2002, 04:47 AM
What would be the code I add to add another section to my server status page that I could fill in info like this
1. xxxx
2. xxxx
3. xxxx
4. xxxx
and so on
mikey8270
07-23-2002, 04:51 AM
Christy thanks alot!!!
i tried something else but it diddnt work lol :p
chr@nox
07-23-2002, 08:24 AM
hmm sorry for that *blush*
little note...i used "servertext" as field name but you can replace it with what you want to.
if you want more fields just add a field in phpmyadmin
or run this query
ALTER TABLE `chratnox`.`serverstatus` ADD `servertext` VARCHAR(50) NOT NULL;
then..in serverstatusadmin.php
find:
makeinputcode("Server Comments","servercomments","");
and add this underneath it:
makeinputcode("Server Text","servertext","");
thend find :
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,ser verlocation,serveroperators,serverowner,servercomm ents) VALUES (NULL,'$servertitle','1')");
and replace it with :
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,ser verlocation,serveroperators,serverowner,servercomm ents,servertext) VALUES (NULL,'$servertitle','1')");
then find :
$DB_site->query("UPDATE serverstatus SET servertitle='$servertitle',serverstatus='$updown', serverspeed='$serverspeed',serverlocation='$server location',serveroperators='$serveroperators',serve rowner='$serverowner',servercomments='$servercomme nts' where serverid='$serverid'");
and replace it with :
$DB_site->query("UPDATE serverstatus SET servertitle='$servertitle',serverstatus='$updown', serverspeed='$serverspeed',serverlocation='$server location',serveroperators='$serveroperators',serve rowner='$serverowner',servercomments='$servercomme nts',servertext='$servertext' where serverid='$serverid'");
[php]
then find :
[php]
makeinputcode("Server Comments","servercomments","$servstats[servercomments]");
and UNDER it add :
makeinputcode("Server
Text","servertext","$servstats[servertext]");
and save and upload your file
then go to your templates and edit "serverinfo" template
and add the variable : $serverinfo[servertext] anywhere you want to.
so for example :
find :
<b>Comments : </b> $serverinfo[servercomments]
and replace it with :
<b>Comments : </b> $serverinfo[servercomments]<br>
<b>Text : </b> $serverinfo[servertext]
well, then you go in your admin cp and enter the new field ;)
chr@nox
07-23-2002, 08:37 AM
Originally posted by Christy
I got that same error, I had to change line 31 in serverstatusadmin from
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,ser verlocation,serveroperators,serverowner,servercomm ents) VALUES (NULL,'$servertitle','1')");
to
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,ser verlocation,serveroperators,serverowner,servercomm ents) VALUES ('$serverid','$servertitle','$serverstatus','$serv erspeed','$serverlocation','$serveroperators','$se rverowner','$servercomments')");
Updated the zip file for the error in serverstatusadmin.php
sorry for that :)
check the first post for the new attachment
Christy
07-23-2002, 08:45 AM
Ok, so this will make it so I can add more than one line?
Pretty much like a message. I knew I could just copy the previous code for more lines, but I wanted to have a message field where I could post more than one line..make sense?
Sorry if this code below explains that, I wont be getting to it till tomorrow!
Originally posted by chr@nox
hmm sorry for that *blush*
little note...i used "servertext" as field name but you can replace it with what you want to.
if you want more fields just add a field in phpmyadmin
or run this query
ALTER TABLE `chratnox`.`serverstatus` ADD `servertext` VARCHAR(50) NOT NULL;
then..in serverstatusadmin.php
find:
makeinputcode("Server Comments","servercomments","");
and add this underneath it:
makeinputcode("Server Text","servertext","");
thend find :
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,ser verlocation,serveroperators,serverowner,servercomm ents) VALUES (NULL,'$servertitle','1')");
and replace it with :
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,ser verlocation,serveroperators,serverowner,servercomm ents,servertext) VALUES (NULL,'$servertitle','1')");
then find :
$DB_site->query("UPDATE serverstatus SET servertitle='$servertitle',serverstatus='$updown', serverspeed='$serverspeed',serverlocation='$server location',serveroperators='$serveroperators',serve rowner='$serverowner',servercomments='$servercomme nts' where serverid='$serverid'");
and replace it with :
$DB_site->query("UPDATE serverstatus SET servertitle='$servertitle',serverstatus='$updown', serverspeed='$serverspeed',serverlocation='$server location',serveroperators='$serveroperators',serve rowner='$serverowner',servercomments='$servercomme nts',servertext='$servertext' where serverid='$serverid'");
[php]
then find :
[php]
makeinputcode("Server Comments","servercomments","$servstats[servercomments]");
and UNDER it add :
makeinputcode("Server
Text","servertext","$servstats[servertext]");
and save and upload your file
then go to your templates and edit "serverinfo" template
and add the variable : $serverinfo[servertext] anywhere you want to.
so for example :
find :
<b>Comments : </b> $serverinfo[servercomments]
and replace it with :
<b>Comments : </b> $serverinfo[servercomments]<br>
<b>Text : </b> $serverinfo[servertext]
well, then you go in your admin cp and enter the new field ;)
Chris M
07-23-2002, 10:34 AM
Nice hack:)
Satan
Dark_Wizard
07-23-2002, 11:48 AM
Nice addition and I have something very similar added to my "Server Stats" hack. This is a little nicer and I would like to add it to my next version of my hack with the credit of course going to you if thats ok? Let me know.
DemiNeo0101
07-23-2002, 12:40 PM
I just had a nice idea. Is there any way to make the hack Ping each server to see if it's up? And then display if its up or not and if its up the ping reply speed? That would be a nice add-on.
Dark_Wizard
07-23-2002, 01:30 PM
Originally posted by DemiNeo0101
I just had a nice idea. Is there any way to make the hack Ping each server to see if it's up? And then display if its up or not and if its up the ping reply speed? That would be a nice add-on.
I agree and didn't know that this script doesn't ping the server. My next version of Server Status has the feature you requested. It checks specific ports to see if the server responds so if you have a game server like UT for instance it will look at the ip and port number (7777 or whatever) and verify the server replies.
EchoHype.com
07-23-2002, 01:37 PM
Good addition!
Look forward to seeing it =)
chr@nox
07-23-2002, 02:04 PM
Originally posted by DemiNeo0101
I just had a nice idea. Is there any way to make the hack Ping each server to see if it's up? And then display if its up or not and if its up the ping reply speed? That would be a nice add-on.
I was thinking of that too at first...
but when the server is down it's just waiting for a timeout
so that means you have a waiting time of like 20 seconds on your forumhome...
so i chose for this
chr@nox
07-23-2002, 02:05 PM
Originally posted by Dark_Wizard
Nice addition and I have something very similar added to my "Server Stats" hack. This is a little nicer and I would like to add it to my next version of my hack with the credit of course going to you if thats ok? Let me know.
ofcourse u can :)
i'm glad you guys like it
*blush*
tops hack m8 - installed it onto me localserver with no problems - just one thing tho... the delete server doesnt seem to do anything
Dark_Wizard
07-23-2002, 10:14 PM
Originally posted by Pady
tops hack m8 - installed it onto me localserver with no problems - just one thing tho... the delete server doesnt seem to do anything
Change this:
if ($action=="remove") {
echo "<p>Are you sure you want to delete the Server?</p>\n";
echo "<p><a href='serverstatusadmin.php?serverid=$serverid&action=kill'>Yes</a></p>";
}
to this:
if ($action=="remove") {
doformheader("serverstatusadmin","kill");
makehiddencode("serverid",$serverid);
maketableheader("Confirm deletion");
makedescription("Are you sure you want to delete this server?");
doformfooter("Yes","",2,"No");
}
not tested but should work...
Foxtroter
07-24-2002, 06:51 AM
nice :D
chr@nox
07-24-2002, 12:18 PM
Originally posted by Dark_Wizard
Change this:
if ($action=="remove") {
echo "<p>Are you sure you want to delete the Server?</p>\n";
echo "<p><a href='serverstatusadmin.php?serverid=$serverid&action=kill'>Yes</a></p>";
}
to this:
if ($action=="remove") {
doformheader("serverstatusadmin","kill");
makehiddencode("serverid",$serverid);
maketableheader("Confirm deletion");
makedescription("Are you sure you want to delete this server?");
doformfooter("Yes","",2,"No");
not tested but should work...
that should do the trick yea
i kinda forgot about it i think :|
:o
but well...thanx for bringing the support
Originally posted by Dark_Wizard
Change this:
if ($action=="remove") {
echo "<p>Are you sure you want to delete the Server?</p>\n";
echo "<p><a href='serverstatusadmin.php?serverid=$serverid&action=kill'>Yes</a></p>";
}
to this:
if ($action=="remove") {
doformheader("serverstatusadmin","kill");
makehiddencode("serverid",$serverid);
maketableheader("Confirm deletion");
makedescription("Are you sure you want to delete this server?");
doformfooter("Yes","",2,"No");
not tested but should work...
it gave this error when tested
Parse error: parse error in /admin/serverstatusadmin.php on line 100
I tried adding a "}" after the changed code - this gets rid of the phase error but still doesnt diplay the delete message or remove the server fromt he listing.
BTW thanx for the very quick response
Dark_Wizard
07-24-2002, 01:42 PM
Originally posted by Pady
it gave this error when tested
Parse error: parse error in /admin/serverstatusadmin.php on line 100
does there need to be any further "}" after this code?
BTW thanx for the very quick response
Oops...sorry about that, yes it does need a closing brace. I updated the code above.
Nice hack Chrat, gonna update mine now because of you :)
Cya on IRC
Great work, Greets From Man
DemiNeo0101
07-24-2002, 05:23 PM
I got a Very Little Modifyed Version Running here:
http://www.undergroundcandy.net/forums/
chr@nox
07-25-2002, 12:44 AM
nice :)
modded mine too ;)
http://www.resum.net/forums/
webhost
07-25-2002, 01:37 AM
This is what we use,
http://www.realwebhost.net/netstatus/
oblakastouf
03-25-2007, 04:52 PM
Sexy!
Mark.B
03-25-2007, 04:57 PM
Thread necromancy alert!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.