The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[REQ] Help needed Live Game Server List for CMS
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! |
#2
|
|||
|
|||
Very simple matey
Install lgsl as normal, then edit your lgsl_list.php to give the table you want. I use this; Code:
<?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; Code:
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"; } Demo |
#3
|
|||
|
|||
great job.. is there any way to get the players name to show that are connected to the servers ?
|
#4
|
|||
|
|||
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 |
#5
|
|||
|
|||
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 |
#6
|
||||
|
||||
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! |
#7
|
||||
|
||||
care to share when you are done?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|