PDA

View Full Version : gaming hack..... for showing your game server....


Pages : [1] 2

bandare
12-11-2004, 03:21 PM
I was looking for a module for the vbadvanced. I am pretty sure it has been done already but I cant find it anywhere..........

I want to be able to show the current game server on the homepage for our halflife server.....

anyone know of a module already written?

Nameless
12-15-2004, 12:29 PM
also intrested :)

Our Sponsors
 

bandare
12-15-2004, 12:36 PM
I agree... I am suprised nobody has posted yet........

Zachery
12-15-2004, 12:58 PM
For what game ? I mean there are only a million differnt games out there that have online servers

Our Sponsors
 

bandare
12-15-2004, 01:16 PM
very true.... excuse my lack of info...... specifically for halflife games..... mainly day of defeat..........

TheVirus
12-15-2004, 05:56 PM
Not sure what you mean...but if you just want to add in a module to display your game server info and ip address, I made one up for my site....pretty simple and nothing dynamic about it though.

Just create a new template called adv_portal_serverinfo

And add this into it


<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b><center>3L1T3 Servers</center></b></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">

<!-- Begin server info -->
<center>
<u><b>3L1T3|DM</b></u> <br>
69.9.161.67:27960<br><br>
<u><b>3L1T3|OSP</b></u><br>
69.9.161.71:27960<br>
</center>
<!-- End server info -->

</td>
</tr>
</table>
<br />


You'd just need to edit your server name and IP in the code, then just add your module in.

psychosis
12-15-2004, 06:38 PM
I have used phgstats in a module before now - http://phgstats.sourceforge.net/

gothic1213
12-16-2004, 05:48 AM
We've always used SQuery (http://www.squery.com/index.php) to display our server status. Easy to setup and supports a plethora of games.
Example My server status (http://www.lc-systems.org.uk/SQuery/index.php)
The beauty of SQuery is that if you're at all php minded it's a simple job to grab certain components and display them anywhere on your forums.
e.g. (look at the header) my forum home page (http://www.lc-systems.org.uk)

Nameless
12-16-2004, 12:43 PM
gotic care too share the code? :D

gothic1213
12-16-2004, 02:49 PM
gotic care too share the code? :D
I'll try and put together a bit of a package and put it here for anybody thats interested.
I'll try and do it for tomorrow morning sometime.

Nameless
12-16-2004, 03:03 PM
awsome ;)

gothic1213
12-17-2004, 08:54 AM
I have cobled together the information and files needed to generate the header that you see HERE (http://www.lc-systems.org.uk)
(minus the Xmas stuff...lol)

It was thrown together so don't expect anything stunning, and you need to understand the fundamentals of installing SQuery (all explained in the "details.txt" inside the zip file.

Over this weekend I will attempt to create something more easily understood (maybe even create a whole package), you'll just have to be patient with me........ :D

I have included the graphics and files for the header you see in my example only, so you will have to modify them to your needs.

p.s. if you find it useful, then as a thankyou perhaps you could link back to my site on:
http://www.lc-systems.org.uk

spesh
12-19-2004, 09:32 PM
a direct port for that squery would be pretty awesome really :)

Nameless
12-20-2004, 11:33 AM
indeed :)

gothic1213
12-20-2004, 01:34 PM
sorry folks, I've been so busy with that "selectable newsfeed" mod over the weekend I clean forgot. Will get down to it first thing in the morning.

spesh
12-20-2004, 04:00 PM
No worries :D

Been tinkering around with this myself, cut it down alot as i only want the small status bar so to speak and done ok.

however, as soon as i add


ob_start();
require("headergen.php");
$cps = ob_get_contents();
ob_end_clean();


into phpinclude_start template the site throws a wobbly with


Warning: Unknown(headergen.php): failed to open stream: No such file or directory in /home/beavis/public_html/forum/global.php(429) : eval()'d code on line 2

Warning: Unknown(headergen.php): failed to open stream: No such file or directory in /home/beavis/public_html/forum/global.php(429) : eval()'d code on line 2

