Author |
Message |
shotokan
Worker
Joined: Aug 27, 2006
Posts: 172
|
Posted:
Wed Sep 27, 2006 8:41 am |
|
I have a CS game server and I also run a software called Psychostats (http://www.psychostats.com) which shows all types of stats for that game such as Players, Clans, Weapons and you can see it working here [ Only registered users can see links on this board! Get registered or login! ]
If you go the the "Server" tab of that page it will show a online status of my server with a picture of the maps being played and who is plaing at the moment if any. You can see it here [ Only registered users can see links on this board! Get registered or login! ]
As you can see everything is working and this is a mix of php and html codes available here http://www.n00bfest.com/nuke/server.zip
I would like to create like a center block for my front page and even though all the code is available i don't know how to put them together to work as a individual block.
I appreciate any help on creating this block and i am sure a lot of game community out there will enjoy that too. |
|
|
|
|
hitwalker
Sells PC To Pay For Divorce
Joined:
Posts: 5661
|
Posted:
Wed Sep 27, 2006 3:43 pm |
|
mmm, well i had a quick look but its mixed up with smarty and more things that needs to be changed...
this is not going to be a fast job...,and may not be interesting to create. |
|
|
|
|
shotokan
|
Posted:
Mon Oct 02, 2006 11:01 am |
|
hitwalker wrote: | mmm, well i had a quick look but its mixed up with smarty and more things that needs to be changed...
this is not going to be a fast job...,and may not be interesting to create. |
OK hitwalter but what about this one then? I don;t think this uses that much things as the previous one and you can see it here installed on my server [ Only registered users can see links on this board! Get registered or login! ]
Now how could i make that work as a block for my php-buke site?
Here is the source code so you can see how that works [ Only registered users can see links on this board! Get registered or login! ]
I appreciate your help
Thanks, |
|
|
|
|
hitwalker
|
Posted:
Mon Oct 02, 2006 3:16 pm |
|
that seems easier yes but i have very litle knowledge about the game stuff..
what info is needed in the files so that it will work? |
|
|
|
|
shotokan
|
Posted:
Mon Oct 02, 2006 3:36 pm |
|
The information about the server and players.
When you go the that query page above the information showed on you left will be related to the server adn on the right the players connected at that time.
But all this is already being capture bu the query.php programs on that zip file but since it's a little mix of php and html to show the page i don't know the put it together as a center block. |
|
|
|
|
hitwalker
|
Posted:
Mon Oct 02, 2006 3:38 pm |
|
ok...so when i put it online it should work instantly huh...
ok ill see what i can do....
bit busy but ill do my best... |
|
|
|
|
shotokan
|
Posted:
Tue Oct 03, 2006 6:42 am |
|
Yes. If you just upload it should work right away. If you find any issue with sesing the server data i might be the server ip on the query.php or you can use mines:
//Array of IPs to Query
$QueryArray[1] = array("63.209.34.15:27015");
$QueryArray[2] = array("4.79.145.184:27015");
$QueryArray[3] = array("63.209.37.49:27015");
Also there is some settings on the queryconf.php for pictures and stuff
Thanks, |
|
|
|
|
shotokan
|
Posted:
Mon Oct 09, 2006 9:57 am |
|
OK. I am almost there, but i need you help now guys to solve a little problem.
I managed to use one block i had for the server status but that only showed on server and as i have more than one it would take too much space from my main page to add 4 servers block.
So i found another html code for that block that had a drop down list and it is working now as you can see here [ Only registered users can see links on this board! Get registered or login! ] on the first center block
The problem is that the html i am using is not from a php-nuke site every time i load the main page the block is sweet and working perfect but when i change the server IP from the drop down it also works showinf the other server but then i loose all my left side blocks and also the block name desapear and i can't igure out how to keep that as a center block always when changinf the dropdown list option.
here is the block
Code:
<?php
include ('blocks/config-PsychoNuke.php');
//------------------------------------------------------------------------------------
// SET UP YOUR BLOCK BY READING THE INSTRUCTIONS FOR EACH SETTING BELOW
$serverid = 0; // 0 = first server, 1 = second server, etc.
$type = 'server_c'; // 'server' for side block, 'server_c' for center block
//------------------------------------------------------------------------------------
// DO NOT CHANGE ANYTHING BELOW THIS LINE
//------------------------------------------------------------------------------------
$ps2file = 'pn-server';
if (substr($nukeURL, strlen($nukeURL)-1, 1) != '/')
$nukeURL .= '/';
$content = file_get_contents("$nukeURL" . "modules.php?name=$module_name&isBlock=1&ps2file=$ps2file&type=$type&s=$serverid");
?>
|
Here is the server.html code that for some reason the forum always give error when try to added the code here.
[ Only registered users can see links on this board! Get registered or login! ]
Here is the server.php code that for some reason the forum always give error when try to added the code here.
[ Only registered users can see links on this board! Get registered or login! ] |
|
|
|
|
|