FAQ  •  Login

Nexuiz Server Monitor

Moderators: Nexuiz Moderators, Moderators

<<

JeremyG

Member

Posts: 11

Joined: Sun Jan 31, 2010 7:52 pm

Post Sun Jan 31, 2010 8:27 pm

Nexuiz Server Monitor

Nexiuz Server Monitor.
Hello, i have coded a PHP Nexuiz Server Monitor. Nexuiz Server Monitor is a way for you as a server admin add some stats about your server to your webpage, that way your visitors can see what gametype, map etc. your server is running. Below is a very small explanation of the accepted parameters and some usage examples. :D

The url to the server monitor is http://static.doxer.se/other/nexuiz/stats.php where you can find the same examples as in this thread.

Parameters
    s [hostname/ip] (REQUIRED) - Hostname/ip the server listens to
    p [port] (OPTIONAL) - Port the server listens to. Defaults to 26000
    bg [R,G,B] (OPTIONAL) - Background color, RGB value separated by comma (","). Defaults to white
    fc [R,G,B] (OPTIONAL) - Font color, RGB value separated by comma (","). Defaults to 0,0,0 (black)
    namec [R,G,B] (OPTIONAL) - Color of the server name, RGB value separated by comma (","). If not specified main text color will be used
    hostc [R,G,B] (OPTIONAL) - Color of the hostname, RGB value separated by comma (","). If not specified main text color will be used
    playerc [R,G,B] (OPTIONAL) - Color of the player counter, RGB value separated by comma (","). If not specified main text color will be used
    mapc [R,G,B] (OPTIONAL) - Color of the map text, RGB value separated by comma (","). If not specified main text color will be used
    typec [R,G,B] (OPTIONAL) - Color of the gametype text, RGB value separated by comma (","). If not specified main text color will be used
    font [Font-id] (OPTIONAL) - Font of all text displayed. Defaults to 1 (Cantarell)


Examples

Default values

Image

This example does only use one parameter, all the other configurables are set as default.
  Code:
<img src="http://static.doxer.se/other/nexuiz/stats.php?s=213.203.212.226" alt="Nexuiz Server Monitor" />



Custom background

Image

This example shows how to use custom background. The background is set to 235-235-235 wich is a light grey color.
  Code:
<img src="http://static.doxer.se/other/nexuiz/stats.php?s=213.203.212.226&bg=235,235,235" alt="Nexuiz Server Monitor" />


Custom background & font color

Image

This example shows how to use custom font color. Font clor is set to 255-69-0 and the background is set to 169-169-169 wich is a dark grey color.
  Code:
<img src="http://static.doxer.se/other/nexuiz/stats.php?s=213.203.212.226&bg=169,169,169&fc=255,165,0" alt="Nexuiz Server Monitor" />


Custom server name color

Image

In this example the name of the server is in dark violet (148-0-211) instead of black.
  Code:
<img src="http://static.doxer.se/other/nexuiz/stats.php?s=213.203.212.226&namec=148,0,211" alt="Nexuiz Server Monitor" />


Custom font

Image

Here we have a custom font selected from the list below (PT Sans Caption,7), use the font id as variable to the font parameter. All the fonts are free to use in both commercial & personal projects.
  Code:
<img src="http://static.doxer.se/other/nexuiz/stats.php?s=213.203.212.226&font=7" alt="Nexuiz Server Monitor" />


Aviable fonts
    1 Cantarell (default)
    2 Cantarell Bold
    3 Cantarell Oblique
    4 PT Sans
    5 PT Sans Narrow
    6 PT Sans Italic
    7 PT Sans Caption
    8 PT Sans Captio
    9 Sansation Regular
    10 Sansation Light
    11 Sansation Bold

If you have some really good free fonts, please post them here :D

Any ideas, critic or similar is very welcome! :P

Edit: Updated version with capabilitie to change color for special sections & different fonts. I did also rewrite the whole code and i'm working on gettting an transparent background. I edited the whole doc section too, so i have edited the description in this thread aswell.

Edit2: Added the full source to SourceForge, svn also aviable thru SF. http://sourceforge.net/projects/nsm/
Last edited by JeremyG on Sat Feb 06, 2010 6:42 pm, edited 2 times in total.
<<

Spaceman

Alien trapper

Posts: 264

Joined: Tue Aug 28, 2007 10:53 am