Fatal error: (null)(): Failed opening required 'headergen.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/beavis/public_html/forum/global.php(429) : eval()'d code on line 2


the headergen.php is in the www root @ public_html

any ideas? :D


http://www.clan-uocuk.co.uk/headergen.php is the output

gothic1213
12-20-2004, 04:21 PM
Sorry, my mistake, the file "headergen.php" should be in the folder where the forum is (something like /home/beavis/public_html/forum/headergen.php)
Apologise for that. All that was happening was the file wasn't being found.

p.s. love the graphics m8

spesh
12-20-2004, 04:59 PM
http://www.clan-uocuk.co.uk/

Done :D

awesome!

spesh
12-20-2004, 05:00 PM
added my headergen.php in case its any good to you in your dev work for this, but please persist and post your completed mod on vbulletin.org as this is pretty awesome :D

gothic1213
12-21-2004, 08:55 AM
added my headergen.php in case its any good to you in your dev work for this, but please persist and post your completed mod on vbulletin.org as this is pretty awesome :D
Grabbed your headergen, might use that as an alternative method in the package.
Impressed with your header, really nice graphics m8.
Right now I'm waiting for a reply from SQuery guys with permission to distribute their software with my package, when that comes through I'll press ahead and........watch this space. :D :D

spesh
12-21-2004, 09:03 AM
Thanks :) Cant take credit for the graphics, was made by a few people from the community.

The only possible issue i can see here is that its querying the game server on every page load. Not an issue bandwidth wise as its a tiny amount but it does seem to have increased the apparent "page build" time. Its only fractionally and not really a problem (no users have commented) but it may cause problems on a very large forum community?

Also something that would be useful, imo, would to be able to add further servers to it. For example we have a Cs:s, q3 and bfv server (at least) running. Only way i can think of doing this would be 3 seperate installs of squery with the static ip field set induvidually then a bit of code replication in the headergen.php to pull from the different squery folders, can you see a better way of doing this?

I am by no means a good php coder, more of a 'reverse engineer' so to speak so am a little puzzled as to how to make that work :D

Thanks

mark

gothic1213
12-21-2004, 10:11 AM
Sounds a good idea. Squery does have the ability to offer a drop-down menu listing your favourite servers, but thats not much use in our case unless I do a little "reverse engineering" myself and discover a way of utilitsing that facility (perhaps making multiple calls to the various points in squeries code where it drags the servers info from). I must admit I'm only a novice coder myself and depend on a chap called "PP" for the more heavier stuff (it's always useful having a professional coder in your forum member list..lol)
I'll have a word with him and between us i'm sure we can come up with something.
Cheers
Tony

spesh
12-21-2004, 12:24 PM
if i can be of any help at all then please shout, msn and stuff is in my profile.

Mark

spesh
12-22-2004, 06:35 AM
something else i just found :D

using the short header code you suggested caused some of the formatting to go astray in the viewpost parts (as shown on the attachment). Solved this with changing the header template to


<!-- logo -->
$cps
<!-- /logo -->
<!-- content table -->
$spacer_open

$_phpinclude_output


Mark

Arial
03-22-2005, 06:52 AM
Guys we use squery here:
http://www.global-army.com/SQuery/

But we are considering going for CMPS and wondered if anyone has been able to port the 'block' element of squery to CMPS.

Example shown here (left side - bottom - labelled Tiny Block)
http://www.squery.com/index.php

Anyone able to achieve this?

DOMIN8
04-28-2005, 03:19 AM
I have used phgstats in a module before now - http://phgstats.sourceforge.net/


So how did you get this to work in a module? I have been working on that for a while but adding the index data in a template but its a no go. Care to share some info?

spesh
06-17-2005, 12:30 PM
Could always iframe it in

using arials page (and a generic custom block code from elsewhere on this forum)


<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Ignore this, just testing stuff!</b></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">

<!-- Begin custom code -->
<center>

<iframe src="http://www.global-army.com/SQuery/" width="600" scrolling="auto" height="1500"></iframe>

