Skip to content
Neon edited this page Jun 18, 2021 · 34 revisions

Hello and welcome to LGSL Wiki!

Visit for the first time? > Leave the Star and Fork LGSL Repo!

GitHub followers GitHub stars GitHub forks

Requirements

PHP MySQL or MariaDB

Main links

GitHub code size in bytes Packagist

FAQ

Fast start? (using LGSL as PHP library)

  1. Download ZIP and extract or download via Composer: composer require tltneon/lgsl
  2. Example of using LGSL:
<?php
  include('lgsl/lgsl_files/lgsl_class.php');
  $result = lgsl_query_live('urbanterror', '176.9.28.206', 27971, 27971, 0, "sep");
  print_r($result);
?>

How to upgrade LGSL?

  1. Download stable version or latest commit. (*Note that commit can have any bugs)
  2. Backup your LGSL.
  3. Extract new LGSL into your LGSL folder with replacing (DO NOT replace lgsl_config.php)
    3.1 Check out your lgsl_config.php and new one - there are can be several changes.
  4. If everything is good - now you have most latest version of LGSL.
  • In other cases just roll back to your backup version.

How to go to Admin panel?

There are two ways you can enter the Admin panel: (Note that you need to install LGSL first)

  1. Just typing http://your_website/lgsl_folder/admin.php (For example: http://lgsl-demo.freesite.vip/lgsl6/admin.php)
  2. Clicking on the top right corner of the page. Cheers, you just found a hidden link, ha-ha.

How to add servers to website's sidebar?

  1. Set zone option to 1 at servers you need to show (at admin panel)
  2. Add code to your website:
<?php
  $lgsl_zone_number = 1;
  $output = "";
  require "lgsl/lgsl_files/lgsl_zone.php"; // note: you need to check route to that file!
  echo $output;
?> 

How to make backup?

  1. Open http://your_website/lgsl_files/lgsl_export.php
  2. Copy whereever you need and save.

Possible parameters:

  • Print as JSON: http://your_website/lgsl_files/lgsl_export.php?json=1
  • Print as XML: http://your_website/lgsl_files/lgsl_export.php?xml=1
  • Download as txt file: http://your_website/lgsl_files/lgsl_export.php?download=1
  • Only online: http://your_website/lgsl_files/lgsl_export.php?online=1
  • Only enabled: http://your_website/lgsl_files/lgsl_export.php?nodisabled=1
  • Sorting by ip or type: http://your_website/lgsl_files/lgsl_export.php?sort=ip

For example, you can export enabled servers sorted by type as xml: http://lgsl-demo.freesite.vip/lgsl9/lgsl_files/lgsl_export.php?xml=1&nodisabled=1&sort=type

Troubleshooting with adding game server

There is no game that I want to add!

Note that most of games builded on similar query protocols so they are grouped. Note that most of games builded on similar query protocols so they are grouped. To choose right game type, go to: https://github.com/tltneon/lgsl/wiki/Supported-Games,-Query-protocols,-Default-ports

My server won't working!!

Before you say that LGSL isn't works:

  1. Make sure your web hosting has open ports and allow to sending requests to game servers.
  2. Make sure you're entered right connection port and query port.
  3. Make sure your server is working now and also server's ports is opened.
  4. For some servers uses slightly different query port than connection port. Try to enter query port as "connection port + 1". For example: Connection port 27015, so you trying to enter Query port 27016. That often meets with Killing floor, Unturned and some other servers. Also check that page.

Changing visuals

How do I change style?

  • Go to lgsl_config.php
  • Find $lgsl_config['style'] = "breeze_style.css"; and replace at $lgsl_config['style'] = "darken_style.css"; for example.

You can find styles at /lgsl_files/styles/ folder.

How do I change language?

  • Go to lgsl_config.php
  • Find include("languages/english.php"); at very end of file and replace at include("languages/russian.php"); for example.

You can find languages at /lgsl_files/languages/ folder.

And a few lines at file install.php

Can't find your language? Contribute us your translation with your native language!

(You can use Google Translate if you need)

How can I make my own style?

You need to know CSS3 and use Developer Tools (e.g. DevTools into Mozilla Firefox).

  • Make file your_file_name.css at /lgsl_files/styles/ folder.
  • Change style in lgsl_config.php and now you have your own custom style of LGSL!

How can I add map images?

  • All of map images stores at /lgsl_files/maps/
  • Images should be only .png, .gif, .jpg
  • Since LGSL v5.10.2 you can add images with various resolutions (but keep in mind that can affects on page loading speed)

For example, we have any CS:GO server with map de_dust2. So to add map image we need to look at game type, game name and map name. CS:GO has gametype "source", game name "csgo" and map name "de_dust2". After we get that we can upload map image called de_dust2.jpg into /lgsl_files/maps/source/csgo/ folder. If it isn't exists - just create! That's all! If you correctly made it default map image will be replaced with yours new.

Custom stuff will be places here: http://lgsl-demo.freesite.vip/custom

Most common images you can download from here.

How can I help with .. ?

Mainly we need to help with finding bugs and to help to translate to any language.
Any your ideas (such as new style, game type, new feature) you can suggest to Issues page.
Also you can fork LGSL repository and give a star. Thanks!