Post Sun Jan 31, 2010 8:42 pm

Re: Nexuiz Server Monitor

Looks good.

Can you add separate font colours for
  Code:
hostname
players
ping
current map


and possibly random rainbow colours?
<<

JeremyG

Member

Posts: 11

Joined: Sun Jan 31, 2010 7:52 pm

Post Sun Jan 31, 2010 8:51 pm

Re: Nexuiz Server Monitor

Yes, it will be what i do first time in the morning :D
<<

GreEn`mArine

Forum addon

Posts: 1509

Joined: Tue Feb 28, 2006 9:33 pm

Location: Germany

Post Sun Jan 31, 2010 10:40 pm

Re: Nexuiz Server Monitor

While the format of generating an image (instead of generating a text or html file) makes sense as it is easy to include, the problem is that the IP of the server cannot be copied to clipboard. Any thoughts about that issue?
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
<<

Spaceman

Alien trapper

Posts: 264

Joined: Tue Aug 28, 2007 10:53 am

Post Sun Jan 31, 2010 11:35 pm

Re: Nexuiz Server Monitor

How about a transparent background?
<<

JeremyG

Member

Posts: 11

Joined: Sun Jan 31, 2010 7:52 pm

Post Mon Feb 01, 2010 7:58 am

Re: Nexuiz Server Monitor

GreEn`mArine wrote:While the format of generating an image (instead of generating a text or html file) makes sense as it is easy to include, the problem is that the IP of the server cannot be copied to clipboard. Any thoughts about that issue?


If you mean you can't copy the server ip from the image, you can search for the name of the server with the search function in nexuiz.

Spaceman wrote:How about a transparent background?


I can change that to the default background i think. I'll check it out :)
<<

JeremyG

Member

Posts: 11

Joined: Sun Jan 31, 2010 7:52 pm

Post Mon Feb 01, 2010 6:28 pm

Re: Nexuiz Server Monitor

I updated the first post about the new features :D
<<

Samual

User avatar

Keyboard killer

Posts: 508

Joined: Mon May 25, 2009 7:22 pm

Location: Pittsburgh, PA

Post Mon Feb 01, 2010 7:15 pm

Re: Nexuiz Server Monitor

Edit: Nice

Image
Last edited by Samual on Tue Feb 02, 2010 11:22 pm, edited 1 time in total.
Do it yourself, or stop complaining.
(Developer Tracker) | (Nexuiz Roadmap)
<<

Spaceman

Alien trapper

Posts: 264

Joined: Tue Aug 28, 2007 10:53 am

Post Mon Feb 01, 2010 9:57 pm

Re: Nexuiz Server Monitor

JeremyG I really like the extra colour controls. I had a play with them earlier, but a bright yellow background is better
<<

JeremyG

Member

Posts: 11

Joined: Sun Jan 31, 2010 7:52 pm

Post Tue Feb 02, 2010 8:21 pm

Re: Nexuiz Server Monitor

Samual wrote:I'm waiting for transparent background :)

Image

Seriously though, epic.



Fixed transparent background :D
<<

FruitieX

User avatar

Keyboard killer

Posts: 588

Joined: Mon Nov 13, 2006 4:47 pm

Location: Finland

Post Wed Feb 03, 2010 11:08 am

Re: Nexuiz Server Monitor

Nice one! Added it to my sig :)
Image
<<

JeremyG

Member

Posts: 11

Joined: Sun Jan 31, 2010 7:52 pm

Post Sat Feb 06, 2010 6:43 pm

Re: Nexuiz Server Monitor

Added it as a project on sourceforge, the url is still the same but svn and tracker is avaible
<<

Kerrrr

Newbie

Posts: 4

Joined: Mon Jun 15, 2009 11:24 am

Post Wed Feb 10, 2010 2:44 pm

Re: Nexuiz Server Monitor

With player names and scores (yet no colors):

http://paste.org/pastebin/view/15359

usage:
  Code:
<img src="http://your.host/stats.php?s=213.203.212.226&showplayers=1">
<<

JeremyG

Member

Posts: 11

Joined: Sun Jan 31, 2010 7:52 pm

Post Fri Feb 12, 2010 8:27 pm

Re: Nexuiz Server Monitor

Nice, i can add that feauture to the one i hosted... :D

Return to Nexuiz - General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.