</center>
<!-- End custom code -->

</td>
</tr>
</table>
<br />

spesh
06-17-2005, 01:12 PM
http://www.clan-uocuk.co.uk/index.php?page=servers

Kinda working, needs a bit of tidying up tho.

jammer2020
06-29-2005, 10:05 AM
Spesh,

Care to share how you got multiple servers to show up in that page posted above??

I have been trying to accomplish that with absolutely no luck at all. Also I am not sure if I am using the exact code you posted above for my iframes but when they display I cant get the SQuery CSS style to load.

Any help or code examples would be much appreciated.

DOMIN8
06-29-2005, 10:32 AM
you need to use phgstats

http://phgstats.sourceforge.net/

then you have to create a template in vb and then a new page in vba

jammer2020
07-01-2005, 02:50 PM
Nevermind, I decided it was time to get it working and I finally figured it out on my own, now back to some actually playing time.. :)

majorj0nny1
07-04-2005, 03:24 PM
Nevermind, I decided it was time to get it working and I finally figured it out on my own, now back to some actually playing time.. :)

uugughghghghgh! this thing is doing my brain in :(

ok that SQuery thing dont seem to be made for vbulletin ? phpnuke, etc only? so i cant use that for my vbulletin vbadvanced frontpage.

this phgstats thing looks a little more normal... but I just cant get anything out of it?

the bit in the readme that says

- if you would use phgstats into your webpage, add the following lines in your webpage.php


<?php $phgdir = "phgstats"; // this line must have the path to phgstats directory
$use_file = basename(__FILE__); // dont change this
require_once ($phgdir . '/index.php') ?> // dont chjange this

where does that go? huh? php_includes? just in a template? where?

is there anything else that i can use for good quality custom stats that the elements can be stripped out and I can choose where and what I want to list? this is particuarly for a bf2 game server.

ta.

thejdog
07-07-2005, 04:24 AM
I am working on a vBadvanced CMPS module & block for SQuery. Since that only comes with phpnuke & nukephp ones. Give me a few days and I should have a working version :)

thejdog
07-07-2005, 06:26 AM
So far I got the block done: http://www.thedodclan.org/ it's on the right hand side.

James

majorj0nny1
07-07-2005, 07:55 AM
So far I got the block done: http://www.thedodclan.org/ it's on the right hand side.

James

woohooo! looking good mate - you intending to get player names listing somehow too ? really all im looking for is server name and IP ... players count on server, current server map, and some ability to check who is actually on there.

I look forward to anything you can offer/help us.

:D

thejdog
07-07-2005, 02:46 PM
Yea I'm working on a way to get the player ability on there :) Maybe click it and it opens in a custom content page in the center area. Also working on a center module too that will go to the top of the page. and have the information more spread out.

James

thejdog
07-07-2005, 03:01 PM
Just so you know I can give you guys the side module now. If you'd like. The custom content page will take a bit to port over. But I will get it done as soon as possible.

EDIT: Also let me know what games you guys will need off the bat. As I'm going to do some recoding of the SQuery code.

James

thejdog
07-07-2005, 05:38 PM
k, ran into a problem with running the center block & the side block at the same time...

thejdog
07-07-2005, 09:33 PM
OK, www.thedodclan.org - The BF2 module is getting there. Everygame is going to have EVERY option avaible, so you can get hell the delay to start. You'll have every option. But the bummer is, if you have 10 different game servers, you'll have 10 different templates. There will be 1 template atleast, there might end up being a template for the players area. I haven't even finished the players section. But hopefully after this BF2 module for the SQuery is done for VB all the others will easily follow.

If anybody has another game, and has a server that I could test with to pull the data info, that'd be great. Since the only servers I run are BFV & BF2 servers. So if you want a different game (that SQuery already supported), give me the IP address the query port & the game name.

EDIT: OK, you can now click on the DoD Dedicated 1 on the right hand side, and it'll come up with a table that say's Game Server Status and will show all the information. At the moment, I'm pulling more data than SQuery was for bf2. I'm using SQuery for just grabing the data from the server, but am using different variable ways so that you'll be able to grab more data for a any game.

James

jammer2020
07-09-2005, 12:13 AM
I sent you a pm with our CS:S ip and port. Awesome job on this!!!

majorj0nny1
07-09-2005, 04:56 AM
thanks loads thejdog, anything you can give us will be greatly appreciated!

with SQuery do you also have to have it installed on your webserver? what version do I need if thats the case, etc?

Wish i could help with the game server testing - I only have 1 bf2 server at present.

thanks again for all your efforts. :D

thejdog
07-09-2005, 04:06 PM
Yes you'll need SQuery 3.9 which is the most current one, I emailed the webmaster and asked if I could package SQuery with this vBulletin port so I'm waiting for a reply. But majorj0nny1 since I have bf2 servers too, this is no problem for you to just take :) Since the BF2 part is done! :)

James

jammer2020
07-09-2005, 04:20 PM
SQuery is no longer being updated. The original author has abandoned the project due to time constraints. Just an FYI in case you are interested in picking up the project :)

majorj0nny1
07-10-2005, 05:25 AM
Yes you'll need SQuery 3.9 which is the most current one, I emailed the webmaster and asked if I could package SQuery with this vBulletin port so I'm waiting for a reply. But majorj0nny1 since I have bf2 servers too, this is no problem for you to just take :) Since the BF2 part is done! :)

James

cool ! thanks loads - so squery ... i been to www.squery.com and all i can download is 3.9 for phpnuke, 3.9 for postnuke, and 3.9 for zentri ? which one do I need?

jammer2020
07-10-2005, 08:16 PM
Any of those will work. Within those packages is the "stand-alone" version which I would imagine is what thejdog is using for this.

You simply need the entire contents of the "Squery" folder from one of those downloads. The other folders can be deleted.

majorj0nny1
07-11-2005, 03:01 AM
Any of those will work. Within those packages is the "stand-alone" version which I would imagine is what thejdog is using for this.

You simply need the entire contents of the "Squery" folder from one of those downloads. The other folders can be deleted.

cool thanks.

majorj0nny1
07-11-2005, 02:23 PM
OK, www.thedodclan.org - The BF2 module is getting there. Everygame is going to have EVERY option avaible, so you can get hell the delay to start. You'll have every option. But the bummer is, if you have 10 different game servers, you'll have 10 different templates. There will be 1 template atleast, there might end up being a template for the players area. I haven't even finished the players section. But hopefully after this BF2 module for the SQuery is done for VB all the others will easily follow.

If anybody has another game, and has a server that I could test with to pull the data info, that'd be great. Since the only servers I run are BFV & BF2 servers. So if you want a different game (that SQuery already supported), give me the IP address the query port & the game name.

EDIT: OK, you can now click on the DoD Dedicated 1 on the right hand side, and it'll come up with a table that say's Game Server Status and will show all the information. At the moment, I'm pulling more data than SQuery was for bf2. I'm using SQuery for just grabing the data from the server, but am using different variable ways so that you'll be able to grab more data for a any game.

James

cool ! I WWWAAAAANNNTTT IIITTTT ! lol .... have ya got anything to share with us yet mate? Im itching to have a go myself!

:D

jammer2020
07-19-2005, 03:18 PM
Yes you'll need SQuery 3.9 which is the most current one, I emailed the webmaster and asked if I could package SQuery with this vBulletin port so I'm waiting for a reply. But majorj0nny1 since I have bf2 servers too, this is no problem for you to just take :) Since the BF2 part is done! :)

James

Send another email, if you havent heard back from your original one. The project has been taken over now.

majorj0nny1
07-19-2005, 04:38 PM
Send another email, if you havent heard back from your original one. The project has been taken over now.

another email ? to who ? sorry - please excuse my ignorance.

jammer2020
07-19-2005, 07:38 PM
hehe,

Sorry that was addressed to thejdog. :D