PDA

View Full Version : [REQ] Help needed Live Game Server List for CMS


The_Rayman
02-24-2010, 11:26 AM
Hi All,

In the past I adjusted in cooperation with Rene Wiesental some scripts to get a rFactor server monitor working on the vBa CMS.

Now, we have moved on to VB4 with CMS. Unfortunately... this widget thing of VBCMS is totally different from the vBa CMS... I cannot get the monitor to funtion. Therefor, I checked some alternatives. One is the Live Gameserver List from GreyCube.com by Richard Perry.

This servermonitor is more advanced, as it has more option than just the rFactor servermonitor option, also COD and many other shooters and MMO are supported.

Now, I'd like to have the html code displayed in a nice widget on the frontpage. Simple info, like serverlocation, etc. When clicked, a new screen opens with detailed info on the server and players.

Unfortunately I do not have the knowledge to make a widget like that... is there anyone here who can assist me and make many others happy?

Thanks!

Weetabix
02-24-2010, 08:40 PM
Very simple matey :)

Install lgsl as normal, then edit your lgsl_list.php to give the table you want. I use this;

<?php

require "lgsl_class.php";

$server_list = lgsl_query_cached_all("s");
$server_list = lgsl_sort_servers($server_list);

$output .= "
<div style='text-align:center'>
<table cellpadding='4' cellspacing='2' style='margin:auto'>";

foreach ($server_list as $server)
{
$misc = lgsl_server_misc($server);
$server = lgsl_server_html($server);

$output .= "
<tr>

<td height='25'; width='35'; align='left'>
<img alt='{$server['s']['map']}' src='{$misc['icon_game']}'/>
</td>

<td width='200'; title='{$server['b']['ip']}:{$server['b']['c_port']}' style='text-align:left'>
<div style='width:100%; overflow:hidden; height:1.3em'>
{$misc['name_filtered']}
</div>
</td>

<td style='white-space:nowrap; text-align:left'>
<b>{$server['s']['players']}</b>/{$server['s']['playersmax']}
</td>

</tr>";
}

$output .= "
</table>
</div>";

if ($lgsl_config['list']['totals'])
{
$total = lgsl_cached_totals();

$output .= "
<div>
<br />
</div>
<div style='text-align:center'>
<table cellpadding='4' cellspacing='4' style='margin:auto'>
<tr style='".lgsl_bg()."'>
<td> {$lgsl_config['text']['tns']} {$total['servers']} </td>
<td> {$lgsl_config['text']['tnp']} {$total['players']} </td>
<td> {$lgsl_config['text']['tmp']} {$total['playersmax']} </td>
</tr>
</table>
</div>";
}

?>


then make a php widget;

if (isset($_GET['s']) && is_numeric($_GET['s']))
{
require "lgsl/lgsl_files/lgsl_details.php";
}
elseif (isset($_GET['s']) && $_GET['s'] == "add")
{
require "lgsl/lgsl_files/lgsl_add.php";
}
else
{
require "lgsl/lgsl_files/lgsl_list.php";
}


YOUR PATHS

Demo (http://www.bfb-online.com)

jtf-2caspy
03-11-2010, 11:57 AM
great job.. is there any way to get the players name to show that are connected to the servers ?

Weetabix
03-12-2010, 10:49 PM
Not in the widget. You could make the server name a clickable link to the server's full page view by editing the lgsl_list.php

edit> some clever boffin at greycube made a flash interface for LGSL which has player info on it. Should be easy enough to stick that in a widget. LINKY (http://www.greycube.com/site/e107_plugins/forum/forum_viewtopic.php?7997)

karkey
03-18-2010, 06:45 PM
The Flash is bad for widgets if a player joins it throws the alinement's out

We are looking for
To just add the player that are in game into this coding, which i have tried unsuccessfully

I currently have
http://jtf-2.com/lgsl/
but again we would like to show the player in game on this page also

any ideas peeps :)

The_Rayman
03-24-2010, 11:40 AM
Awesome,

Works perfect! Adjusted the lgsl_list.php to my wishes :)
Shows up on the site, needed a few tweaks in the css code, but now all looks fine.

Thanks for the help!

CvP
05-14-2010, 03:36 PM
Awesome,

Works perfect! Adjusted the lgsl_list.php to my wishes :)
Shows up on the site, needed a few tweaks in the css code, but now all looks fine.

Thanks for the help!
care to share when you are done?