vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   [REQ] Help needed Live Game Server List for CMS (https://vborg.vbsupport.ru/showthread.php?t=236770)

The_Rayman 02-24-2010 11:26 AM

[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!

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;

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";
  }

YOUR PATHS

Demo

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

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 04:36 PM

Quote:

Originally Posted by The_Rayman (Post 2009325)
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?


All times are GMT. The time now is 06:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01016 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete