vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Serverstatus (https://vborg.vbsupport.ru/showthread.php?t=41404)

chr@nox 07-21-2002 10:00 PM

Serverstatus
 
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 ;)

[edit]yes..these are the stats of one of the servers on there, but hell, i trust you guys :) [/edit]

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

Quote:

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

Code:

$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments) VALUES (NULL,'$servertitle','1')");
to

Code:

$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments) VALUES ('$serverid','$servertitle','$serverstatus','$serverspeed','$serverlocation','$serveroperators','$serverowner','$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

Code:

ALTER TABLE `chratnox`.`serverstatus` ADD `servertext` VARCHAR(50) NOT NULL;
then..in serverstatusadmin.php
find:

PHP Code:

makeinputcode("Server Comments","servercomments",""); 

and add this underneath it:

PHP Code:

makeinputcode("[b]Server Text[/b]","[b]servertext[/b]",""); 

thend find :

PHP Code:

$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments) VALUES (NULL,'$servertitle','1')"); 

and replace it with :

PHP Code:

$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments,[b]servertext[/b]) VALUES (NULL,'$servertitle','1')"); 

then find :

PHP Code:

$DB_site->query("UPDATE serverstatus SET servertitle='$servertitle',serverstatus='$updown',serverspeed='$serverspeed',serverlocation='$serverlocation',serveroperators='$serveroperators',serverowner='$serverowner',servercomments='$servercomments' where serverid='$serverid'"); 

and replace it with :

[php]
$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 Code:

makeinputcode("Server Comments","servercomments","$servstats[servercomments]"); 

and UNDER it add :

PHP Code:

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 :

PHP Code:

<b>Comments : </b$serverinfo[servercomments

and replace it with :

PHP Code:

<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

Quote:

Originally posted by Christy


I got that same error, I had to change line 31 in serverstatusadmin from

Code:

$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments) VALUES (NULL,'$servertitle','1')");
to

Code:

$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments) VALUES ('$serverid','$servertitle','$serverstatus','$serverspeed','$serverlocation','$serveroperators','$serverowner','$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!

Quote:

Originally posted by chr@nox
PHP Code:

makeinputcode("[b]Server Text<b>hmm sorry for that *blush*

<b>little note...i used "
servertext" as field name but you can replace it with what you want to.</b>

if you want more fields just add a field in phpmyadmin

or run this query

<div style="
margin:20pxmargin-top:5px">
    <div class="
smallfont" style="margin-bottom:2px">Code:</div>
    <hr /><code style="
margin:0px" dir="ltr" style="text-align:left">ALTER TABLE `chratnox`.`serverstatus` ADD `<b>servertext</b>` VARCHAR(50) NOT NULL;</code><hr />
</div>then..in serverstatusadmin.php
find:

<div style="
margin:20pxmargin-top:5px">
    <div class="
smallfont" style="margin-bottom:2px">PHP Code:</div>
    <div class="
alt2">
        <hr />
        <code style="
white-space:nowrap">
        <div dir="
ltr" style="text-align:left;">
            <!-- php buffer start --><code><span style="
color#000000">
<span style="color: #0000BB">makeinputcode</span><span style="color: #007700">(</span><span style="color: #DD0000">"Server&nbsp;Comments"</span><span style="color: #007700">,</span><span style="color: #DD0000">"servercomments"</span><span style="color: #007700">,</span><span style="color: #DD0000">""</span><span style="color: #007700">);&nbsp; </span><span style="color: #0000BB"></span>
</
span>
</
code><!-- php buffer end -->
        </
div>
        </
code>
        <
hr />
    </
div>
</
div>and add this underneath it

</
b>","[b]servertext[/b]",""); 

thend find :

PHP Code:

$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments) VALUES (NULL,'$servertitle','1')"); 

and replace it with :

PHP Code:

$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments,[b]servertext[/b]) VALUES (NULL,'$servertitle','1')"); 

then find :

PHP Code:

$DB_site->query("UPDATE serverstatus SET servertitle='$servertitle',serverstatus='$updown',serverspeed='$serverspeed',serverlocation='$serverlocation',serveroperators='$serveroperators',serverowner='$serverowner',servercomments='$servercomments' where serverid='$serverid'"); 

and replace it with :

[php]
$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 Code:

makeinputcode("Server Comments","servercomments","$servstats[servercomments]"); 

and UNDER it add :

PHP Code:

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 :

PHP Code:

<b>Comments : </b$serverinfo[servercomments

and replace it with :

PHP Code:

<b>Comments : </b$serverinfo[servercomments]<br>
<
b>Text : </b$serverinfo[servertext

well, then you go in your admin cp and enter the new field ;) [/B]

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

Quote:

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

Quote:

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

Quote:

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*

Pady 07-23-2002 06:00 PM

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

Quote:

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:
PHP Code:

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:
PHP Code:

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

Quote:

Originally posted by Dark_Wizard


Change this:
PHP Code:

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:
PHP Code:

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

Pady 07-24-2002 01:38 PM

Quote:

Originally posted by Dark_Wizard


Change this:
PHP Code:

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:
PHP Code:

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
Code:

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

Quote:

Originally posted by Pady


it gave this error when tested
Code:

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.

Man 07-24-2002 04:41 PM

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!


All times are GMT. The time now is 03:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01466 seconds
  • Memory Usage 1,883KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (24)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (33)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete