Nexuiz Server Monitor

Discuss anything to do with Nexuiz here.

Moderators: Nexuiz Moderators, Moderators

Nexuiz Server Monitor

Postby JeremyG » Sun Jan 31, 2010 8:27 pm

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: Select all
<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: Select all
<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: Select all
<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: Select all
<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: Select all
<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.
JeremyG
Member
 
Posts: 11
Joined: Sun Jan 31, 2010 7:52 pm

Re: Nexuiz Server Monitor

Postby Spaceman » Sun Jan 31, 2010 8:42 pm

Looks good.

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


and possibly random rainbow colours?
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Re: Nexuiz Server Monitor

Postby JeremyG » Sun Jan 31, 2010 8:51 pm

Yes, it will be what i do first time in the morning :D
JeremyG
Member
 
Posts: 11
Joined: Sun Jan 31, 2010 7:52 pm

Re: Nexuiz Server Monitor

Postby GreEn`mArine » Sun Jan 31, 2010 10:40 pm

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
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Re: Nexuiz Server Monitor

Postby Spaceman » Sun Jan 31, 2010 11:35 pm

How about a transparent background?
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Re: Nexuiz Server Monitor

Postby JeremyG » Mon Feb 01, 2010 7:58 am

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

Re: Nexuiz Server Monitor

Postby JeremyG » Mon Feb 01, 2010 6:28 pm

I updated the first post about the new features :D
JeremyG
Member
 
Posts: 11
Joined: Sun Jan 31, 2010 7:52 pm

Re: Nexuiz Server Monitor

Postby Samual » Mon Feb 01, 2010 7:15 pm

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)
Samual
Keyboard killer
 
Posts: 508
Joined: Mon May 25, 2009 7:22 pm
Location: Pittsburgh, PA

Re: Nexuiz Server Monitor

Postby Spaceman » Mon Feb 01, 2010 9:57 pm

JeremyG I really like the extra colour controls. I had a play with them earlier, but a bright yellow background is better
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Re: Nexuiz Server Monitor

Postby JeremyG » Tue Feb 02, 2010 8:21 pm

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

Image

Seriously though, epic.



Fixed transparent background :D
JeremyG
Member
 
Posts: 11
Joined: Sun Jan 31, 2010 7:52 pm

Next

Return to Nexuiz - General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest